Completed
Push — master ( 204bf8...90ade3 )
by Adam
02:22
created
src/IPub/DoctrineBlameable/Mapping/Driver/Blameable.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,9 @@
 block discarded – undo
15 15
 namespace IPub\DoctrineBlameable\Mapping\Driver;
16 16
 
17 17
 use Nette;
18
-
19 18
 use Doctrine;
20 19
 use Doctrine\Common;
21 20
 use Doctrine\ORM;
22
-
23 21
 use IPub;
24 22
 use IPub\DoctrineBlameable;
25 23
 use IPub\DoctrineBlameable\Exceptions;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -329,7 +329,7 @@
 block discarded – undo
329 329
 	 */
330 330
 	private static function getCacheId($className)
331 331
 	{
332
-		return $className . '\\$' . strtoupper(str_replace('\\', '_', __NAMESPACE__)) . '_CLASSMETADATA';
332
+		return $className.'\\$'.strtoupper(str_replace('\\', '_', __NAMESPACE__)).'_CLASSMETADATA';
333 333
 	}
334 334
 
335 335
 }
Please login to merge, or discard this patch.
src/IPub/DoctrineBlameable/Events/BlameableSubscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/IPub/DoctrineBlameable/DI/DoctrineBlameableExtension.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
 		$builder->addDefinition($this->prefix('subscriber'))
88 88
 			->setClass(Events\BlameableSubscriber::CLASS_NAME)
89
-			->setArguments([$userCallable instanceof DI\ServiceDefinition ? '@' . $userCallable->getClass() : NULL]);
89
+			->setArguments([$userCallable instanceof DI\ServiceDefinition ? '@'.$userCallable->getClass() : NULL]);
90 90
 	}
91 91
 
92 92
 	public function beforeCompile()
Please login to merge, or discard this patch.