@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * |
68 | 68 | * @param string $message The message you want to send to the error api server. |
69 | 69 | * @param string $file The you are currently send the message (use __FILE__) |
70 | - * @param string $line The line you want to submit (use __LINE__) |
|
70 | + * @param integer $line The line you want to submit (use __LINE__) |
|
71 | 71 | * @return bool|null |
72 | 72 | */ |
73 | 73 | public function transferMessage($message, $file = __FILE__, $line = __LINE__) |
@@ -105,6 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | /** |
107 | 107 | * @inheritdoc |
108 | + * @param \Exception $exception |
|
108 | 109 | */ |
109 | 110 | public function renderException($exception) |
110 | 111 | { |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | $_file = $exception->getFile(); |
177 | 177 | $_line = $exception->getLine(); |
178 | 178 | } elseif (is_string($exception)) { |
179 | - $_message = 'exception string: ' . $exception; |
|
179 | + $_message = 'exception string: '.$exception; |
|
180 | 180 | } elseif (is_array($exception)) { |
181 | - $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: ' . print_r($exception, true); |
|
181 | + $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: '.print_r($exception, true); |
|
182 | 182 | $_file = isset($exception['file']) ? $exception['file'] : __FILE__; |
183 | 183 | $_line = isset($exception['line']) ? $exception['line'] : __LINE__; |
184 | 184 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | |
250 | 250 | if (!empty($file)) { |
251 | 251 | try { |
252 | - $lineInArray = $line -1; |
|
252 | + $lineInArray = $line - 1; |
|
253 | 253 | // load file from path |
254 | 254 | $fileInfo = file($file, FILE_IGNORE_NEW_LINES); |
255 | 255 | // load file if false from real path |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | 'class' => isset($item['class']) ? $item['class'] : null, |
290 | 290 | // currently arguments wont be transmited due to large amount of informations based on base object |
291 | 291 | //'args' => isset($item['args']) ? ArrayHelper::coverSensitiveValues($item['args'], $this->sensitiveKeys) : [], |
292 | - ], function ($value) { |
|
292 | + ], function($value) { |
|
293 | 293 | return !empty($value); |
294 | 294 | }); |
295 | 295 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | { |
140 | 140 | $output = null; |
141 | 141 | foreach ($input as $row) { |
142 | - $output.= self::generateRow($row, $delimiter, '"'); |
|
142 | + $output .= self::generateRow($row, $delimiter, '"'); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | return $output; |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | protected static function generateRow(array $row, $delimiter, $enclose) |
158 | 158 | { |
159 | - array_walk($row, function (&$item) use ($enclose) { |
|
159 | + array_walk($row, function(&$item) use ($enclose) { |
|
160 | 160 | if (is_bool($item)) { |
161 | 161 | $item = (int) $item; |
162 | 162 | } elseif (is_null($item)) { |
@@ -171,6 +171,6 @@ discard block |
||
171 | 171 | ], $item).$enclose; |
172 | 172 | }); |
173 | 173 | |
174 | - return implode($delimiter, $row) . PHP_EOL; |
|
174 | + return implode($delimiter, $row).PHP_EOL; |
|
175 | 175 | } |
176 | 176 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @param array|QueryInterface $input |
38 | 38 | * @param array $keys Defines which keys should be packed into the generated xlsx. The defined keys does not change the sort behavior of the generated xls. |
39 | 39 | * @param bool $header |
40 | - * @return mixed |
|
40 | + * @return string |
|
41 | 41 | * @throws Exception |
42 | 42 | * @since 1.0.4 |
43 | 43 | */ |
@@ -73,7 +73,6 @@ discard block |
||
73 | 73 | * Generate content by rows. |
74 | 74 | * |
75 | 75 | * @param array $contentRows |
76 | - * @param string $delimiter |
|
77 | 76 | * @param array $keys |
78 | 77 | * @param bool $generateHeader |
79 | 78 | * @return array |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | $pos = strpos($viewPath, '/'); |
77 | - $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos) . '/views'); |
|
77 | + $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos).'/views'); |
|
78 | 78 | $this->pathMap[$rootPath] = $pathMap; |
79 | 79 | |
80 | 80 | $this->pathMap['@app/views'] = $pathMap; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function getLayoutPath() |
111 | 111 | { |
112 | - return $this->viewPath . '/' . self::LAYOUTS_PATH; |
|
112 | + return $this->viewPath.'/'.self::LAYOUTS_PATH; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -123,7 +123,7 @@ |
||
123 | 123 | { |
124 | 124 | if (Yii::$app->request->isPost) { |
125 | 125 | if ($this->getElapsedProcessTime() < $this->delay) { |
126 | - throw new WhitelistedException("Robots Filter has detected an invalid Request: " . VarDumper::export(ArrayHelper::coverSensitiveValues(Yii::$app->request->post()))); |
|
126 | + throw new WhitelistedException("Robots Filter has detected an invalid Request: ".VarDumper::export(ArrayHelper::coverSensitiveValues(Yii::$app->request->post()))); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 |
@@ -140,6 +140,6 @@ |
||
140 | 140 | */ |
141 | 141 | public function getViewPath() |
142 | 142 | { |
143 | - return $this->getBasePath() . '/views'; |
|
143 | + return $this->getBasePath().'/views'; |
|
144 | 144 | } |
145 | 145 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | if ($throwException) { |
61 | - throw new Exception("The given object must be an instance of: " . implode(",", $haystack)); |
|
61 | + throw new Exception("The given object must be an instance of: ".implode(",", $haystack)); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return false; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | } catch (InvalidParamException $e) { |
228 | 228 | }; |
229 | 229 | |
230 | - $staticPath = $module::staticBasePath() . DIRECTORY_SEPARATOR . 'controllers'; |
|
230 | + $staticPath = $module::staticBasePath().DIRECTORY_SEPARATOR.'controllers'; |
|
231 | 231 | if (is_dir($staticPath)) { |
232 | 232 | foreach (FileHelper::findFiles($staticPath) as $file) { |
233 | 233 | $files[self::fileToName($staticPath, $file)] = $file; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | { |
58 | 58 | if (StringHelper::startsWith($value, '//')) { |
59 | 59 | // its an absolute url |
60 | - $value = StringHelper::replaceFirst('//', Url::base(true) . '/', $value); |
|
60 | + $value = StringHelper::replaceFirst('//', Url::base(true).'/', $value); |
|
61 | 61 | $external = false; |
62 | 62 | } elseif (StringHelper::startsWith($value, '/')) { |
63 | 63 | // its a relative url, keep it like this |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | { |
41 | 41 | if ($this->verbose) { |
42 | 42 | $message = $this->printableMessage($message); |
43 | - $this->output(!empty($section) ? $section . ': ' . $message : $message); |
|
43 | + $this->output(!empty($section) ? $section.': '.$message : $message); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $name = substr($name, 0, -(strlen($suffix))); |
119 | 119 | } |
120 | 120 | |
121 | - return $name . $suffix; |
|
121 | + return $name.$suffix; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -188,7 +188,7 @@ |
||
188 | 188 | * |
189 | 189 | * @param string $id The id of the component |
190 | 190 | * @param string|array $config The configuration for the given module. If a string is given this will be taken as `class` property. |
191 | - * @param string $runtime The runtime for the component: all, web or console |
|
191 | + * @param integer $runtime The runtime for the component: all, web or console |
|
192 | 192 | * @return ConfigDefinition |
193 | 193 | */ |
194 | 194 | public function component($id, $config, $runtime = self::RUNTIME_ALL) |