@@ -51,14 +51,14 @@ discard block |
||
| 51 | 51 | * |
| 52 | 52 | * @var array |
| 53 | 53 | */ |
| 54 | - protected $objectManagerByName = []; |
|
| 54 | + protected $objectManagerByName = [ ]; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Ключем является имя соеденения, а значением объект соеденения к базе данных |
| 58 | 58 | * |
| 59 | 59 | * @var array |
| 60 | 60 | */ |
| 61 | - protected $connectionByName = []; |
|
| 61 | + protected $connectionByName = [ ]; |
|
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * Прототип для создания объекта события, бросаемого когда нужно получить ресурс |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | protected function getObjectManagerByName($name) |
| 192 | 192 | { |
| 193 | 193 | if (array_key_exists($name, $this->objectManagerByName)) { |
| 194 | - return $this->objectManagerByName[$name]; |
|
| 194 | + return $this->objectManagerByName[ $name ]; |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | $event = clone $this->getManagerRegistryResourceEventPrototype(); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $event->setTarget($this); |
| 201 | 201 | |
| 202 | 202 | |
| 203 | - $resultsEvent = $this->getEventManager()->trigger($event, function ($objectManager) { |
|
| 203 | + $resultsEvent = $this->getEventManager()->trigger($event, function($objectManager) { |
|
| 204 | 204 | return $objectManager instanceof ObjectManager; |
| 205 | 205 | }); |
| 206 | 206 | |
@@ -211,9 +211,9 @@ discard block |
||
| 211 | 211 | throw new Exception\ObjectManagerNotFoundException($errMsg); |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | - $this->objectManagerByName[$name] = $objectManager; |
|
| 214 | + $this->objectManagerByName[ $name ] = $objectManager; |
|
| 215 | 215 | |
| 216 | - return $this->objectManagerByName[$name]; |
|
| 216 | + return $this->objectManagerByName[ $name ]; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | protected function getConnectionByName($name) |
| 229 | 229 | { |
| 230 | 230 | if (array_key_exists($name, $this->connectionByName)) { |
| 231 | - return $this->connectionByName[$name]; |
|
| 231 | + return $this->connectionByName[ $name ]; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | $event = clone $this->getManagerRegistryResourceEventPrototype(); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | $event->setTarget($this); |
| 238 | 238 | |
| 239 | 239 | |
| 240 | - $resultsEvent = $this->getEventManager()->trigger($event, function ($connection) { |
|
| 240 | + $resultsEvent = $this->getEventManager()->trigger($event, function($connection) { |
|
| 241 | 241 | return is_object($connection); |
| 242 | 242 | }); |
| 243 | 243 | |
@@ -248,9 +248,9 @@ discard block |
||
| 248 | 248 | throw new Exception\ConnectionNotFoundException($errMsg); |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | - $this->connectionByName[$name] = $connection; |
|
| 251 | + $this->connectionByName[ $name ] = $connection; |
|
| 252 | 252 | |
| 253 | - return $this->connectionByName[$name]; |
|
| 253 | + return $this->connectionByName[ $name ]; |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | $buildListConnectionsResult = $this->getEventManager()->trigger(static::EVENT_BUILD_LIST_CONNECTIONS, $this); |
| 58 | - $listConnectionsResult = []; |
|
| 58 | + $listConnectionsResult = [ ]; |
|
| 59 | 59 | foreach ($buildListConnectionsResult as $item) { |
| 60 | 60 | if (is_array($item)) { |
| 61 | 61 | $listConnectionsResult = ArrayUtils::merge($listConnectionsResult, $item); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | |
| 67 | 67 | $buildListObjectManagersResult = $this->getEventManager()->trigger(static::EVENT_BUILD_LIST_OBJECT_MANAGERS, $this); |
| 68 | - $listObjectManagersResult = []; |
|
| 68 | + $listObjectManagersResult = [ ]; |
|
| 69 | 69 | foreach ($buildListObjectManagersResult as $item) { |
| 70 | 70 | if (is_array($item)) { |
| 71 | 71 | $listObjectManagersResult = ArrayUtils::merge($listObjectManagersResult, $item); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * @var array |
| 31 | 31 | */ |
| 32 | - protected $classNameToObjectManagerName = []; |
|
| 32 | + protected $classNameToObjectManagerName = [ ]; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Плагин менеджер для получения ObjectManager'ов Doctrine2 |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | throw new Exception\ErrorBuildObjectManagerNameException($errMsg); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - return $this->classNameToObjectManagerName[$realClass]; |
|
| 72 | + return $this->classNameToObjectManagerName[ $realClass ]; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
@@ -86,31 +86,31 @@ discard block |
||
| 86 | 86 | $realClass = ClassUtils::getRealClass($className); |
| 87 | 87 | |
| 88 | 88 | if (array_key_exists($realClass, $this->classNameToObjectManagerName)) { |
| 89 | - return false !== $this->classNameToObjectManagerName[$realClass]; |
|
| 89 | + return false !== $this->classNameToObjectManagerName[ $realClass ]; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - $moduleOptionsManager = $this->getModuleOptionsManager(); |
|
| 92 | + $moduleOptionsManager = $this->getModuleOptionsManager(); |
|
| 93 | 93 | if (!$moduleOptionsManager->hasOptionsByClassName($realClass)) { |
| 94 | - $this->classNameToObjectManagerName[$realClass] = false; |
|
| 94 | + $this->classNameToObjectManagerName[ $realClass ] = false; |
|
| 95 | 95 | return false; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $moduleOptions = $moduleOptionsManager->getOptionsByClassName($realClass); |
| 99 | 99 | |
| 100 | 100 | if (!$moduleOptions instanceof ObjectManagerNameProviderInterface) { |
| 101 | - $this->classNameToObjectManagerName[$realClass] = false; |
|
| 101 | + $this->classNameToObjectManagerName[ $realClass ] = false; |
|
| 102 | 102 | return false; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | $objectManagerName = $moduleOptions->getObjectManagerName(); |
| 106 | 106 | |
| 107 | 107 | if (!is_string($objectManagerName)) { |
| 108 | - $this->classNameToObjectManagerName[$realClass] = false; |
|
| 108 | + $this->classNameToObjectManagerName[ $realClass ] = false; |
|
| 109 | 109 | return false; |
| 110 | 110 | } |
| 111 | - $this->classNameToObjectManagerName[$realClass] = $objectManagerName; |
|
| 111 | + $this->classNameToObjectManagerName[ $realClass ] = $objectManagerName; |
|
| 112 | 112 | |
| 113 | - return false !== $this->classNameToObjectManagerName[$realClass]; |
|
| 113 | + return false !== $this->classNameToObjectManagerName[ $realClass ]; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | |