Completed
Push — master ( 0bff19...1b573a )
by Basil
02:06
created
core/web/Element.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -255,6 +255,6 @@
 block discarded – undo
255 255
     {
256 256
         $view = new View();
257 257
         $view->autoRegisterCsrf = false;
258
-        return $view->renderPhpFile(rtrim($this->getFolder(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . FileHelper::ensureExtension($file, 'php'), $args);
258
+        return $view->renderPhpFile(rtrim($this->getFolder(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.FileHelper::ensureExtension($file, 'php'), $args);
259 259
     }
260 260
 }
Please login to merge, or discard this patch.
core/lazyload/LazyLoad.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function run()
152 152
     {
153
-        $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image') . ' ' . $this->extraClass;
153
+        $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image').' '.$this->extraClass;
154 154
 
155 155
         if ($this->placeholderSrc && $this->placeholderAsBase64) {
156
-            $this->placeholderSrc = 'data:image/jpg;base64,' . base64_encode(file_get_contents($this->placeholderSrc));
156
+            $this->placeholderSrc = 'data:image/jpg;base64,'.base64_encode(file_get_contents($this->placeholderSrc));
157 157
         }
158 158
 
159 159
         if ($this->attributesOnly && !$this->placeholderSrc) {
@@ -161,15 +161,15 @@  discard block
 block discarded – undo
161 161
         }
162 162
 
163 163
         if ($this->placeholderSrc) {
164
-            $tag = '<div class="' . $class . '">';
164
+            $tag = '<div class="'.$class.'">';
165 165
             $tag .= Html::tag('img', '', ['class' => 'lazy-image lazyimage', 'data-src' => $this->src]);
166 166
             $tag .= Html::tag('img', '', ['class' => 'lazyimage-placeholder-image', 'src' => $this->placeholderSrc]);
167
-            $tag .= '<noscript><img class="lazyimage-image" src="' . $this->src . '" /></noscript>';
167
+            $tag .= '<noscript><img class="lazyimage-image" src="'.$this->src.'" /></noscript>';
168 168
             $tag .= '</div>';
169 169
         } else {
170 170
             $tag = Html::tag('img', '', ['class' => $class, 'data-src' => $this->src, 'data-width' => $this->width, 'data-height' => $this->height]);
171 171
             if ($this->width && $this->height) {
172
-                $tag .= '<div class="lazy-placeholder ' . $class .'"><div style="display: block; height: 0px; padding-bottom: ' . ($this->height / $this->width) * 100 . '%;"></div><div class="loader"></div></div>';
172
+                $tag .= '<div class="lazy-placeholder '.$class.'"><div style="display: block; height: 0px; padding-bottom: '.($this->height / $this->width) * 100.'%;"></div><div class="loader"></div></div>';
173 173
             }
174 174
             $tag .= '<noscript><img class="'.$class.'" src="'.$this->src.'" /></noscript>';
175 175
         }
Please login to merge, or discard this patch.
core/web/jsonld/EventTrait.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     /**
170 170
      * The time admission will commence.
171 171
      *
172
-     * @param DateTime $doorTime
172
+     * @param DateTimeValue $doorTime
173 173
      * @return static
174 174
      */
175 175
     public function setDoorTime(DateTimeValue $doorTime)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     /**
192 192
      * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format.
193 193
      *
194
-     * @param Duration $duration
194
+     * @param DurationValue $duration
195 195
      * @return static
196 196
      */
197 197
     public function setDuration(DurationValue $duration)
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     /**
214 214
      * The end date and time of the item (in ISO 8601 date format).
215 215
      *
216
-     * @param Date|DateTime $endDate
216
+     * @param DateTimeValue $endDate
217 217
      * @return static
218 218
      */
219 219
     public function setEndDate(DateTimeValue $endDate)
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      * Please use one of the language codes from the IETF BCP 47 standard. See also availableLanguage.
262 262
      * Supersedes language.
263 263
      *
264
-     * @param Language|Text $inLanguage
264
+     * @param LanguageValue $inLanguage
265 265
      * @return static
266 266
      */
267 267
     public function setInLanguage(LanguageValue $inLanguage)
Please login to merge, or discard this patch.
core/base/ModuleReflection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         
217 217
         return [
218 218
             'module' => $this->module->id,
219
-            'route' => $this->module->id . '/' . $request['route'],
219
+            'route' => $this->module->id.'/'.$request['route'],
220 220
             'params' => $request['originalArgs'],
221 221
         ];
222 222
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             throw new NotFoundHttpException(sprintf("Unable to create controller '%s' for module '%s'.", $requestRoute['route'], $this->module->id));
238 238
         }
239 239
         
240
-        Yii::debug('LUYA module run module "'.$this->module->id.'" route ' . $requestRoute['route'], __METHOD__);
240
+        Yii::debug('LUYA module run module "'.$this->module->id.'" route '.$requestRoute['route'], __METHOD__);
241 241
         
242 242
         $this->controller = $controller[0];
243 243
         $originalController = Yii::$app->controller;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
          *
249 249
          * @see https://github.com/luyadev/luya/issues/1730
250 250
          */
251
-        $this->controller->on(Controller::EVENT_BEFORE_ACTION, function ($event) {
251
+        $this->controller->on(Controller::EVENT_BEFORE_ACTION, function($event) {
252 252
             Yii::$app->controller = $this->controller;
253 253
         });
254 254
         /**
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
          *
257 257
          * @see https://github.com/luyadev/luya/issues/1768
258 258
          */
259
-        $this->controller->on(Controller::EVENT_AFTER_ACTION, function ($event) use ($originalController) {
259
+        $this->controller->on(Controller::EVENT_AFTER_ACTION, function($event) use ($originalController) {
260 260
             Yii::$app->controller = $originalController;
261 261
         });
262 262
         
Please login to merge, or discard this patch.
core/web/EmailLink.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     /**
50 50
      * Getter method for the e-mail.
51 51
      *
52
-     * @return string|boolean Returns the e-mail from the setter method, if mail is not valid false is returned.
52
+     * @return string|false Returns the e-mail from the setter method, if mail is not valid false is returned.
53 53
      */
54 54
     public function getEmail()
55 55
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      */
62 62
     public function getHref()
63 63
     {
64
-        return empty($this->getEmail()) ? null : 'mailto:' . $this->getEmail();
64
+        return empty($this->getEmail()) ? null : 'mailto:'.$this->getEmail();
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
core/tag/tags/LinkTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
core/helpers/ObjectHelper.php 1 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
         }
49 49
         
50 50
         if ($throwException) {
51
-            throw new Exception("The given object must be an instance of: " . implode(",", $haystack));
51
+            throw new Exception("The given object must be an instance of: ".implode(",", $haystack));
52 52
         }
53 53
         
54 54
         return false;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             
219 219
         };
220 220
 
221
-        $staticPath = $module::staticBasePath() . DIRECTORY_SEPARATOR . 'controllers';
221
+        $staticPath = $module::staticBasePath().DIRECTORY_SEPARATOR.'controllers';
222 222
         if (is_dir($staticPath)) {
223 223
             foreach (FileHelper::findFiles($staticPath) as $file) {
224 224
                 $files[self::fileToName($staticPath, $file)] = $file;
Please login to merge, or discard this patch.
core/console/commands/ThemeController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use luya\theme\ThemeConfig;
8 8
 use Yii;
9 9
 use yii\helpers\Console;
10
-use yii\helpers\Inflector;
11 10
 
12 11
 /**
13 12
  * Command to create a new LUYA theme.
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     
48 48
         $availableModules = implode(', ', array_column(Yii::$app->getFrontendModules(), 'id'));
49 49
         $themeLocation = $this->prompt("Enter the theme location where to generate (as path alias e.g. app, $availableModules):", ['default' => 'app']);
50
-        $themeLocation = '@' . ltrim($themeLocation, '@');
50
+        $themeLocation = '@'.ltrim($themeLocation, '@');
51 51
     
52 52
         preg_match("#^@[A-z]+#", $themeLocation, $newThemeLocation);
53 53
     
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
             }
60 60
         }
61 61
         
62
-        $basePath = $themeLocation . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $themeName;
62
+        $basePath = $themeLocation.DIRECTORY_SEPARATOR.'themes'.DIRECTORY_SEPARATOR.$themeName;
63 63
         $themeFolder = Yii::getAlias($basePath);
64 64
     
65 65
         if (file_exists($themeFolder)) {
66
-            return $this->outputError("The folder " . $themeFolder . " exists already.");
66
+            return $this->outputError("The folder ".$themeFolder." exists already.");
67 67
         }
68 68
     
69
-        $this->outputInfo("Theme path alias: " . $basePath);
70
-        $this->outputInfo("Theme real path: " . $themeFolder);
69
+        $this->outputInfo("Theme path alias: ".$basePath);
70
+        $this->outputInfo("Theme real path: ".$themeFolder);
71 71
         if (!$this->confirm("Do you want continue?")) {
72 72
             return $this->outputError('Abort by user.');
73 73
         }
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
         ];
82 82
 
83 83
         foreach ($folders as $folder) {
84
-            FileHelper::createDirectory($themeFolder . DIRECTORY_SEPARATOR . $folder);
84
+            FileHelper::createDirectory($themeFolder.DIRECTORY_SEPARATOR.$folder);
85 85
         }
86 86
         
87 87
         $contents = [
88
-            $themeFolder. DIRECTORY_SEPARATOR . 'theme.json' => $this->renderJson($basePath, $themeName),
88
+            $themeFolder.DIRECTORY_SEPARATOR.'theme.json' => $this->renderJson($basePath, $themeName),
89 89
         ];
90 90
         
91 91
         foreach ($contents as $fileName => $content) {
Please login to merge, or discard this patch.
core/traits/ErrorHandlerTrait.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
105 105
     
106 106
     /**
107 107
      * @inheritdoc
108
+     * @param \Exception $exception
108 109
      */
109 110
     public function renderException($exception)
110 111
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
             $_file = $exception->getFile();
149 149
             $_line = $exception->getLine();
150 150
         } elseif (is_string($exception)) {
151
-            $_message = 'exception string: ' . $exception;
151
+            $_message = 'exception string: '.$exception;
152 152
         } elseif (is_array($exception)) {
153
-            $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: ' . print_r($exception, true);
153
+            $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: '.print_r($exception, true);
154 154
             $_file = isset($exception['file']) ? $exception['file'] : __FILE__;
155 155
             $_line = isset($exception['line']) ? $exception['line'] : __LINE__;
156 156
         }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
         if (!empty($file)) {
217 217
             try {
218
-                $lineInArray = $line -1;
218
+                $lineInArray = $line - 1;
219 219
                 // load file from path
220 220
                 $fileInfo = file($file, FILE_IGNORE_NEW_LINES);
221 221
                 // load file if false from real path
Please login to merge, or discard this patch.