RUN phpcbf
This commit is contained in:
parent
3ee24e5381
commit
ab6ef4ba48
6 changed files with 11 additions and 14 deletions
|
@ -14,8 +14,8 @@ use Neos\Flow\Cli\CommandController;
|
||||||
class SequenceCommandController extends CommandController
|
class SequenceCommandController extends CommandController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var SequenceGenerator
|
|
||||||
* @Flow\Inject
|
* @Flow\Inject
|
||||||
|
* @var SequenceGenerator
|
||||||
*/
|
*/
|
||||||
protected $sequenceGenerator;
|
protected $sequenceGenerator;
|
||||||
|
|
||||||
|
|
|
@ -16,16 +16,16 @@ use Neos\Flow\Annotations as Flow;
|
||||||
class Insert
|
class Insert
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var int
|
|
||||||
* @Flow\Identity
|
* @Flow\Identity
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $number;
|
protected $number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
|
||||||
* @Flow\Identity
|
* @Flow\Identity
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $type;
|
protected $type;
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ class Insert
|
||||||
*/
|
*/
|
||||||
public function setType($type)
|
public function setType($type)
|
||||||
{
|
{
|
||||||
if (is_object($type)) {
|
if (\is_object($type)) {
|
||||||
$type = get_class($type);
|
$type = \get_class($type);
|
||||||
}
|
}
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ namespace DigiComp\Sequence\Service;
|
||||||
use DigiComp\Sequence\Domain\Model\Insert;
|
use DigiComp\Sequence\Domain\Model\Insert;
|
||||||
use Doctrine\Common\Persistence\ObjectManager;
|
use Doctrine\Common\Persistence\ObjectManager;
|
||||||
use Doctrine\DBAL\DBALException;
|
use Doctrine\DBAL\DBALException;
|
||||||
use Doctrine\ORM\EntityManager;
|
|
||||||
use Neos\Flow\Annotations as Flow;
|
use Neos\Flow\Annotations as Flow;
|
||||||
use Neos\Flow\Log\SystemLoggerInterface;
|
use Neos\Flow\Log\SystemLoggerInterface;
|
||||||
use Neos\Flow\Reflection\ReflectionService;
|
use Neos\Flow\Reflection\ReflectionService;
|
||||||
|
@ -22,21 +21,21 @@ use Neos\Utility\TypeHandling;
|
||||||
class SequenceGenerator
|
class SequenceGenerator
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var ObjectManager
|
|
||||||
* @Flow\Inject
|
* @Flow\Inject
|
||||||
|
* @var ObjectManager
|
||||||
*/
|
*/
|
||||||
protected $entityManager;
|
protected $entityManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ReflectionService
|
|
||||||
* @Flow\Inject
|
* @Flow\Inject
|
||||||
* @deprecated
|
* @deprecated
|
||||||
|
* @var ReflectionService
|
||||||
*/
|
*/
|
||||||
protected $reflectionService;
|
protected $reflectionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var SystemLoggerInterface
|
|
||||||
* @Flow\Inject
|
* @Flow\Inject
|
||||||
|
* @var SystemLoggerInterface
|
||||||
*/
|
*/
|
||||||
protected $systemLogger;
|
protected $systemLogger;
|
||||||
|
|
||||||
|
@ -120,7 +119,7 @@ class SequenceGenerator
|
||||||
*/
|
*/
|
||||||
protected function inferTypeFromSource($stringOrObject)
|
protected function inferTypeFromSource($stringOrObject)
|
||||||
{
|
{
|
||||||
if (is_object($stringOrObject)) {
|
if (\is_object($stringOrObject)) {
|
||||||
$stringOrObject = TypeHandling::getTypeForValue($stringOrObject);
|
$stringOrObject = TypeHandling::getTypeForValue($stringOrObject);
|
||||||
}
|
}
|
||||||
if (! $stringOrObject) {
|
if (! $stringOrObject) {
|
||||||
|
|
|
@ -10,7 +10,6 @@ use Doctrine\DBAL\Schema\Schema;
|
||||||
*/
|
*/
|
||||||
class Version20140505093853 extends AbstractMigration
|
class Version20140505093853 extends AbstractMigration
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,7 +10,6 @@ use Doctrine\DBAL\Schema\Schema;
|
||||||
*/
|
*/
|
||||||
class Version20160624203903 extends AbstractMigration
|
class Version20160624203903 extends AbstractMigration
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,7 +25,7 @@ class SequenceTest extends FunctionalTestCase
|
||||||
|
|
||||||
$pIds = [];
|
$pIds = [];
|
||||||
for ($i = 0; $i < 10; $i++) {
|
for ($i = 0; $i < 10; $i++) {
|
||||||
$pId = pcntl_fork();
|
$pId = \pcntl_fork();
|
||||||
if ($pId) {
|
if ($pId) {
|
||||||
$pIds[] = $pId;
|
$pIds[] = $pId;
|
||||||
} else {
|
} else {
|
||||||
|
@ -39,7 +39,7 @@ class SequenceTest extends FunctionalTestCase
|
||||||
|
|
||||||
foreach ($pIds as $pId) {
|
foreach ($pIds as $pId) {
|
||||||
$status = 0;
|
$status = 0;
|
||||||
pcntl_waitpid($pId, $status);
|
\pcntl_waitpid($pId, $status);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEquals(101, $sequenceGenerator->getLastNumberFor($sequenceGenerator));
|
$this->assertEquals(101, $sequenceGenerator->getLastNumberFor($sequenceGenerator));
|
||||||
|
|
Loading…
Add table
Reference in a new issue