@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function setMetadataDriver($metadataDriver) |
| 58 | 58 | { |
| 59 | - $this->metadataDriver = (string)$metadataDriver; |
|
| 59 | + $this->metadataDriver = (string) $metadataDriver; |
|
| 60 | 60 | |
| 61 | 61 | return $this; |
| 62 | 62 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function setHierarchyMetadataClass($hierarchyMetadataClass) |
| 78 | 78 | { |
| 79 | - $this->hierarchyMetadataClass = (string)$hierarchyMetadataClass; |
|
| 79 | + $this->hierarchyMetadataClass = (string) $hierarchyMetadataClass; |
|
| 80 | 80 | |
| 81 | 81 | return $this; |
| 82 | 82 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function setDebug($debug) |
| 102 | 102 | { |
| 103 | - $this->debug = (boolean)$debug; |
|
| 103 | + $this->debug = (boolean) $debug; |
|
| 104 | 104 | |
| 105 | 105 | return $this; |
| 106 | 106 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | * |
| 27 | 27 | * @var array |
| 28 | 28 | */ |
| 29 | - protected $options = []; |
|
| 29 | + protected $options = [ ]; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Настройки для фабрики метаданных |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | $isModuleConfig = |
| 32 | 32 | is_array($appConfig) |
| 33 | 33 | && array_key_exists(Module::MODULE_SERVICE_MANAGER_CONFIG_KEY, $appConfig) |
| 34 | - && is_array($appConfig[Module::MODULE_SERVICE_MANAGER_CONFIG_KEY]); |
|
| 35 | - $moduleServiceManagerConfig = $isModuleConfig ? $appConfig[Module::MODULE_SERVICE_MANAGER_CONFIG_KEY] : []; |
|
| 34 | + && is_array($appConfig[ Module::MODULE_SERVICE_MANAGER_CONFIG_KEY ]); |
|
| 35 | + $moduleServiceManagerConfig = $isModuleConfig ? $appConfig[ Module::MODULE_SERVICE_MANAGER_CONFIG_KEY ] : [ ]; |
|
| 36 | 36 | |
| 37 | 37 | $configuration = new Config($moduleServiceManagerConfig); |
| 38 | 38 | $jmsSerializerModuleServiceManager = new JmsSerializerModuleServiceManager($configuration); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | $name = $handlerRegistryConfig->getName(); |
| 64 | 64 | $options = $handlerRegistryConfig->getOptions(); |
| 65 | 65 | |
| 66 | - $handlerRegistry = $serviceLocator->get( |
|
| 66 | + $handlerRegistry = $serviceLocator->get( |
|
| 67 | 67 | $name, |
| 68 | 68 | $options |
| 69 | 69 | ); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | * @param $name |
| 27 | 27 | * @param $requestedName |
| 28 | 28 | * |
| 29 | - * @return bool|void |
|
| 29 | + * @return boolean |
|
| 30 | 30 | */ |
| 31 | 31 | public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
| 32 | 32 | { |
@@ -35,13 +35,13 @@ |
||
| 35 | 35 | $handlerRegistry = new HandlerRegistry(); |
| 36 | 36 | $creationOptions = $this->getCreationOptions(); |
| 37 | 37 | |
| 38 | - $subscribers = []; |
|
| 38 | + $subscribers = [ ]; |
|
| 39 | 39 | if (array_key_exists('subscribers', $creationOptions)) { |
| 40 | - if (!is_array($creationOptions['subscribers'])) { |
|
| 40 | + if (!is_array($creationOptions[ 'subscribers' ])) { |
|
| 41 | 41 | $errMsg = 'Subscribers for handler registry is not array'; |
| 42 | 42 | throw new Exception\RuntimeException($errMsg); |
| 43 | 43 | } |
| 44 | - $subscribers = $creationOptions['subscribers']; |
|
| 44 | + $subscribers = $creationOptions[ 'subscribers' ]; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | foreach ($subscribers as $subscriberName) { |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | public function createService(ServiceLocatorInterface $serviceLocator) |
| 38 | 38 | { |
| 39 | 39 | //@see \Nnx\Doctrine\Listener\ManagerRegistryListener |
| 40 | - $results = $this->getEventManager()->trigger('get.doctrineManagerRegistry', $this, [], function ($managerRegistry) { |
|
| 40 | + $results = $this->getEventManager()->trigger('get.doctrineManagerRegistry', $this, [ ], function($managerRegistry) { |
|
| 41 | 41 | return $managerRegistry instanceof ManagerRegistry; |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -95,19 +95,19 @@ discard block |
||
| 95 | 95 | 'defaultPhpDriver' => [ |
| 96 | 96 | 'name' => FileLocator::class, |
| 97 | 97 | 'options' => [ |
| 98 | - 'directories' => [] |
|
| 98 | + 'directories' => [ ] |
|
| 99 | 99 | ] |
| 100 | 100 | ], |
| 101 | 101 | 'defaultYamlDriver' => [ |
| 102 | 102 | 'name' => FileLocator::class, |
| 103 | 103 | 'options' => [ |
| 104 | - 'directories' => [] |
|
| 104 | + 'directories' => [ ] |
|
| 105 | 105 | ] |
| 106 | 106 | ], |
| 107 | 107 | 'defaultXmlDriver' => [ |
| 108 | 108 | 'name' => FileLocator::class, |
| 109 | 109 | 'options' => [ |
| 110 | - 'directories' => [] |
|
| 110 | + 'directories' => [ ] |
|
| 111 | 111 | ] |
| 112 | 112 | ] |
| 113 | 113 | ], |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | ], |
| 153 | 153 | 'identicalNaming' => [ |
| 154 | 154 | 'name' => Naming\IdenticalPropertyNamingStrategy::class, |
| 155 | - 'options' => [] |
|
| 155 | + 'options' => [ ] |
|
| 156 | 156 | ], |
| 157 | 157 | 'camelCaseNaming' => [ |
| 158 | 158 | 'name' => Naming\CamelCaseNamingStrategy::class, |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | * Добавляет метаданные для двухсторонних ассоциаций |
| 110 | 110 | * |
| 111 | 111 | * @param DataContainer\EntityInterface $childEntity |
| 112 | - * @param $childEntityClassName |
|
| 112 | + * @param string $childEntityClassName |
|
| 113 | 113 | * @param DataContainer\Association $targetAssociation |
| 114 | 114 | */ |
| 115 | 115 | protected function buildReverseAssociationMetadata(DataContainer\EntityInterface $childEntity, $childEntityClassName, DataContainer\Association $targetAssociation) |
@@ -210,7 +210,7 @@ |
||
| 210 | 210 | /** |
| 211 | 211 | * Возвращает менеджер для получения контейнера с данными для DoctrineObjectConstructor |
| 212 | 212 | * |
| 213 | - * @return AbstractPluginManager |
|
| 213 | + * @return ContainerInterface |
|
| 214 | 214 | */ |
| 215 | 215 | public function getDoctrineObjectConstructorDataManager() |
| 216 | 216 | { |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | if (!array_key_exists('name', $type)) { |
| 127 | 127 | return false; |
| 128 | 128 | } |
| 129 | - $class = $type['name']; |
|
| 129 | + $class = $type[ 'name' ]; |
|
| 130 | 130 | if (!class_exists($class)) { |
| 131 | 131 | return false; |
| 132 | 132 | } |