Completed
Pull Request — develop (#509)
by ANTHONIUS
21:03
created
module/Core/src/Listener/AjaxRouteListener.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      *
66 66
      * @param MvcEvent $event
67 67
      *
68
-     * @return null|\Zend\Http\PhpEnvironment\Response
68
+     * @return null|\Zend\Stdlib\ResponseInterface
69 69
      * @throws \UnexpectedValueException
70 70
      */
71 71
     public function onRoute(MvcEvent $event)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @var array
49 49
      */
50 50
     private $events = [
51
-        [ MvcEvent::EVENT_ROUTE, 'onRoute', 100 ],
51
+        [MvcEvent::EVENT_ROUTE, 'onRoute', 100],
52 52
     ];
53 53
 
54 54
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $ajaxEvent->setRequest($request);
89 89
         $ajaxEvent->setResponse($response);
90 90
 
91
-        $results = $this->ajaxEventManager->triggerEventUntil(function ($r) {
91
+        $results = $this->ajaxEventManager->triggerEventUntil(function($r) {
92 92
             return null !== $r;
93 93
         }, $ajaxEvent);
94 94
         $result  = $results->last() ?: $ajaxEvent->getResult();
Please login to merge, or discard this patch.
module/Core/src/Listener/LanguageRouteListener.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -215,8 +215,8 @@
 block discarded – undo
215 215
     }
216 216
 
217 217
     /**
218
-     * @param $response
219
-     * @param $uri
218
+     * @param \Zend\Stdlib\ResponseInterface $response
219
+     * @param string $uri
220 220
      *
221 221
      * @return mixed
222 222
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
         }
125 125
         
126 126
         $router = $e->getRouter();
127
-        $basePath=$router->getBaseUrl();
127
+        $basePath = $router->getBaseUrl();
128 128
         $match = [];
129 129
         
130
-        if (preg_match('~^' . $basePath . '/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
130
+        if (preg_match('~^'.$basePath.'/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
131 131
             /* It seems we have already a language in the URI
132 132
              * Now there are two possibilities:
133 133
              *
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         $options = $this->moduleOptions;
163 163
         // using default language if detect language is disabled
164
-        $lang = $options->isDetectLanguage() ? $this->detectLanguage($e):$options->getDefaultLanguage();
164
+        $lang = $options->isDetectLanguage() ? $this->detectLanguage($e) : $options->getDefaultLanguage();
165 165
         $langUri = rtrim("$basePath/$lang$origUri", '/');
166 166
         if ($router->match($request->setUri($langUri)) instanceof RouteMatch) {
167 167
             $e->stopPropagation(true);
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
         setlocale(
213 213
             LC_ALL,
214 214
             array(
215
-            $locale . ".utf8",
216
-            $locale . ".iso88591",
215
+            $locale.".utf8",
216
+            $locale.".iso88591",
217 217
             $locale,
218 218
             substr($locale, 0, 2),
219 219
             'de_DE.utf8',
Please login to merge, or discard this patch.
module/Core/src/Mail/HTMLTemplateMessage.php 2 patches
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @param  string $name
126 126
      * @param  mixed $value
127
-     * @return ViewModel
127
+     * @return HTMLTemplateMessage
128 128
      */
129 129
     public function setVariable($name, $value)
130 130
     {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      *
186 186
      * Resets the internal variable container to an empty container.
187 187
      *
188
-     * @return ViewModel
188
+     * @return HTMLTemplateMessage
189 189
      */
190 190
     public function clearVariables()
191 191
     {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
     /**
197 197
      *
198
-     * @param $template
198
+     * @param string $template
199 199
      *
200 200
      * @return self
201 201
      */
@@ -205,6 +205,9 @@  discard block
 block discarded – undo
205 205
         return $this;
206 206
     }
207 207
 
208
+    /**
209
+     * @return string
210
+     */
208 211
     public function getTemplate()
209 212
     {
210 213
         return $this->template;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             }
234 234
 
235 235
             /* @var \Zend\Mvc\View\Http\ViewManager $viewManager */
236
-            $viewManager  = $this->serviceManager->get('ViewManager');
236
+            $viewManager = $this->serviceManager->get('ViewManager');
237 237
             $resolver = $this->serviceManager->get('ViewResolver');
238 238
 
239 239
             /* @var \Zend\Mvc\MvcEvent $event */
@@ -241,13 +241,13 @@  discard block
 block discarded – undo
241 241
             $lang = $forceLanguage ?: $event->getRouteMatch()->getParam('lang');
242 242
 
243 243
 
244
-            if ($resolver->resolve($this->getTemplate() . '.' . $lang)) {
245
-                $viewModel->setTemplate($this->getTemplate() . '.' . $lang);
244
+            if ($resolver->resolve($this->getTemplate().'.'.$lang)) {
245
+                $viewModel->setTemplate($this->getTemplate().'.'.$lang);
246 246
             } else {
247 247
                 $viewModel->setTemplate($this->getTemplate());
248 248
             }
249 249
 
250
-            $view         = $viewManager->getView();
250
+            $view = $viewManager->getView();
251 251
 
252 252
             $viewModel->setVariables($this->getVariables());
253 253
             $viewModel->setVariable('mail', $this);
Please login to merge, or discard this patch.
module/Core/src/Mail/MailServiceConfig.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
 class MailServiceConfig extends Config
18 18
 {
19
+    /**
20
+     * @return \Zend\Mail\Transport\TransportInterface
21
+     */
19 22
     public function getTransport()
20 23
     {
21 24
         return isset($this->config['transport'])
@@ -40,6 +43,9 @@  discard block
 block discarded – undo
40 43
         return null;
41 44
     }
42 45
 
46
+    /**
47
+     * @return string
48
+     */
43 49
     public function getMailer()
44 50
     {
45 51
         return isset($this->data['mailer'])
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
                     $recipients->add($match[1]);
70 70
                 }
71 71
             } else {
72
-                trigger_error('invalid address format ("' . $recipient . '") in mails.develop.override_recipient', E_USER_WARNING);
72
+                trigger_error('invalid address format ("'.$recipient.'") in mails.develop.override_recipient', E_USER_WARNING);
73 73
             }
74 74
         }
75 75
         return $recipients;
Please login to merge, or discard this patch.
module/Core/src/Mail/TranslatorAwareMessage.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
      * </pre>
103 103
      *
104 104
      * @param string $subject
105
-     * @param bool|mixed $translate
105
+     * @param string $translate
106 106
      *
107 107
      * @since 0.19
108 108
      * @since 0.29 Add sprintf support for translation
Please login to merge, or discard this patch.
module/Core/src/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/Paginator/PaginatorFactoryAbstract.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,6 @@
 block discarded – undo
40 40
     }
41 41
     
42 42
     /**
43
-     * @param ContainerInterface $serviceLocator
44 43
      * @return mixed|Paginator
45 44
      */
46 45
     public function createService(ContainerInterface $container)
Please login to merge, or discard this patch.
module/Core/src/Repository/AbstractRepository.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     }
37 37
 
38 38
     /**
39
-     * @param $name
39
+     * @param string $name
40 40
      *
41 41
      * @return mixed
42 42
      */
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     /**
60 60
      * @param array $data
61 61
      *
62
-     * @return mixed
62
+     * @return EntityInterface
63 63
      */
64 64
     public function create(array $data = null, $persist = false)
65 65
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
         return $this;
121 121
     }
122 122
 
123
-    public function remove($entity, $flush=false)
123
+    public function remove($entity, $flush = false)
124 124
     {
125 125
         $this->checkEntityType($entity);
126 126
         $this->dm->remove($entity);
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.