Code improvements (#1649)
* use global namespace for faster lookups * phpstan level 5
This commit is contained in:
@@ -123,7 +123,7 @@ final class ActivityFixtures extends Fixture
|
||||
;
|
||||
|
||||
if (null !== $this->callback) {
|
||||
call_user_func($this->callback, $activity);
|
||||
\call_user_func($this->callback, $activity);
|
||||
}
|
||||
$manager->persist($activity);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ final class CustomerFixtures extends Fixture
|
||||
;
|
||||
|
||||
if (null !== $this->callback) {
|
||||
call_user_func($this->callback, $customer);
|
||||
\call_user_func($this->callback, $customer);
|
||||
}
|
||||
$manager->persist($customer);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ final class ProjectFixtures extends Fixture
|
||||
;
|
||||
|
||||
if (null !== $this->callback) {
|
||||
call_user_func($this->callback, $project);
|
||||
\call_user_func($this->callback, $project);
|
||||
}
|
||||
$manager->persist($project);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ final class TagFixtures extends Fixture
|
||||
$tag = $this->createTagEntry($tagName);
|
||||
|
||||
if (null !== $this->callback) {
|
||||
call_user_func($this->callback, $tag);
|
||||
\call_user_func($this->callback, $tag);
|
||||
}
|
||||
$manager->persist($tag);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ final class TeamFixtures extends Fixture
|
||||
$lead = null;
|
||||
while (null === $lead) {
|
||||
$tmp = $user[array_rand($user)];
|
||||
if (!in_array($tmp, $this->skipUser)) {
|
||||
if (!\in_array($tmp, $this->skipUser)) {
|
||||
$lead = $tmp;
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ final class TeamFixtures extends Fixture
|
||||
$userToAdd = null;
|
||||
while (null === $userToAdd) {
|
||||
$tmp = $user[array_rand($user)];
|
||||
if (!in_array($tmp, $this->skipUser)) {
|
||||
if (!\in_array($tmp, $this->skipUser)) {
|
||||
$userToAdd = $tmp;
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ final class TeamFixtures extends Fixture
|
||||
}
|
||||
|
||||
if (null !== $this->callback) {
|
||||
call_user_func($this->callback, $team);
|
||||
\call_user_func($this->callback, $team);
|
||||
}
|
||||
$manager->persist($team);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ final class TimesheetFixtures extends Fixture
|
||||
);
|
||||
|
||||
if (null !== $this->callback) {
|
||||
call_user_func($this->callback, $timesheet);
|
||||
\call_user_func($this->callback, $timesheet);
|
||||
}
|
||||
$manager->persist($timesheet);
|
||||
}
|
||||
@@ -267,7 +267,7 @@ final class TimesheetFixtures extends Fixture
|
||||
);
|
||||
|
||||
if (null !== $this->callback) {
|
||||
call_user_func($this->callback, $timesheet);
|
||||
\call_user_func($this->callback, $timesheet);
|
||||
}
|
||||
$manager->persist($timesheet);
|
||||
}
|
||||
@@ -279,7 +279,7 @@ final class TimesheetFixtures extends Fixture
|
||||
{
|
||||
if (true === $this->useTags) {
|
||||
$tagObject = new Tag();
|
||||
$tagObject->setName($this->tags[($cnt % count($this->tags))]);
|
||||
$tagObject->setName($this->tags[($cnt % \count($this->tags))]);
|
||||
|
||||
return [$tagObject];
|
||||
}
|
||||
@@ -355,7 +355,7 @@ final class TimesheetFixtures extends Fixture
|
||||
->setRate($rate)
|
||||
->setBegin($start);
|
||||
|
||||
if (count($tagArray) > 0) {
|
||||
if (\count($tagArray) > 0) {
|
||||
foreach ($tagArray as $item) {
|
||||
$entry->addTag($item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user