@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @var array |
30 | 30 | */ |
31 | - protected $interfaceNameToEntityClass = []; |
|
31 | + protected $interfaceNameToEntityClass = [ ]; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * EntityManager constructor. |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | public function getEntityClassByInterface($interfaceName) |
73 | 73 | { |
74 | 74 | if ($this->hasEntityClassByInterface($interfaceName)) { |
75 | - $errMsg = sprintf('Error build entity class name for %s', $interfaceName) ; |
|
75 | + $errMsg = sprintf('Error build entity class name for %s', $interfaceName); |
|
76 | 76 | throw new Exception\ErrorBuildEntityClassNameException($errMsg); |
77 | 77 | } |
78 | 78 | |
79 | - return $this->interfaceNameToEntityClass[$interfaceName]; |
|
79 | + return $this->interfaceNameToEntityClass[ $interfaceName ]; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -93,22 +93,22 @@ discard block |
||
93 | 93 | public function hasEntityClassByInterface($interfaceName) |
94 | 94 | { |
95 | 95 | if (array_key_exists($interfaceName, $this->interfaceNameToEntityClass)) { |
96 | - return false !== $this->interfaceNameToEntityClass[$interfaceName]; |
|
96 | + return false !== $this->interfaceNameToEntityClass[ $interfaceName ]; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | if (!$this->has($interfaceName)) { |
100 | - $this->interfaceNameToEntityClass[$interfaceName] = false; |
|
100 | + $this->interfaceNameToEntityClass[ $interfaceName ] = false; |
|
101 | 101 | return false; |
102 | 102 | } |
103 | 103 | |
104 | 104 | $entity = $this->get($interfaceName); |
105 | 105 | |
106 | 106 | if (!is_object($entity)) { |
107 | - $this->interfaceNameToEntityClass[$interfaceName] = false; |
|
107 | + $this->interfaceNameToEntityClass[ $interfaceName ] = false; |
|
108 | 108 | return false; |
109 | 109 | } |
110 | 110 | |
111 | - $this->interfaceNameToEntityClass[$interfaceName] = get_class($entity); |
|
111 | + $this->interfaceNameToEntityClass[ $interfaceName ] = get_class($entity); |
|
112 | 112 | |
113 | 113 | return true; |
114 | 114 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/nnx-framework/doctrine |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/nnx-framework/doctrine |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace Nnx\Doctrine; |
7 | 7 | |
8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @var array |
25 | 25 | */ |
26 | - protected $prototype = []; |
|
26 | + protected $prototype = [ ]; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @inheritdoc |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
40 | 40 | { |
41 | 41 | if (array_key_exists($requestedName, $this->prototype)) { |
42 | - return false !== $this->prototype[$requestedName]; |
|
42 | + return false !== $this->prototype[ $requestedName ]; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | $appServiceLocator = $serviceLocator; |
@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
71 | 71 | { |
72 | 72 | if (array_key_exists($requestedName, $this->prototype)) { |
73 | - if (!is_object($this->prototype[$requestedName])) { |
|
73 | + if (!is_object($this->prototype[ $requestedName ])) { |
|
74 | 74 | $errMsg = sprintf('Invalid prototype for %s', $requestedName); |
75 | 75 | throw new Exception\RuntimeException($errMsg); |
76 | 76 | } |
77 | - return clone $this->prototype[$requestedName]; |
|
77 | + return clone $this->prototype[ $requestedName ]; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | $appServiceLocator = $serviceLocator; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $r = new ReflectionClass($entityClassName); |
94 | 94 | $entity = $r->newInstance(); |
95 | 95 | } |
96 | - $this->prototype[$requestedName] = $entity; |
|
96 | + $this->prototype[ $requestedName ] = $entity; |
|
97 | 97 | |
98 | 98 | |
99 | 99 | return $entity; |