Completed
Push — master ( 76e6f8...100486 )
by Basil
07:11
created
envs/dev/properties/TestProperty.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace app\properties;
4 4
 
5
-use Yii;
6
-
7 5
 class TestProperty extends \admin\base\Property
8 6
 {
9 7
     public function init()
Please login to merge, or discard this patch.
modules/crawler/classes/CrawlPage.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Goutte\Client;
6 6
 use yii\base\InvalidConfigException;
7 7
 use yii\base\yii\base;
8
-use luya\helpers\Url;
9 8
 
10 9
 class CrawlPage extends \yii\base\Object
11 10
 {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         
33 33
         $info = parse_url($this->baseUrl);
34 34
         
35
-        $this->baseHost = $info['scheme'] . '://' . $info['host'];
35
+        $this->baseHost = $info['scheme'].'://'.$info['host'];
36 36
     }
37 37
 
38 38
     public function flush()
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     
60 60
     public function getLinks()
61 61
     {
62
-        $links = $this->getCrawler()->filterXPath('//a')->each(function ($node, $i) {
62
+        $links = $this->getCrawler()->filterXPath('//a')->each(function($node, $i) {
63 63
             return $node->extract(array('_text', 'href'))[0];
64 64
         });
65 65
         foreach ($links as $key => $item) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             if (!isset($url['host']) || !isset($url['scheme'])) {
69 69
                 $base = $this->baseHost;
70 70
             } else {
71
-                $base = $url['scheme'] . '//' . $url['host'];
71
+                $base = $url['scheme'].'//'.$url['host'];
72 72
             }
73 73
             
74 74
             $path = null;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 $path = $url['path'];
78 78
             }
79 79
             
80
-            $url = rtrim($base, "/") . "/" . ltrim($path, "/");
80
+            $url = rtrim($base, "/")."/".ltrim($path, "/");
81 81
             
82 82
 
83 83
             $links[$key][1] = http_build_url($url, [
Please login to merge, or discard this patch.
core/helpers/ArrayHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         
30 30
         foreach ($array as $k => $v) {
31 31
             if (is_numeric($v)) {
32
-                $return[$k] = (int)$v;
32
+                $return[$k] = (int) $v;
33 33
             } elseif (is_array($v)) {
34 34
                 $return[$k] = self::typeCast($v);
35 35
             } else {
Please login to merge, or discard this patch.
core/web/UrlManager.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         if ($route === $composition) {
49 49
             $parsedRequest[0] = false;
50 50
         // now see if the composition (+1 as we add add trailing slash at the end) matches the cutted route request part, if so its composition prefix, remove it.
51
-        } elseif (substr($route, 0, $length+1) == $composition.'/') {
51
+        } elseif (substr($route, 0, $length + 1) == $composition.'/') {
52 52
             $parsedRequest[0] = substr($parsedRequest[0], $length);
53 53
         }
54 54
         // fix broken request urls
@@ -211,10 +211,10 @@  discard block
 block discarded – undo
211 211
         $params = (array) $params;
212 212
         $url = $this->internalCreateUrl($params);
213 213
         if (strpos($url, '://') === false) {
214
-            $url = $this->getHostInfo() . $url;
214
+            $url = $this->getHostInfo().$url;
215 215
         }
216 216
         if (is_string($scheme) && ($pos = strpos($url, '://')) !== false) {
217
-            $url = $scheme . substr($url, $pos);
217
+            $url = $scheme.substr($url, $pos);
218 218
         }
219 219
         return $url;
220 220
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Goutte\Client;
6 6
 use yii\base\InvalidConfigException;
7 7
 use yii\base\yii\base;
8
-use luya\helpers\Url;
9 8
 
10 9
 class CrawlPage extends \yii\base\Object
11 10
 {
Please login to merge, or discard this patch.
core/web/Twig.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,38 +30,38 @@  discard block
 block discarded – undo
30 30
     public function getFunctions()
31 31
     {
32 32
         return [
33
-            'menuFindAll' => function ($container, $parentNavId) {
33
+            'menuFindAll' => function($container, $parentNavId) {
34 34
                 return Yii::$app->menu->findAll(['container' => $container, 'parent_nav_id' => $parentNavId]);
35 35
             },
36
-            'menuFindOne' => function ($id) {
36
+            'menuFindOne' => function($id) {
37 37
                 return Yii::$app->menu->findOne(['id' => $id]);
38 38
             },
39
-            'menuCurrent' => function () {
39
+            'menuCurrent' => function() {
40 40
                 return Yii::$app->menu->current;
41 41
             },
42
-            'menuCurrentLevel' => function ($level) {
42
+            'menuCurrentLevel' => function($level) {
43 43
                 return Yii::$app->menu->getLevelCurrent($level);
44 44
             },
45
-            'menuLevelContainer' => function ($level) {
45
+            'menuLevelContainer' => function($level) {
46 46
                 return Yii::$app->menu->getLevelContainer($level);
47 47
             },
48
-            'asset' => function ($name) {
48
+            'asset' => function($name) {
49 49
                 return Yii::$app->getAssetManager()->getBundle($name);
50 50
             },
51
-            'filterApply' => function ($imageId, $filterIdentifier) {
51
+            'filterApply' => function($imageId, $filterIdentifier) {
52 52
                 return Yii::$app->storage->getImage($imageId)->applyFilter($filterIdentifier);
53 53
             },
54
-            'image' => function ($imageId) {
54
+            'image' => function($imageId) {
55 55
                 return Yii::$app->storage->getImage($imageId);
56 56
             },
57
-            'element' => function () {
57
+            'element' => function() {
58 58
                 $args = func_get_args();
59 59
                 $method = $args[0];
60 60
                 unset($args[0]);
61 61
 
62 62
                 return Yii::$app->element->run($method, $args);
63 63
             },
64
-            't' => function () {
64
+            't' => function() {
65 65
                 $args = func_get_args();
66 66
 
67 67
                 return call_user_func_array(['Yii', 't'], $args);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $twig->addFunction(new Twig_SimpleFunction($name, $lambda));
80 80
         }
81 81
         
82
-        $twig->addFilter(new Twig_SimpleFilter('strftime', function ($timestamp, $format) {
82
+        $twig->addFilter(new Twig_SimpleFilter('strftime', function($timestamp, $format) {
83 83
             if (is_numeric($timestamp)) {
84 84
                 return strftime($format, $timestamp);
85 85
             }
Please login to merge, or discard this patch.
core/console/Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
             $name = substr($name, 0, -(strlen($suffix)));
76 76
         }
77 77
     
78
-        return $name . $suffix;
78
+        return $name.$suffix;
79 79
     }
80 80
     
81 81
     /**
Please login to merge, or discard this patch.
core/console/commands/MigrateController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     protected function createMigration($class)
55 55
     {
56
-        $orig = $this->migrationPath . DIRECTORY_SEPARATOR . $class . '.php';
56
+        $orig = $this->migrationPath.DIRECTORY_SEPARATOR.$class.'.php';
57 57
         
58 58
         if (file_exists($orig)) {
59 59
             require_once $file;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         
72 72
         $module = $this->prompt("Could not find migration class. Please enter the module name who belongs to '$class.':");
73 73
         $dir = $this->getModuleMigrationDirectorie($module);
74
-        $file = $dir . DIRECTORY_SEPARATOR . $class . '.php';
74
+        $file = $dir.DIRECTORY_SEPARATOR.$class.'.php';
75 75
         if (file_exists($file)) {
76 76
             require_once $file;
77 77
             return new $class();
Please login to merge, or discard this patch.
core/console/commands/HealthController.php 1 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
         @chdir(Yii::getAlias('@app'));
38 38
 
39
-        $this->output('The directory the health commands is applying to: ' . Yii::getAlias('@app'));
39
+        $this->output('The directory the health commands is applying to: '.Yii::getAlias('@app'));
40 40
         
41 41
         foreach ($this->folders as $folder => $writable) {
42 42
             if (!file_exists($folder)) {
Please login to merge, or discard this patch.
core/console/commands/BlockController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
     private function getExtraVarDef($type, $varName, $func)
60 60
     {
61 61
         $info = [
62
-            'image-upload' => function ($varName) use ($func) { return '$this->zaaImageUpload($this->'.$func.'(\''.$varName.'\')),'; },
63
-            'image-array-upload' => function ($varName) use ($func) { return '$this->zaaImageArrayUpload($this->'.$func.'(\''.$varName.'\')),'; },
64
-            'file-upload' => function ($varName) use ($func) { return '$this->zaaFileUpload($this->'.$func.'(\''.$varName.'\')),'; },
65
-            'file-array-upload' => function ($varName) use ($func) { return '$this->zaaFileArrayUpload($this->'.$func.'(\''.$varName.'\')),'; },
62
+            'image-upload' => function($varName) use ($func) { return '$this->zaaImageUpload($this->'.$func.'(\''.$varName.'\')),'; },
63
+            'image-array-upload' => function($varName) use ($func) { return '$this->zaaImageArrayUpload($this->'.$func.'(\''.$varName.'\')),'; },
64
+            'file-upload' => function($varName) use ($func) { return '$this->zaaFileUpload($this->'.$func.'(\''.$varName.'\')),'; },
65
+            'file-array-upload' => function($varName) use ($func) { return '$this->zaaFileArrayUpload($this->'.$func.'(\''.$varName.'\')),'; },
66 66
         ];
67 67
         
68 68
         if (array_key_exists($type, $info)) {
@@ -174,15 +174,15 @@  discard block
 block discarded – undo
174 174
         $content .= '     * @var bool Choose whether block is a layout/container/segmnet/section block or not, Container elements will be optically displayed'.PHP_EOL;
175 175
         $content .= '     * in a different way for a better user experience. Container block will not display isDirty colorizing.'.PHP_EOL;
176 176
         $content .= '     */'.PHP_EOL;
177
-        $content .= '    public $isContainer = false;'.PHP_EOL . PHP_EOL;
177
+        $content .= '    public $isContainer = false;'.PHP_EOL.PHP_EOL;
178 178
         $content .= '    /**'.PHP_EOL;
179 179
         $content .= '     * @var bool Choose whether a block can be cached trough the caching component. Be carefull with caching container blocks.'.PHP_EOL;
180 180
         $content .= '     */'.PHP_EOL;
181
-        $content .= '    public $cacheEnabled = false;'.PHP_EOL . PHP_EOL;
181
+        $content .= '    public $cacheEnabled = false;'.PHP_EOL.PHP_EOL;
182 182
         $content .= '    /**'.PHP_EOL;
183 183
         $content .= '     * @var int The cache lifetime for this block in seconds (3600 = 1 hour), only affects when cacheEnabled is true'.PHP_EOL;
184 184
         $content .= '     */'.PHP_EOL;
185
-        $content .= '    public $cacheExpiration = 3600;'.PHP_EOL . PHP_EOL;
185
+        $content .= '    public $cacheExpiration = 3600;'.PHP_EOL.PHP_EOL;
186 186
         
187 187
         // method name
188 188
         $content .= '    public function name()'.PHP_EOL;
Please login to merge, or discard this patch.