@@ -19,7 +19,6 @@ |
||
| 19 | 19 | use Nette; |
| 20 | 20 | use Nette\DI; |
| 21 | 21 | use Nette\Utils; |
| 22 | - |
|
| 23 | 22 | use IPub\DoctrineBlameable; |
| 24 | 23 | use IPub\DoctrineBlameable\Events; |
| 25 | 24 | use IPub\DoctrineBlameable\Mapping; |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @date 01.01.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\DI; |
| 18 | 18 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | $builder->addDefinition($this->prefix('subscriber')) |
| 100 | 100 | ->setType(Events\BlameableSubscriber::class) |
| 101 | - ->setArguments([$userCallable instanceof DI\ServiceDefinition ? '@' . $userCallable->getType() : NULL]); |
|
| 101 | + ->setArguments([$userCallable instanceof DI\ServiceDefinition ? '@'.$userCallable->getType() : NULL]); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -140,15 +140,15 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | if (is_array($entity) && $entity[0] instanceof ServiceDefinition) { // [ServiceDefinition, ...] -> [@serviceName, ...] |
| 143 | - $entity[0] = '@' . current(array_keys($builder->getDefinitions(), $entity[0], true)); |
|
| 143 | + $entity[0] = '@'.current(array_keys($builder->getDefinitions(), $entity[0], true)); |
|
| 144 | 144 | |
| 145 | 145 | } elseif ($entity instanceof DI\ServiceDefinition) { // ServiceDefinition -> @serviceName |
| 146 | - $entity = '@' . current(array_keys($builder->getDefinitions(), $entity, true)); |
|
| 146 | + $entity = '@'.current(array_keys($builder->getDefinitions(), $entity, true)); |
|
| 147 | 147 | |
| 148 | 148 | } elseif (is_array($entity) && $entity[0] === $builder) { // [$builder, ...] -> [@container, ...] |
| 149 | 149 | trigger_error("Replace object ContainerBuilder in Statement entity with '@container'.", E_USER_DEPRECATED); |
| 150 | 150 | |
| 151 | - $entity[0] = '@' . self::THIS_CONTAINER; |
|
| 151 | + $entity[0] = '@'.self::THIS_CONTAINER; |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | return $entity; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 02.01.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @date 01.01.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\Events; |
| 18 | 18 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $classMetadata = $em->getClassMetadata(get_class($entity)); |
| 234 | 234 | |
| 235 | 235 | if ($config = $this->driver->getObjectConfigurations($em, $classMetadata->getName())) { |
| 236 | - foreach(['update', 'create'] as $event) { |
|
| 236 | + foreach (['update', 'create'] as $event) { |
|
| 237 | 237 | if (isset($config[$event])) { |
| 238 | 238 | $this->updateFields($config[$event], $uow, $entity, $classMetadata); |
| 239 | 239 | } |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | $user = $this->getUser(); |
| 381 | 381 | |
| 382 | 382 | if ($classMetadata->hasAssociation($field)) { |
| 383 | - if ($user !== NULL && ! is_object($user)) { |
|
| 383 | + if ($user !== NULL && !is_object($user)) { |
|
| 384 | 384 | throw new Exceptions\InvalidArgumentException("Blame is reference, user must be an object"); |
| 385 | 385 | } |
| 386 | 386 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 29.01.14 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\Entities; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 10.11.15 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\Entities; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 07.01.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\Entities; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 11.11.15 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\Entities; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 05.01.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\Security; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 01.01.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\DoctrineBlameable\Exceptions; |
| 18 | 18 | |