Completed
Pull Request — develop (#329)
by Carsten
07:08
created
module/Core/src/Core/Entity/Hydrator/EntityHydrator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 
90 90
     /**
91 91
      * exclude methods from the automatism
92
-     * @param $methods
92
+     * @param string[] $methods
93 93
      */
94 94
     public function setExcludeMethods($methods)
95 95
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
         
33 33
         $getters = array_filter(
34 34
             get_class_methods($object),
35
-            function ($methodName) use ($object) {
35
+            function($methodName) use ($object) {
36 36
                 return "get" === substr($methodName, 0, 3)
37
-                && method_exists($object, 's' . substr($methodName, 1));
37
+                && method_exists($object, 's'.substr($methodName, 1));
38 38
             }
39 39
         );
40 40
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
         $setters = array_filter(
63 63
             get_class_methods($object),
64
-            function ($methodName) {
64
+            function($methodName) {
65 65
                 return "set" === substr($methodName, 0, 3);
66 66
             }
67 67
         );
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Hydrator/EntityHydratorFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      * Create the Json Entity Hydrator
22 22
      *
23 23
      * @param  ServiceLocatorInterface $serviceLocator
24
-     * @return JsonEntityHydrator
24
+     * @return EntityHydrator
25 25
      */
26 26
     public function createService(ServiceLocatorInterface $serviceLocator)
27 27
     {
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Snapshot.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     /**
26 26
      * @param $data
27
-     * @return mixed
27
+     * @return Snapshot
28 28
      * @ODM\PreUpdate
29 29
      */
30 30
     public function __invoke($data)
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormRowCombined.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      *
74 74
      * Proxies to {@link render()}.
75 75
      *
76
-     * @param null|ElementInterface $element
76
+     * @param null|ElementInterface $elements
77 77
      * @param null|string           $labelPosition
78 78
      * @param bool                  $renderErrors
79 79
      * @return string|FormRow
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         
63 63
         
64 64
         return sprintf(
65
-            '<div class="controls controls-row ' . $form_row_class . '">%s%s</div>',
65
+            '<div class="controls controls-row '.$form_row_class.'">%s%s</div>',
66 66
             $labelMarkup,
67 67
             $markups
68 68
         );
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/ErrorHandlerListener.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
     /**
44 44
      * @param LoggerInterface $log
45
-     * @param null $redirect
45
+     * @param \Closure $redirect
46 46
      */
47 47
     public function __construct(LoggerInterface $log, $redirect = null)
48 48
     {
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      *
67 67
      * @param  EventManagerInterface $events
68 68
      * @param  integer $priority
69
-    */
69
+     */
70 70
     public function attach(EventManagerInterface $events, $priority = 1)
71 71
     {
72 72
         $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'handleError'), $priority);
@@ -147,19 +147,19 @@  discard block
 block discarded – undo
147 147
         $error = error_get_last();
148 148
         
149 149
         if ($error) {
150
-             $this->log->err(
151
-                 $error['message'],
152
-                 array(
153
-                 'errno' => $error['type'],
154
-                 'file' => $error['file'],
155
-                 'line' => $error['line']
156
-                 )
157
-             );
158
-             if ($this->redirect &&
150
+                $this->log->err(
151
+                    $error['message'],
152
+                    array(
153
+                    'errno' => $error['type'],
154
+                    'file' => $error['file'],
155
+                    'line' => $error['line']
156
+                    )
157
+                );
158
+                if ($this->redirect &&
159 159
                  ($error['type'] & (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR))
160
-             ) {
161
-                 if (is_callable($this->redirect)) {
162
-                     call_user_func($this->redirect);
160
+                ) {
161
+                    if (is_callable($this->redirect)) {
162
+                        call_user_func($this->redirect);
163 163
                     }
164 164
                 }
165 165
         }
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/HTMLTemplateMessage.php 3 patches
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      *
135 135
      * @param  string $name
136 136
      * @param  mixed $value
137
-     * @return ViewModel
137
+     * @return HTMLTemplateMessage
138 138
      */
139 139
     public function setVariable($name, $value)
140 140
     {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      *
196 196
      * Resets the internal variable container to an empty container.
197 197
      *
198
-     * @return ViewModel
198
+     * @return HTMLTemplateMessage
199 199
      */
200 200
     public function clearVariables()
201 201
     {
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     /**
207 207
      *
208 208
      *
209
-     * @param $template
209
+     * @param string $template
210 210
      *
211 211
      * @return self
212 212
      */
@@ -216,6 +216,9 @@  discard block
 block discarded – undo
216 216
         return $this;
217 217
     }
218 218
 
219
+    /**
220
+     * @return string
221
+     */
219 222
     public function getTemplate()
220 223
     {
221 224
         return $this->template;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
             if ($this->value['params']['status'] != 'all'){
63 63
                 $queryBuilder->field('status.name')->equals($this->value['params']['status']);
64 64
             }
65
-        }else{
65
+        } else{
66 66
             $queryBuilder->field('status.name')->equals(Status::CREATED);
67 67
         }
68 68
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         }
230 230
 
231 231
         /* @var \Zend\Mvc\View\Http\ViewManager $viewManager */
232
-        $viewManager  = $this->serviceManager->get('viewManager');
232
+        $viewManager = $this->serviceManager->get('viewManager');
233 233
         $resolver = $this->serviceManager->get('viewResolver');
234 234
 
235 235
         /* @var \Zend\Mvc\MvcEvent $event */
@@ -237,13 +237,13 @@  discard block
 block discarded – undo
237 237
         $lang = $event->getRouteMatch()->getParam('lang');
238 238
 
239 239
 
240
-        if ($resolver->resolve($this->getTemplate() . '.' . $lang)) {
241
-            $viewModel->setTemplate($this->getTemplate() . '.' . $lang);
242
-        }else{
240
+        if ($resolver->resolve($this->getTemplate().'.'.$lang)) {
241
+            $viewModel->setTemplate($this->getTemplate().'.'.$lang);
242
+        } else {
243 243
             $viewModel->setTemplate($this->getTemplate());
244 244
         }
245 245
 
246
-        $view         = $viewManager->getView();
246
+        $view = $viewManager->getView();
247 247
 
248 248
         $viewModel->setVariables($this->getVariables());
249 249
         $view->setResponse($response);
Please login to merge, or discard this patch.
module/Core/src/Core/ModuleManager/ModuleConfigLoader.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -34,6 +34,9 @@
 block discarded – undo
34 34
     {
35 35
     }
36 36
     
37
+    /**
38
+     * @param string $directory
39
+     */
37 40
     public static function load($directory)
38 41
     {
39 42
         $directory = rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     
37 37
     public static function load($directory)
38 38
     {
39
-        $directory = rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
39
+        $directory = rtrim($directory, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
40 40
         $env       = getenv('APPLICATION_ENV') ?: 'production';
41 41
         $pattern   = sprintf('%s{,*.}{config,%s}.php', $directory, $env);
42 42
         $config    = array();
Please login to merge, or discard this patch.
module/Core/src/Core/Paginator/PaginatorFactoryAbstract.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     /**
26 26
      * @param ServiceLocatorInterface $serviceLocator
27
-     * @return mixed|Paginator
27
+     * @return Paginator
28 28
      */
29 29
     public function createService(ServiceLocatorInterface $serviceLocator)
30 30
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $repository     = $repositories->get($this->getRepository());
51 51
         $queryBuilder   = $repository->createQueryBuilder();
52 52
         $filter         = $serviceLocator->getServiceLocator()->get('filterManager')->get($this->getFilter());
53
-        $adapter       = new \Core\Paginator\Adapter\DoctrineMongoLateCursor($queryBuilder, $filter, $this->options);
53
+        $adapter = new \Core\Paginator\Adapter\DoctrineMongoLateCursor($queryBuilder, $filter, $this->options);
54 54
         $service        = new Paginator($adapter);
55 55
 
56 56
         $this->setCreationOptions([]);
Please login to merge, or discard this patch.
Repository/DoctrineMongoODM/Event/AbstractUpdatePermissionsSubscriber.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -108,6 +108,9 @@
 block discarded – undo
108 108
         return $entities;
109 109
     }
110 110
     
111
+    /**
112
+     * @return string
113
+     */
111 114
     protected function getRepositoryName()
112 115
     {
113 116
         if (0 === strpos($this->repositoryName, '\\')) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         $repository     = $dm->getRepository($repositoryName);
99 99
         
100 100
         $criteria = array(
101
-            'permissions.assigned.' . $resourceId => array(
101
+            'permissions.assigned.'.$resourceId => array(
102 102
                 '$exists' => true
103 103
             )
104 104
         );
Please login to merge, or discard this patch.