@@ -15,7 +15,6 @@ |
||
| 15 | 15 | namespace IPub\DoctrineBlameable; |
| 16 | 16 | |
| 17 | 17 | use Nette; |
| 18 | -use Nette\Http; |
|
| 19 | 18 | |
| 20 | 19 | /** |
| 21 | 20 | * Doctrine blameable extension configuration storage. Store basic extension settings |
@@ -15,16 +15,10 @@ |
||
| 15 | 15 | namespace IPub\DoctrineBlameable\Events; |
| 16 | 16 | |
| 17 | 17 | use Nette; |
| 18 | -use Nette\Utils; |
|
| 19 | -use Nette\Security as NS; |
|
| 20 | - |
|
| 21 | 18 | use Doctrine; |
| 22 | 19 | use Doctrine\Common; |
| 23 | 20 | use Doctrine\ORM; |
| 24 | - |
|
| 25 | -use Kdyby; |
|
| 26 | 21 | use Kdyby\Events; |
| 27 | - |
|
| 28 | 22 | use IPub; |
| 29 | 23 | use IPub\DoctrineBlameable; |
| 30 | 24 | use IPub\DoctrineBlameable\Exceptions; |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | |
| 511 | 511 | } else if ($metadata->hasAssociation($field)) { |
| 512 | 512 | // association |
| 513 | - if ($metadata->isSingleValuedAssociation($field) === FALSE && $this->configuration->useLazyAssociation() === FALSE) { |
|
| 513 | + if ($metadata->isSingleValuedAssociation($field) === FALSE && $this->configuration->useLazyAssociation() === FALSE) { |
|
| 514 | 514 | throw new Exceptions\InvalidMappingException("Association - [{$field}] is not valid, it must be a one-to-many relation or a string field - {$metadata->getName()}"); |
| 515 | 515 | } |
| 516 | 516 | } |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | $user = $this->getUser(); |
| 631 | 631 | |
| 632 | 632 | if ($classMetadata->hasAssociation($field)) { |
| 633 | - if ($user !== NULL && ! is_object($user)) { |
|
| 633 | + if ($user !== NULL && !is_object($user)) { |
|
| 634 | 634 | throw new Exceptions\InvalidArgumentException("Blame is reference, user must be an object"); |
| 635 | 635 | } |
| 636 | 636 | |