File tree Expand file tree Collapse file tree
tests/Functional/Apps/DefaultApp/src/Entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ class Bill
1313 #[ORM \Id]
1414 #[ORM \GeneratedValue]
1515 #[ORM \Column(type: 'integer ' )]
16- private $ id ;
16+ private ? int $ id = null ;
1717
1818 #[ORM \Column(type: 'string ' , length: 255 )]
19- private $ name ;
19+ private ? string $ name = null ;
2020
2121 #[ORM \ManyToMany(targetEntity: Customer::class, inversedBy: 'bills ' )]
22- private $ customers ;
22+ private Collection $ customers ;
2323
2424 public function __construct ()
2525 {
Original file line number Diff line number Diff line change @@ -12,29 +12,29 @@ class BlogPost
1212 #[ORM \Id]
1313 #[ORM \GeneratedValue]
1414 #[ORM \Column(type: 'integer ' )]
15- private $ id ;
15+ private ? int $ id = null ;
1616
1717 #[ORM \Column(type: 'string ' , length: 255 )]
18- private $ title ;
18+ private ? string $ title = null ;
1919
2020 #[ORM \Column(type: 'string ' , length: 255 )]
21- private $ slug ;
21+ private ? string $ slug = null ;
2222
2323 #[ORM \Column(type: 'text ' )]
24- private $ content ;
24+ private ? string $ content = null ;
2525
2626 #[ORM \ManyToMany(targetEntity: Category::class, inversedBy: 'blogPosts ' )]
27- private $ categories ;
27+ private Collection $ categories ;
2828
2929 #[ORM \Column(type: 'datetime_immutable ' )]
30- private $ createdAt ;
30+ private ? \ DateTimeInterface $ createdAt = null ;
3131
3232 #[ORM \Column(type: 'datetime_immutable ' , nullable: true )]
33- private $ publishedAt ;
33+ private ? \ DateTimeImmutable $ publishedAt = null ;
3434
3535 #[ORM \ManyToOne(targetEntity: User::class, inversedBy: 'blogPosts ' )]
3636 #[ORM \JoinColumn(nullable: false )]
37- private $ author ;
37+ private ? User $ author = null ;
3838
3939 #[ORM \ManyToOne(targetEntity: User::class)]
4040 private $ publisher ;
Original file line number Diff line number Diff line change @@ -13,17 +13,17 @@ class Category
1313 #[ORM \Id]
1414 #[ORM \GeneratedValue]
1515 #[ORM \Column(type: 'integer ' )]
16- private $ id ;
16+ private ? int $ id = null ;
1717
1818 #[Assert \NotBlank]
1919 #[ORM \Column(type: 'string ' , length: 255 )]
20- private $ name ;
20+ private ? string $ name = null ;
2121
2222 #[ORM \Column(type: 'string ' , length: 255 )]
23- private $ slug ;
23+ private ? string $ slug = null ;
2424
2525 #[ORM \ManyToMany(targetEntity: BlogPost::class, mappedBy: 'categories ' )]
26- private $ blogPosts ;
26+ private Collection $ blogPosts ;
2727
2828 #[ORM \Column(type: 'boolean ' )]
2929 private bool $ active = false ;
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ class Customer
1313 #[ORM \Id]
1414 #[ORM \GeneratedValue]
1515 #[ORM \Column(type: 'integer ' )]
16- private $ id ;
16+ private ? int $ id = null ;
1717
1818 #[ORM \Column(type: 'string ' , length: 255 )]
19- private $ name ;
19+ private ? string $ name = null ;
2020
2121 #[ORM \ManyToMany(targetEntity: Bill::class, mappedBy: 'customers ' )]
22- private $ bills ;
22+ private Collection $ bills ;
2323
2424 public function __construct ()
2525 {
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ class Page
1111 #[ORM \Id]
1212 #[ORM \GeneratedValue]
1313 #[ORM \Column(type: 'integer ' )]
14- private $ id ;
14+ private ? int $ id = null ;
1515
1616 #[ORM \Column(type: 'string ' , length: 255 )]
17- private $ name ;
17+ private ? string $ name = null ;
1818
1919 #[ORM \ManyToOne(targetEntity: Website::class, inversedBy: 'pages ' )]
2020 #[ORM \JoinColumn(nullable: false )]
@@ -42,7 +42,7 @@ public function getWebsite()
4242 return $ this ->website ;
4343 }
4444
45- public function setWebsite (?Website $ website )
45+ public function setWebsite (?Website $ website ): static
4646 {
4747 $ this ->website = $ website ;
4848
Original file line number Diff line number Diff line change @@ -13,16 +13,16 @@ class User implements \Stringable
1313 #[ORM \Id]
1414 #[ORM \GeneratedValue]
1515 #[ORM \Column(type: 'integer ' )]
16- private $ id ;
16+ private ? int $ id = null ;
1717
1818 #[ORM \Column(type: 'string ' , length: 255 )]
19- private $ name ;
19+ private ? string $ name = null ;
2020
2121 #[ORM \Column(type: 'string ' , length: 255 )]
22- private $ email ;
22+ private ? string $ email = null ;
2323
2424 #[ORM \OneToMany(targetEntity: BlogPost::class, mappedBy: 'author ' , orphanRemoval: true )]
25- private $ blogPosts ;
25+ private Collection $ blogPosts ;
2626
2727 public function __construct ()
2828 {
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ class Website implements \Stringable
1313 #[ORM \Id]
1414 #[ORM \GeneratedValue]
1515 #[ORM \Column(type: 'integer ' )]
16- private $ id ;
16+ private ? int $ id = null ;
1717
1818 #[ORM \Column(type: 'string ' , length: 255 )]
19- private $ name ;
19+ private ? string $ name = null ;
2020
2121 #[ORM \OneToMany(targetEntity: Page::class, mappedBy: 'website ' , orphanRemoval: true )]
22- private $ pages ;
22+ private Collection $ pages ;
2323
2424 public function __construct ()
2525 {
You can’t perform that action at this time.
0 commit comments