New PHP 7.1 type hints for DataFixtures.
This commit is contained in:
parent
89998a6418
commit
4b6dd73a0b
|
@ -55,7 +55,7 @@ class LoadCommentsData extends AbstractFixture implements OrderedFixtureInterfac
|
|||
$om->flush();
|
||||
}
|
||||
|
||||
public function getOrder()
|
||||
public function getOrder(): int
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class LoadPostData extends AbstractFixture implements OrderedFixtureInterface
|
|||
$this->addReference('test_post_longpost', $longPost);
|
||||
}
|
||||
|
||||
public function getOrder()
|
||||
public function getOrder(): int
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class LoadSubscribersData extends AbstractFixture implements OrderedFixtureInter
|
|||
$om->flush();
|
||||
}
|
||||
|
||||
public function getOrder()
|
||||
public function getOrder(): int
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class LoadSubscribersData extends AbstractFixture implements OrderedFixtureInter
|
|||
*
|
||||
* @return User[]
|
||||
*/
|
||||
private function getRandomSubscribers($users, $min = 0)
|
||||
private function getRandomSubscribers(array $users, int $min = 0): array
|
||||
{
|
||||
if (0 === $number = mt_rand($min, count($users))) {
|
||||
return [];
|
||||
|
|
|
@ -39,7 +39,7 @@ class LoadUserData extends AbstractFixture implements OrderedFixtureInterface
|
|||
$om->flush();
|
||||
}
|
||||
|
||||
public function getOrder()
|
||||
public function getOrder(): int
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue