Completed
Push — develop ( eba943...e9cefe )
by Roman
22:22
created
src/AbstractGridManagerFactory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
      * @param GridPluginManager | ServiceLocatorInterface $serviceLocator
106 106
      * @param $name
107 107
      * @param $requestedName
108
-     * @return mixed
108
+     * @return GridInterface
109 109
      * @throws Exception\RuntimeException
110 110
      */
111 111
     public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
37 37
     {
38 38
         $res = false;
39
-        if (strpos($requestedName, static::CONFIG_KEY . '.') === 0) {
39
+        if (strpos($requestedName, static::CONFIG_KEY.'.') === 0) {
40 40
             $res = true;
41 41
         }
42 42
         return $res;
@@ -128,17 +128,17 @@  discard block
 block discarded – undo
128 128
         if ($gridsConfig === null || count($gridsConfig) === 0) {
129 129
             throw new Exception\RuntimeException('В конфигурационном файле нет секции grids');
130 130
         }
131
-        $gridName = substr($requestedName, strlen(self::CONFIG_KEY . '.'));
131
+        $gridName = substr($requestedName, strlen(self::CONFIG_KEY.'.'));
132 132
         if (!array_key_exists($gridName, $gridsConfig) || !$gridsConfig[$gridName]) {
133 133
             throw new Exception\RuntimeException(
134 134
                 sprintf('Таблица с именем %s не найдена в конфиге гридов.', $gridName)
135 135
             );
136 136
         }
137
-        $gridConfig =& $gridsConfig[$gridName];
137
+        $gridConfig = & $gridsConfig[$gridName];
138 138
         if (!array_key_exists('class', $gridConfig) || !$gridConfig['class']) {
139 139
             throw new Exception\RuntimeException('Необходимо задать класс таблицы в конфиге.');
140 140
         }
141
-        $gridClass =& $gridConfig['class'];
141
+        $gridClass = & $gridConfig['class'];
142 142
         $options = [];
143 143
         if (array_key_exists('options', $gridConfig) && $gridConfig['options']) {
144 144
             if (!is_array($gridConfig['options']) && !$gridConfig['options'] instanceof ArrayAccess) {
Please login to merge, or discard this patch.