@@ -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; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var array |
| 28 | 28 | */ |
| 29 | - protected $classNameToObjectManagerName = []; |
|
| 29 | + protected $classNameToObjectManagerName = [ ]; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * ObjectManagerAutoDetector constructor. |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | throw new Exception\ErrorBuildObjectManagerNameException($errMsg); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - return $this->classNameToObjectManagerName[$className]; |
|
| 57 | + return $this->classNameToObjectManagerName[ $className ]; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
@@ -69,31 +69,31 @@ discard block |
||
| 69 | 69 | public function hasObjectManagerNameByClassName($className) |
| 70 | 70 | { |
| 71 | 71 | if (array_key_exists($className, $this->classNameToObjectManagerName)) { |
| 72 | - return false !== $this->classNameToObjectManagerName[$className]; |
|
| 72 | + return false !== $this->classNameToObjectManagerName[ $className ]; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - $moduleOptionsManager = $this->getModuleOptionsManager(); |
|
| 75 | + $moduleOptionsManager = $this->getModuleOptionsManager(); |
|
| 76 | 76 | if (!$moduleOptionsManager->hasOptionsByClassName($className)) { |
| 77 | - $this->classNameToObjectManagerName[$className] = false; |
|
| 77 | + $this->classNameToObjectManagerName[ $className ] = false; |
|
| 78 | 78 | return false; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $moduleOptions = $moduleOptionsManager->getOptionsByClassName($className); |
| 82 | 82 | |
| 83 | 83 | if (!$moduleOptions instanceof ObjectManagerNameProviderInterface) { |
| 84 | - $this->classNameToObjectManagerName[$className] = false; |
|
| 84 | + $this->classNameToObjectManagerName[ $className ] = false; |
|
| 85 | 85 | return false; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $objectManagerName = $moduleOptions->getObjectManagerName(); |
| 89 | 89 | |
| 90 | 90 | if (!is_string($objectManagerName)) { |
| 91 | - $this->classNameToObjectManagerName[$className] = false; |
|
| 91 | + $this->classNameToObjectManagerName[ $className ] = false; |
|
| 92 | 92 | return false; |
| 93 | 93 | } |
| 94 | - $this->classNameToObjectManagerName[$className] = $objectManagerName; |
|
| 94 | + $this->classNameToObjectManagerName[ $className ] = $objectManagerName; |
|
| 95 | 95 | |
| 96 | - return false !== $this->classNameToObjectManagerName[$className]; |
|
| 96 | + return false !== $this->classNameToObjectManagerName[ $className ]; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | |
@@ -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; |
@@ -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; |