@@ -17,8 +17,6 @@ |
||
| 17 | 17 | use Nette; |
| 18 | 18 | use Nette\DI; |
| 19 | 19 | use Nette\Utils; |
| 20 | -use Nette\PhpGenerator as Code; |
|
| 21 | - |
|
| 22 | 20 | use IPub\DoctrineBlameable; |
| 23 | 21 | use IPub\DoctrineBlameable\Events; |
| 24 | 22 | use IPub\DoctrineBlameable\Mapping; |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | |
| 92 | 92 | $builder->addDefinition($this->prefix('subscriber')) |
| 93 | 93 | ->setType(Events\BlameableSubscriber::class) |
| 94 | - ->setArguments([$userCallable instanceof DI\ServiceDefinition ? '@' . $userCallable->getType() : NULL]); |
|
| 94 | + ->setArguments([$userCallable instanceof DI\ServiceDefinition ? '@'.$userCallable->getType() : NULL]); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $classMetadata = $em->getClassMetadata(get_class($entity)); |
| 235 | 235 | |
| 236 | 236 | if ($config = $this->driver->getObjectConfigurations($em, $classMetadata->getName())) { |
| 237 | - foreach(['update', 'create'] as $event) { |
|
| 237 | + foreach (['update', 'create'] as $event) { |
|
| 238 | 238 | if (isset($config[$event])) { |
| 239 | 239 | $this->updateFields($config[$event], $uow, $entity, $classMetadata); |
| 240 | 240 | } |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | $user = $this->getUser(); |
| 378 | 378 | |
| 379 | 379 | if ($classMetadata->hasAssociation($field)) { |
| 380 | - if ($user !== NULL && ! is_object($user)) { |
|
| 380 | + if ($user !== NULL && !is_object($user)) { |
|
| 381 | 381 | throw new Exceptions\InvalidArgumentException("Blame is reference, user must be an object"); |
| 382 | 382 | } |
| 383 | 383 | |
@@ -334,7 +334,7 @@ |
||
| 334 | 334 | */ |
| 335 | 335 | private static function getCacheId(string $className) : string |
| 336 | 336 | { |
| 337 | - return $className . '\\$' . strtoupper(str_replace('\\', '_', __NAMESPACE__)) . '_CLASSMETADATA'; |
|
| 337 | + return $className.'\\$'.strtoupper(str_replace('\\', '_', __NAMESPACE__)).'_CLASSMETADATA'; |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | } |