File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -131,16 +131,17 @@ Woh! You now have a new ``src/Entity/Product.php`` file::
131
131
// src/Entity/Product.php
132
132
namespace App\Entity;
133
133
134
+ use App\Repository\ProductRepository;
134
135
use Doctrine\ORM\Mapping as ORM;
135
136
136
137
/**
137
- * @ORM\Entity(repositoryClass="App\Repository\ ProductRepository" )
138
+ * @ORM\Entity(repositoryClass=ProductRepository::class )
138
139
*/
139
140
class Product
140
141
{
141
142
/**
142
- * @ORM\Id
143
- * @ORM\GeneratedValue
143
+ * @ORM\Id()
144
+ * @ORM\GeneratedValue()
144
145
* @ORM\Column(type="integer")
145
146
*/
146
147
private $id;
@@ -155,7 +156,7 @@ Woh! You now have a new ``src/Entity/Product.php`` file::
155
156
*/
156
157
private $price;
157
158
158
- public function getId()
159
+ public function getId(): ?int
159
160
{
160
161
return $this->id;
161
162
}
You can’t perform that action at this time.
0 commit comments