run phpcbf
This commit is contained in:
parent
7767091426
commit
8da32c3969
3 changed files with 7 additions and 7 deletions
|
@ -51,7 +51,7 @@ class SequenceCommandController extends CommandController
|
|||
->createQuery('SELECT i.type, MAX(i.number) max_number FROM ' . Insert::class . ' i GROUP BY i.type')
|
||||
->getScalarResult();
|
||||
foreach ($results as $result) {
|
||||
$cleanArray[$result['type']] = (int) $result['max_number'];
|
||||
$cleanArray[$result['type']] = (int)$result['max_number'];
|
||||
}
|
||||
} else {
|
||||
foreach ($typesToClean as $typeToClean) {
|
||||
|
|
|
@ -49,7 +49,7 @@ class SequenceGenerator
|
|||
// TODO: Let increment be configurable per type
|
||||
do {
|
||||
$count++;
|
||||
} while (! $this->validateFreeNumber($count, $type));
|
||||
} while (!$this->validateFreeNumber($count, $type));
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class SequenceGenerator
|
|||
} catch (\PDOException $e) {
|
||||
return false;
|
||||
} catch (DBALException $e) {
|
||||
if (! $e->getPrevious() instanceof \PDOException) {
|
||||
if (!$e->getPrevious() instanceof \PDOException) {
|
||||
$this->systemLogger->critical('Exception occured: ' . $e->getMessage());
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
@ -104,7 +104,7 @@ class SequenceGenerator
|
|||
*/
|
||||
public function getLastNumberFor($type): int
|
||||
{
|
||||
return (int) $this->entityManager->getConnection()->executeQuery(
|
||||
return (int)$this->entityManager->getConnection()->executeQuery(
|
||||
'SELECT MAX(number) FROM '
|
||||
. $this->entityManager->getClassMetadata(Insert::class)->getTableName()
|
||||
. ' WHERE type = :type',
|
||||
|
@ -122,7 +122,7 @@ class SequenceGenerator
|
|||
if (\is_object($stringOrObject)) {
|
||||
$stringOrObject = TypeHandling::getTypeForValue($stringOrObject);
|
||||
}
|
||||
if (! $stringOrObject) {
|
||||
if (!$stringOrObject) {
|
||||
throw new Exception('No Type given');
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class SequenceTest extends FunctionalTestCase
|
|||
|
||||
$pIds = [];
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$pId = pcntl_fork();
|
||||
$pId = \pcntl_fork();
|
||||
if ($pId) {
|
||||
$pIds[] = $pId;
|
||||
} else {
|
||||
|
@ -39,7 +39,7 @@ class SequenceTest extends FunctionalTestCase
|
|||
|
||||
foreach ($pIds as $pId) {
|
||||
$status = 0;
|
||||
pcntl_waitpid($pId, $status);
|
||||
\pcntl_waitpid($pId, $status);
|
||||
}
|
||||
|
||||
$this->assertEquals(101, $sequenceGenerator->getLastNumberFor($sequenceGenerator));
|
||||
|
|
Loading…
Reference in a new issue