Completed
Push — master ( 7d14cc...845882 )
by Silvan
02:51
created
core/console/Command.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function verbosePrint($message, $section = null)
36 36
     {
37 37
         if ($this->verbose) {
38
-            $this->output((!empty($section)) ? $section . ': ' . $message : $message);
38
+            $this->output((!empty($section)) ? $section.': '.$message : $message);
39 39
         }
40 40
     }
41 41
     
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $name = substr($name, 0, -(strlen($suffix)));
118 118
         }
119 119
     
120
-        return $name . $suffix;
120
+        return $name.$suffix;
121 121
     }
122 122
     
123 123
     /**
Please login to merge, or discard this patch.
core/helpers/Url.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
     public static function ensureHttp($url, $https = false)
105 105
     {
106 106
         if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
107
-            $url = ($https ? "https://" : "http://") . $url;
107
+            $url = ($https ? "https://" : "http://").$url;
108 108
         }
109 109
         
110 110
         return $url;
Please login to merge, or discard this patch.
core/traits/ErrorHandlerTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@
 block discarded – undo
114 114
             $_file = $exception->getFile();
115 115
             $_line = $exception->getLine();
116 116
         } elseif (is_string($exception)) {
117
-            $_message = 'exception string: ' . $exception;
117
+            $_message = 'exception string: '.$exception;
118 118
         } elseif (is_array($exception)) {
119
-            $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: ' . print_r($exception, true);
119
+            $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: '.print_r($exception, true);
120 120
             $_file = isset($exception['file']) ? $exception['file'] : __FILE__;
121 121
             $_line = isset($exception['line']) ? $exception['line'] : __LINE__;
122 122
         }
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
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function parse($value, $sub)
28 28
     {
29 29
         if (substr($value, 0, 2) == '//') {
30
-            $value = StringHelper::replaceFirst('//', Url::base(true) . '/', $value);
30
+            $value = StringHelper::replaceFirst('//', Url::base(true).'/', $value);
31 31
             $external = false;
32 32
         } else {
33 33
             $external = true;
Please login to merge, or discard this patch.
core/lazyload/LazyLoad.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,14 +70,14 @@
 block discarded – undo
70 70
      */
71 71
     public function run()
72 72
     {
73
-        $class = 'lazy-image ' . $this->extraClass;
73
+        $class = 'lazy-image '.$this->extraClass;
74 74
         
75 75
         if ($this->attributesOnly) {
76 76
             return "class=\"{$class}\" data-src=\"$this->src\" data-width=\"$this->width\" data-height=\"$this->height\" data-as-background=\"1\"";
77 77
         }
78 78
         
79 79
         $tag = Html::tag('img', '', ['class' => $class, 'data-src' => $this->src, 'data-width' => $this->width, 'data-height' => $this->height]);
80
-        $tag.= '<noscript><img class="'.$class.'" src="'.$this->src.'" /></noscript>';
80
+        $tag .= '<noscript><img class="'.$class.'" src="'.$this->src.'" /></noscript>';
81 81
         return $tag;
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
core/console/commands/BaseCrudController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
         }
75 75
         $rules = [];
76 76
         foreach ($types as $type => $columns) {
77
-            $rules[] = "[['" . implode("', '", $columns) . "'], '$type']";
77
+            $rules[] = "[['".implode("', '", $columns)."'], '$type']";
78 78
         }
79 79
         foreach ($lengths as $length => $columns) {
80
-            $rules[] = "[['" . implode("', '", $columns) . "'], 'string', 'max' => $length]";
80
+            $rules[] = "[['".implode("', '", $columns)."'], 'string', 'max' => $length]";
81 81
         }
82 82
         $db = $this->getDbConnection();
83 83
         // Unique indexes rules
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
                 if (!$this->isColumnAutoIncremental($table, $uniqueColumns)) {
89 89
                     $attributesCount = count($uniqueColumns);
90 90
                     if ($attributesCount === 1) {
91
-                        $rules[] = "[['" . $uniqueColumns[0] . "'], 'unique']";
91
+                        $rules[] = "[['".$uniqueColumns[0]."'], 'unique']";
92 92
                     } elseif ($attributesCount > 1) {
93 93
                         $labels = array_intersect_key($this->generateLabels($table), array_flip($uniqueColumns));
94 94
                         $lastLabel = array_pop($labels);
95 95
                         $columnsList = implode("', '", $uniqueColumns);
96
-                        $rules[] = "[['$columnsList'], 'unique', 'targetAttribute' => ['$columnsList'], 'message' => 'The combination of " . implode(', ', $labels) . " and $lastLabel has already been taken.']";
96
+                        $rules[] = "[['$columnsList'], 'unique', 'targetAttribute' => ['$columnsList'], 'message' => 'The combination of ".implode(', ', $labels)." and $lastLabel has already been taken.']";
97 97
                     }
98 98
                 }
99 99
             }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $fullTableName = $tableName;
137 137
         if (($pos = strrpos($tableName, '.')) !== false) {
138 138
             if (($useSchemaName === null && $this->useSchemaName) || $useSchemaName) {
139
-                $schemaName = substr($tableName, 0, $pos) . '_';
139
+                $schemaName = substr($tableName, 0, $pos).'_';
140 140
             }
141 141
             $tableName = substr($tableName, $pos + 1);
142 142
         }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             if (($pos = strrpos($pattern, '.')) !== false) {
150 150
                 $pattern = substr($pattern, $pos + 1);
151 151
             }
152
-            $patterns[] = '/^' . str_replace('*', '(\w+)', $pattern) . '$/';
152
+            $patterns[] = '/^'.str_replace('*', '(\w+)', $pattern).'$/';
153 153
         }
154 154
         $className = $tableName;
155 155
         foreach ($patterns as $pattern) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             } else {
194 194
                 $label = Inflector::camel2words($column->name);
195 195
                 if (!empty($label) && substr_compare($label, ' id', -3, 3, true) === 0) {
196
-                    $label = substr($label, 0, -3) . ' ID';
196
+                    $label = substr($label, 0, -3).' ID';
197 197
                 }
198 198
                 $labels[$column->name] = $label;
199 199
             }
Please login to merge, or discard this patch.
core/base/BaseBootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             // see if the module has a registerComponents method
101 101
             foreach ($module->registerComponents() as $componentId => $definition) {
102 102
                 if (!$app->has($componentId)) {
103
-                    Yii::trace('Register component ' . $componentId, __METHOD__);
103
+                    Yii::trace('Register component '.$componentId, __METHOD__);
104 104
                     $app->set($componentId, $definition);
105 105
                 }
106 106
             }
Please login to merge, or discard this patch.
core/console/commands/ModuleController.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -17,6 +17,7 @@
 block discarded – undo
17 17
     /**
18 18
      * Humanize the class name
19 19
      *
20
+     * @param string $name
20 21
      * @return string The humanized name.
21 22
      */
22 23
     public function humanizeName($name)
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -106,23 +106,23 @@  discard block
 block discarded – undo
106 106
             }
107 107
         }
108 108
         
109
-        $appModulesFolder = Yii::$app->basePath . DIRECTORY_SEPARATOR . 'modules';
110
-        $moduleFolder = $appModulesFolder . DIRECTORY_SEPARATOR . $moduleName;
109
+        $appModulesFolder = Yii::$app->basePath.DIRECTORY_SEPARATOR.'modules';
110
+        $moduleFolder = $appModulesFolder.DIRECTORY_SEPARATOR.$moduleName;
111 111
         
112 112
         if (file_exists($moduleFolder)) {
113
-            return $this->outputError("The folder " . $moduleFolder . " exists already.");
113
+            return $this->outputError("The folder ".$moduleFolder." exists already.");
114 114
         }
115 115
         
116 116
         $folders = [
117 117
             'basePath' => $moduleFolder,
118
-            'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin',
119
-            'adminAwsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'aws',
120
-            'adminMigrationPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'migrations',
121
-            'frontendPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend',
122
-            'frontendBlocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'blocks',
123
-            'frontendControllersPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'controllers',
124
-            'frontendViewsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'views',
125
-            'modelsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'models',
118
+            'adminPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin',
119
+            'adminAwsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'aws',
120
+            'adminMigrationPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'migrations',
121
+            'frontendPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend',
122
+            'frontendBlocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'blocks',
123
+            'frontendControllersPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'controllers',
124
+            'frontendViewsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'views',
125
+            'modelsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'models',
126 126
         ];
127 127
 
128 128
         $ns = 'app\\modules\\'.$moduleName;
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
         }
133 133
         
134 134
         $contents = [
135
-            $moduleFolder. DIRECTORY_SEPARATOR . 'README.md' => $this->renderReadme($folders, $moduleName, $ns),
136
-            $moduleFolder. DIRECTORY_SEPARATOR . 'admin/Module.php' => $this->renderAdmin($folders, $moduleName, $ns),
137
-            $moduleFolder. DIRECTORY_SEPARATOR . 'frontend/Module.php' => $this->renderFrontend($folders, $moduleName, $ns),
135
+            $moduleFolder.DIRECTORY_SEPARATOR.'README.md' => $this->renderReadme($folders, $moduleName, $ns),
136
+            $moduleFolder.DIRECTORY_SEPARATOR.'admin/Module.php' => $this->renderAdmin($folders, $moduleName, $ns),
137
+            $moduleFolder.DIRECTORY_SEPARATOR.'frontend/Module.php' => $this->renderFrontend($folders, $moduleName, $ns),
138 138
         ];
139 139
         
140 140
         foreach ($contents as $fileName => $content) {
Please login to merge, or discard this patch.
core/helpers/StringHelper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             return true;
72 72
         }
73 73
         
74
-        return ($value == (string)(float) $value);
74
+        return ($value == (string) (float) $value);
75 75
     }
76 76
     
77 77
     /**
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
      * @param string $search Search string to look for.
106 106
      * @param string $replace Replacement value for the first found occurrence.
107 107
      * @param string $subject The string you want to look up to replace the first element.
108
-     * @return mixed Replaced string
108
+     * @return string Replaced string
109 109
      */
110 110
     public static function replaceFirst($search, $replace, $subject)
111 111
     {
Please login to merge, or discard this patch.