Skip to content

Commit 68c779b

Browse files
removed typehints on entity properties and property getter methods
1 parent f4e721d commit 68c779b

51 files changed

Lines changed: 144 additions & 150 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Component/Cron/CronModule.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,31 +164,31 @@ public function updateLastFinishedAt(): void
164164
/**
165165
* @return \DateTime|null
166166
*/
167-
public function getLastStartedAt(): ?DateTime
167+
public function getLastStartedAt()
168168
{
169169
return $this->lastStartedAt;
170170
}
171171

172172
/**
173173
* @return \DateTime|null
174174
*/
175-
public function getLastFinishedAt(): ?DateTime
175+
public function getLastFinishedAt()
176176
{
177177
return $this->lastFinishedAt;
178178
}
179179

180180
/**
181181
* @return int|null
182182
*/
183-
public function getLastDuration(): ?int
183+
public function getLastDuration()
184184
{
185185
return $this->lastDuration;
186186
}
187187

188188
/**
189189
* @return string
190190
*/
191-
public function getStatus(): string
191+
public function getStatus()
192192
{
193193
return $this->status;
194194
}

src/Component/Cron/CronModuleRun.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,47 +76,47 @@ public function __construct(
7676
/**
7777
* @return \Shopsys\FrameworkBundle\Component\Cron\CronModule
7878
*/
79-
public function getCronModule(): CronModule
79+
public function getCronModule()
8080
{
8181
return $this->cronModule;
8282
}
8383

8484
/**
8585
* @return string
8686
*/
87-
public function getStatus(): string
87+
public function getStatus()
8888
{
8989
return $this->status;
9090
}
9191

9292
/**
9393
* @return \DateTime
9494
*/
95-
public function getStartedAt(): DateTime
95+
public function getStartedAt()
9696
{
9797
return $this->startedAt;
9898
}
9999

100100
/**
101101
* @return \DateTime
102102
*/
103-
public function getFinishedAt(): DateTime
103+
public function getFinishedAt()
104104
{
105105
return $this->finishedAt;
106106
}
107107

108108
/**
109109
* @return int
110110
*/
111-
public function getDuration(): int
111+
public function getDuration()
112112
{
113113
return $this->duration;
114114
}
115115

116116
/**
117117
* @return int
118118
*/
119-
public function getId(): int
119+
public function getId()
120120
{
121121
return $this->id;
122122
}

src/Component/FileUpload/EntityFileUploadInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ public function setFileKeyAsUploaded(string $key): void;
2525
/**
2626
* @return int
2727
*/
28-
public function getId(): int;
28+
public function getId();
2929
}

src/Component/Image/Image.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function setPosition(int $position): void
210210
/**
211211
* @return int|null
212212
*/
213-
public function getPosition(): ?int
213+
public function getPosition()
214214
{
215215
return $this->position;
216216
}
@@ -226,47 +226,47 @@ public function getFilename(): string
226226
/**
227227
* @return int
228228
*/
229-
public function getId(): int
229+
public function getId()
230230
{
231231
return $this->id;
232232
}
233233

234234
/**
235235
* @return string
236236
*/
237-
public function getEntityName(): string
237+
public function getEntityName()
238238
{
239239
return $this->entityName;
240240
}
241241

242242
/**
243243
* @return int
244244
*/
245-
public function getEntityId(): int
245+
public function getEntityId()
246246
{
247247
return $this->entityId;
248248
}
249249

250250
/**
251251
* @return string|null
252252
*/
253-
public function getType(): ?string
253+
public function getType()
254254
{
255255
return $this->type;
256256
}
257257

258258
/**
259259
* @return string
260260
*/
261-
public function getExtension(): string
261+
public function getExtension()
262262
{
263263
return $this->extension;
264264
}
265265

266266
/**
267267
* @return \DateTime
268268
*/
269-
public function getModifiedAt(): DateTime
269+
public function getModifiedAt()
270270
{
271271
return $this->modifiedAt;
272272
}

src/Component/Image/ImageTranslation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ImageTranslation extends AbstractTranslation
3030
/**
3131
* @return string|null
3232
*/
33-
public function getName(): ?string
33+
public function getName()
3434
{
3535
return $this->name;
3636
}

src/Component/UploadedFile/UploadedFile.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ public function getFilename(): string
168168
/**
169169
* @return int
170170
*/
171-
public function getId(): int
171+
public function getId()
172172
{
173173
return $this->id;
174174
}
175175

176176
/**
177177
* @return string
178178
*/
179-
public function getName(): string
179+
public function getName()
180180
{
181181
return $this->name;
182182
}
@@ -208,7 +208,7 @@ public function getTemporaryFilename(): string
208208
/**
209209
* @return string
210210
*/
211-
public function getSlug(): string
211+
public function getSlug()
212212
{
213213
return $this->slug;
214214
}
@@ -232,31 +232,31 @@ public function setSlug(string $slug): void
232232
/**
233233
* @return string
234234
*/
235-
public function getEntityName(): string
235+
public function getEntityName()
236236
{
237237
return $this->entityName;
238238
}
239239

240240
/**
241241
* @return int
242242
*/
243-
public function getEntityId(): int
243+
public function getEntityId()
244244
{
245245
return $this->entityId;
246246
}
247247

248248
/**
249249
* @return string
250250
*/
251-
public function getExtension(): string
251+
public function getExtension()
252252
{
253253
return $this->extension;
254254
}
255255

256256
/**
257257
* @return string
258258
*/
259-
public function getType(): string
259+
public function getType()
260260
{
261261
return $this->type;
262262
}
@@ -301,15 +301,15 @@ public function setNameAndSlug(string $temporaryFilename): void
301301
/**
302302
* @return \DateTime
303303
*/
304-
public function getModifiedAt(): DateTime
304+
public function getModifiedAt()
305305
{
306306
return $this->modifiedAt;
307307
}
308308

309309
/**
310310
* @return int
311311
*/
312-
public function getPosition(): int
312+
public function getPosition()
313313
{
314314
return $this->position;
315315
}

src/Model/Administrator/Administrator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public function getAdministratorRoles(): array
282282
/**
283283
* @return \DateTime|null
284284
*/
285-
public function getRolesChangedAt(): ?DateTime
285+
public function getRolesChangedAt()
286286
{
287287
return $this->rolesChangedAt;
288288
}
@@ -361,7 +361,7 @@ public function eraseCredentials()
361361
/**
362362
* {@inheritdoc}
363363
*/
364-
public function getRoles(): array
364+
public function getRoles()
365365
{
366366
$roles = [];
367367
/** @var \Shopsys\FrameworkBundle\Model\Administrator\Role\AdministratorRole $role */

src/Model/Administrator/Role/AdministratorRole.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Shopsys\FrameworkBundle\Model\Administrator\Role;
66

77
use Doctrine\ORM\Mapping as ORM;
8-
use Shopsys\FrameworkBundle\Model\Administrator\Administrator;
98

109
/**
1110
* @ORM\Table(name="administrator_roles")
@@ -40,15 +39,15 @@ public function __construct(AdministratorRoleData $administratorRoleData)
4039
/**
4140
* @return \Shopsys\FrameworkBundle\Model\Administrator\Administrator
4241
*/
43-
public function getAdministrator(): Administrator
42+
public function getAdministrator()
4443
{
4544
return $this->administrator;
4645
}
4746

4847
/**
4948
* @return string
5049
*/
51-
public function getRole(): string
50+
public function getRole()
5251
{
5352
return $this->role;
5453
}

src/Model/Advert/Advert.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use DateTime;
88
use Doctrine\Common\Collections\ArrayCollection;
9-
use Doctrine\Common\Collections\Collection;
109
use Doctrine\ORM\Mapping as ORM;
1110
use Ramsey\Uuid\Uuid;
1211

@@ -80,7 +79,7 @@ class Advert
8079
* @ORM\ManyToMany(targetEntity="Shopsys\FrameworkBundle\Model\Category\Category")
8180
* @ORM\JoinTable(name="advert_categories")
8281
*/
83-
protected Collection $categories;
82+
protected $categories;
8483

8584
/**
8685
* @var \DateTime|null
@@ -149,7 +148,7 @@ public function getId()
149148
/**
150149
* @return string
151150
*/
152-
public function getUuid(): string
151+
public function getUuid()
153152
{
154153
return $this->uuid;
155154
}
@@ -213,23 +212,23 @@ public function getPositionName()
213212
/**
214213
* @return \Shopsys\FrameworkBundle\Model\Category\Category[]
215214
*/
216-
public function getCategories(): array
215+
public function getCategories()
217216
{
218217
return $this->categories->getValues();
219218
}
220219

221220
/**
222221
* @return \DateTime|null
223222
*/
224-
public function getDatetimeVisibleFrom(): ?DateTime
223+
public function getDatetimeVisibleFrom()
225224
{
226225
return $this->datetimeVisibleFrom;
227226
}
228227

229228
/**
230229
* @return \DateTime|null
231230
*/
232-
public function getDatetimeVisibleTo(): ?DateTime
231+
public function getDatetimeVisibleTo()
233232
{
234233
return $this->datetimeVisibleTo;
235234
}

src/Model/Article/Article.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function getId()
170170
/**
171171
* @return string
172172
*/
173-
public function getUuid(): string
173+
public function getUuid()
174174
{
175175
return $this->uuid;
176176
}
@@ -258,7 +258,7 @@ public function isHidden()
258258
/**
259259
* @return \DateTime
260260
*/
261-
public function getCreatedAt(): DateTime
261+
public function getCreatedAt()
262262
{
263263
return $this->createdAt;
264264
}

0 commit comments

Comments
 (0)