Completed
Pull Request — develop (#508)
by ANTHONIUS
04:00
created
module/Install/config/module.config.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	    'factories' => [
26 26
 		    'mvctranslator' => \Zend\Mvc\I18n\TranslatorFactory::class,
27 27
 		    'FilterManager' => \Zend\Filter\FilterPluginManagerFactory::class,
28
-            'Tracy' => [\Core\Service\Tracy::class,'factory'],
28
+            'Tracy' => [\Core\Service\Tracy::class, 'factory'],
29 29
             'Core/Options' => 'Core\Factory\ModuleOptionsFactory',
30 30
         ],
31 31
         'abstract_factories' => [
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
         'exception_template' => 'error/index',
96 96
         // Map template to files. Speeds up the lookup through the template stack.
97 97
         'template_map' => [
98
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
99
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
98
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
99
+            'error/index' => __DIR__.'/../view/error/index.phtml',
100 100
         ],
101 101
         // Where to look for view templates not mapped above
102 102
         'template_path_stack' => [
103
-            __DIR__ . '/../view',
103
+            __DIR__.'/../view',
104 104
         ],
105 105
     ],
106 106
 
@@ -114,13 +114,13 @@  discard block
 block discarded – undo
114 114
         'translation_file_patterns' => [
115 115
             [
116 116
                 'type' => 'gettext',
117
-                'base_dir' => __DIR__ . '/../language',
117
+                'base_dir' => __DIR__.'/../language',
118 118
                 'pattern' => '%s.mo',
119 119
                 'text_domain' => 'Install',
120 120
             ],
121 121
             [
122 122
                 'type'     => 'phparray',
123
-                'base_dir' => __DIR__ . '/../../Core/language',
123
+                'base_dir' => __DIR__.'/../../Core/language',
124 124
                 'pattern' => 'Zend_Validate.%s.php',
125 125
                 'text_domain' => 'default',
126 126
             ],
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 return [
11
-	'tracy' => [
12
-		'enabled' => true, // flag whether to load tracy at all
13
-		'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array
14
-		'bar' => false, // bool = enabled|Toggle nette diagnostics bar.
15
-		'strict' => true, // bool = cause immediate death|int = matched against error severity
16
-		'log' => __DIR__.'/../../../var/log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
17
-		'email' => null, // in production mode notifies the recipient
18
-		'email_snooze' => 900 // interval for sending email in seconds
19
-	],
11
+    'tracy' => [
12
+        'enabled' => true, // flag whether to load tracy at all
13
+        'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array
14
+        'bar' => false, // bool = enabled|Toggle nette diagnostics bar.
15
+        'strict' => true, // bool = cause immediate death|int = matched against error severity
16
+        'log' => __DIR__.'/../../../var/log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
17
+        'email' => null, // in production mode notifies the recipient
18
+        'email_snooze' => 900 // interval for sending email in seconds
19
+    ],
20 20
 
21 21
     'doctrine' => [
22 22
         'driver' => [
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
         'invokables' => [
36 36
             'Install/Listener/LanguageSetter' => 'Install\Listener\LanguageSetter',
37 37
         ],
38
-	    'factories' => [
39
-		    'mvctranslator' => \Zend\Mvc\I18n\TranslatorFactory::class,
40
-		    'FilterManager' => \Zend\Filter\FilterPluginManagerFactory::class,
38
+        'factories' => [
39
+            'mvctranslator' => \Zend\Mvc\I18n\TranslatorFactory::class,
40
+            'FilterManager' => \Zend\Filter\FilterPluginManagerFactory::class,
41 41
             'Tracy' => [\Core\Service\Tracy::class,'factory'],
42 42
             'Core/Options' => 'Core\Factory\ModuleOptionsFactory',
43 43
         ],
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
     ],
64 64
 
65 65
     'controllers' => [
66
-	    'abstract_factories' => [
67
-	    	\Install\Factory\Controller\LazyControllerFactory::class
68
-	    ],
66
+        'abstract_factories' => [
67
+            \Install\Factory\Controller\LazyControllerFactory::class
68
+        ],
69 69
     ],
70 70
 
71 71
     'controller_plugins' => [
Please login to merge, or discard this patch.
module/Core/src/View/Helper/ContactLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $attr       = array();
70 70
         
71 71
         foreach ($attributes as $name => $value) {
72
-            $attr[] = $escape($name) . (strlen($value) ? ('="' . $escapeAttr($value) . '"') : '');
72
+            $attr[] = $escape($name).(strlen($value) ? ('="'.$escapeAttr($value).'"') : '');
73 73
         }
74 74
         
75 75
         return implode(' ', $attr);
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/Plugin/UserSwitcher.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * Switch to another user.
121 121
      *
122
-     * @param string|UserInterface $id user id of the user to switch to.
122
+     * @param string $id user id of the user to switch to.
123 123
      * @param array $params Additional parameters to store in the session container.
124 124
      *
125 125
      * @return bool
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     /**
223 223
      * Gets the session container.
224 224
      *
225
-     * @return Container
225
+     * @return string
226 226
      */
227 227
     private function getSessionContainer()
228 228
     {
Please login to merge, or discard this patch.
module/Auth/src/Auth/Service/Register.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     }
155 155
 
156 156
     /**
157
-     * @param $user
157
+     * @param \Auth\Entity\UserInterface $user
158 158
      * @return $this
159 159
      */
160 160
     protected function setUser($user)
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     /**
248 248
      * Email-Address
249 249
      * @param $email string
250
-     * @return mixed
250
+     * @return Register
251 251
      */
252 252
     protected function setEmail($email)
253 253
     {
Please login to merge, or discard this patch.
module/Behat/src/CoreContext.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,6 @@  discard block
 block discarded – undo
104 104
     
105 105
     /**
106 106
      * @param $name
107
-     * @param array $params
108 107
      *
109 108
      * @return string
110 109
      */
@@ -115,6 +114,7 @@  discard block
 block discarded – undo
115 114
 
116 115
     /**
117 116
      * @When /^I hover over the element "([^"]*)"$/
117
+     * @param string $locator
118 118
      */
119 119
     public function iHoverOverTheElement($locator)
120 120
     {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     }
260 260
     
261 261
     /**
262
-     * @param $locator
262
+     * @param string $locator
263 263
      * @param string $selector
264 264
      *
265 265
      * @return \Behat\Mink\Element\NodeElement|mixed|null
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     private $config;
31 31
 
32
-    public function __construct($config=null)
32
+    public function __construct($config = null)
33 33
     {
34 34
         umask(0000);
35 35
         if (is_null($config)) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     public function iSetMainWindowName()
180 180
     {
181 181
         $window_name = 'main_window';
182
-        $script = 'window.name = "' . $window_name . '"';
182
+        $script = 'window.name = "'.$window_name.'"';
183 183
         $this->getSession()->executeScript($script);
184 184
     }
185 185
     
@@ -238,14 +238,14 @@  discard block
 block discarded – undo
238 238
                 break;
239 239
             
240 240
             default:
241
-                throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath');
241
+                throw new \Exception(__METHOD__.' Couldn\'t find selector: '.$selector.' - Allowed selectors: #id, .className, //xpath');
242 242
                 break;
243 243
         }
244 244
         
245 245
         try {
246 246
             $this->getSession()->executeScript($function);
247 247
         } catch (\Exception $e) {
248
-            throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"');
248
+            throw new \Exception(__METHOD__.' failed'.' Message: for this locator:"'.$selector.'"');
249 249
         }
250 250
     }
251 251
     
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      *
266 266
      * @return \Behat\Mink\Element\NodeElement|mixed|null
267 267
      */
268
-    public function getElement($locator, $selector='css')
268
+    public function getElement($locator, $selector = 'css')
269 269
     {
270 270
         $page = $this->minkContext->getSession()->getPage();
271 271
         $element = $page->find('css', $locator);
@@ -299,12 +299,12 @@  discard block
 block discarded – undo
299 299
         $session = $this->getSession();
300 300
         $element = $session->getPage()->find(
301 301
             'xpath',
302
-            $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]')
302
+            $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'.$text.'"]')
303 303
         );
304 304
         if (null === $element) {
305 305
             $element = $session->getPage()->find(
306 306
                 'named',
307
-                array('id',$text)
307
+                array('id', $text)
308 308
             );
309 309
         }
310 310
         if (null === $element) {
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/FileCollectionUploadHydrator.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     protected $elementName;
22 22
 
23 23
     /**
24
-     * @param $name
25
-     * @param $strategy
24
+     * @param string $name
25
+     * @param Strategy\FileUploadStrategy $strategy
26 26
      */
27 27
     public function __construct($name, $strategy)
28 28
     {
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/JsonEntityHydrator.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@
 block discarded – undo
29 29
     {
30 30
     }
31 31
 
32
+    /**
33
+     * @param EntityHydrator $hydrator
34
+     */
32 35
     public function injectHydrator($hydrator)
33 36
     {
34 37
         if (empty($hydrator) || !$hydrator instanceof AbstractHydrator) {
Please login to merge, or discard this patch.
module/Core/src/Yawik.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * Get required modules for Yawik
46 46
      *
47
-     * @return array
47
+     * @return string[]
48 48
      */
49 49
     public static function getRequiredModules()
50 50
     {
@@ -89,7 +89,6 @@  discard block
 block discarded – undo
89 89
      * Run application
90 90
      * @param mixed|array $appConfig
91 91
      *
92
-     * @param bool $run
93 92
      * @return bool|ZendApplication
94 93
      */
95 94
     public static function initApplication($appConfig = null)
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
             $dotenv = new Dotenv();
36 36
             $dotenv->load($env);
37 37
         }
38
-        $isVendor = strpos(__FILE__, 'modules')!==false || strpos(__FILE__, 'vendor') !== false;
39
-        $version = getenv('TRAVIS') || $isVendor ? "undefined":exec('git describe');
40
-        $branch = getenv('TRAVIS') || $isVendor ? "undefined":exec('git rev-parse --abbrev-ref HEAD', $output, $retVal);
38
+        $isVendor = strpos(__FILE__, 'modules') !== false || strpos(__FILE__, 'vendor') !== false;
39
+        $version = getenv('TRAVIS') || $isVendor ? "undefined" : exec('git describe');
40
+        $branch = getenv('TRAVIS') || $isVendor ? "undefined" : exec('git rev-parse --abbrev-ref HEAD', $output, $retVal);
41 41
         static::$VERSION = $version.'['.$branch.']';
42 42
     }
43 43
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @param array $loadModules
78 78
      * @return array
79 79
      */
80
-    public static function generateModuleConfiguration($loadModules=[])
80
+    public static function generateModuleConfiguration($loadModules = [])
81 81
     {
82 82
         return ArrayUtils::merge(
83 83
             static::getRequiredModules(),
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $file = null;
105 105
             if (is_file($test = getcwd().'/test/config/config.php')) {
106 106
                 $file = $test;
107
-            } elseif (is_file($test = getcwd(). '/config/config.php')) {
107
+            } elseif (is_file($test = getcwd().'/config/config.php')) {
108 108
                 $file = $test;
109 109
             } elseif (is_file($test = __DIR__.'/../config/config.php')) {
110 110
                 $file = $test;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         return ZendApplication::init($appConfig);
129 129
     }
130 130
 
131
-    public static function runApplication($appConfig=null)
131
+    public static function runApplication($appConfig = null)
132 132
     {
133 133
         ini_set('display_errors', true);
134 134
         ini_set('error_reporting', E_ALL | E_STRICT);
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
 
144 144
         if (php_sapi_name() == 'cli-server') {
145 145
             $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1));
146
-            $route = isset($parseUrl['path']) ? $parseUrl['path']:null;
147
-            if (is_file(__DIR__ . '/' . $route)) {
146
+            $route = isset($parseUrl['path']) ? $parseUrl['path'] : null;
147
+            if (is_file(__DIR__.'/'.$route)) {
148 148
                 if (substr($route, -4) == ".php") {
149
-                    require __DIR__ . '/' . $route;     // Include requested script files
149
+                    require __DIR__.'/'.$route; // Include requested script files
150 150
                     exit;
151 151
                 }
152
-                return false;           // Serve file as is
152
+                return false; // Serve file as is
153 153
             } else {                    // Fallback to index.php
154
-                $_GET["q"] = $route;    // Try to emulate the behaviour of a .htaccess here.
154
+                $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here.
155 155
             }
156 156
         }
157 157
 
Please login to merge, or discard this patch.
module/Jobs/src/Acl/WriteAssertion.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@
 block discarded – undo
52 52
     /**
53 53
      * Returns true, if the user has write access to the job granted from the organization.
54 54
      *
55
-     * @param RoleInterface $role This must be a UserInterface instance
56
-     * @param ResourceInterface $resource This must be a JobInterface instance
55
+     * @param UserInterface $role This must be a UserInterface instance
56
+     * @param JobInterface $resource This must be a JobInterface instance
57 57
      *
58 58
      * @return bool
59 59
      */
Please login to merge, or discard this patch.