@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * BlameableListener.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:DoctrineBlameable! |
|
| 9 | - * @subpackage Events |
|
| 10 | - * @since 1.0.0 |
|
| 11 | - * |
|
| 12 | - * @date 01.01.16 |
|
| 13 | - */ |
|
| 3 | + * BlameableListener.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:DoctrineBlameable! |
|
| 9 | + * @subpackage Events |
|
| 10 | + * @since 1.0.0 |
|
| 11 | + * |
|
| 12 | + * @date 01.01.16 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\DoctrineBlameable\Events; |
| 16 | 16 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | $classMetadata = $em->getClassMetadata(get_class($entity)); |
| 218 | 218 | |
| 219 | 219 | if ($config = $this->driver->getObjectConfigurations($classMetadata->getName())) { |
| 220 | - foreach(['update', 'create'] as $event) { |
|
| 220 | + foreach (['update', 'create'] as $event) { |
|
| 221 | 221 | if (isset($config[$event])) { |
| 222 | 222 | foreach ($config[$event] as $field) { |
| 223 | 223 | $currentValue = $classMetadata->getReflectionProperty($field)->getValue($entity); |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | $user = $this->getUser(); |
| 349 | 349 | |
| 350 | 350 | if ($classMetadata->hasAssociation($field)) { |
| 351 | - if ($user !== NULL && ! is_object($user)) { |
|
| 351 | + if ($user !== NULL && !is_object($user)) { |
|
| 352 | 352 | throw new Exceptions\InvalidArgumentException("Blame is reference, user must be an object"); |
| 353 | 353 | } |
| 354 | 354 | |