Completed
Pull Request — master (#803)
by Martin
03:01
created
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/StorageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,21 +25,21 @@
 block discarded – undo
25 25
 
26 26
         if (count($fileList) !== 0) {
27 27
             $success = true;
28
-            if ($this->confirm("Do you want to delete " . count($fileList) . " files which are not referenced in the database any more?")) {
28
+            if ($this->confirm("Do you want to delete ".count($fileList)." files which are not referenced in the database any more?")) {
29 29
                 foreach ($fileList as $file) {
30 30
                     if (is_file($file) && @unlink($file)) {
31
-                        $this->outputSuccess($file . " successful deleted.");
31
+                        $this->outputSuccess($file." successful deleted.");
32 32
                     } elseif (is_file($file)) {
33
-                        $this->outputError($file . " could not be deleted!");
33
+                        $this->outputError($file." could not be deleted!");
34 34
                         $success = false;
35 35
                     } else {
36
-                        $this->outputError($file . " could not be found!");
36
+                        $this->outputError($file." could not be found!");
37 37
                         $success = false;
38 38
                     }
39 39
                 }
40 40
             }
41 41
             if ($success) {
42
-                return $this->outputSuccess(count($fileList) . " files successful deleted.");
42
+                return $this->outputSuccess(count($fileList)." files successful deleted.");
43 43
             }
44 44
             return $this->outputError("Cleanup could not be completed. Please look into error above.");
45 45
         }
Please login to merge, or discard this patch.
core/console/commands/ActiveWindowController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@
 block discarded – undo
31 31
         
32 32
         $module = Yii::$app->getModule($moduleId);
33 33
         
34
-        $folder = $module->basePath . DIRECTORY_SEPARATOR . 'aws';
34
+        $folder = $module->basePath.DIRECTORY_SEPARATOR.'aws';
35 35
         
36
-        $file = $folder . DIRECTORY_SEPARATOR . $className . '.php';
36
+        $file = $folder.DIRECTORY_SEPARATOR.$className.'.php';
37 37
         
38 38
         $content = $this->view->render('@luya/console/commands/views/aw/create.php', [
39 39
             'className' => $className,
40
-            'namespace' => $module->getNamespace() . '\\aws',
40
+            'namespace' => $module->getNamespace().'\\aws',
41 41
             'luya' => $this->getLuyaVersion(),
42 42
             'moduleId' => $moduleId,
43 43
             'alias' => Inflector::humanize(Inflector::camel2words($className)),
Please login to merge, or discard this patch.
core/base/Widget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,6 @@
 block discarded – undo
11 11
     {
12 12
         $class = new ReflectionClass($this);
13 13
         
14
-        return '@app/views/widgets/' . Inflector::camel2id($class->getShortName());
14
+        return '@app/views/widgets/'.Inflector::camel2id($class->getShortName());
15 15
     }
16 16
 }
Please login to merge, or discard this patch.
core/base/Bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
             if (method_exists($module, 'registerComponents')) {
95 95
                 foreach ($module->registerComponents() as $componentId => $definition) {
96 96
                     if (!$app->has($componentId)) {
97
-                        Yii::trace('Register component ' . $componentId, __METHOD__);
97
+                        Yii::trace('Register component '.$componentId, __METHOD__);
98 98
                         $app->set($componentId, $definition);
99 99
                     }
100 100
                 }
Please login to merge, or discard this patch.
core/base/ModuleReflection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         
98 98
         return [
99 99
             'module' => $this->module->id,
100
-            'route' => $this->module->id . '/' . $request['route'],
100
+            'route' => $this->module->id.'/'.$request['route'],
101 101
             'params' => $request['args'],
102 102
         ];
103 103
     }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             throw new InvalidConfigException(sprintf("Unable to create controller '%s' for module '%s'.", $requestRoute['route'], $this->module->id));
118 118
         }
119 119
         
120
-        Yii::info('LUYA module run module "'.$this->module->id.'" route ' . $requestRoute['route'], __METHOD__);
120
+        Yii::info('LUYA module run module "'.$this->module->id.'" route '.$requestRoute['route'], __METHOD__);
121 121
         
122 122
         // run the action on the provided controller object
123 123
         return $controller[0]->runAction($controller[1], $requestRoute['args']);
Please login to merge, or discard this patch.
core/traits/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     public function getWebroot()
64 64
     {
65 65
         if ($this->_webroot === null) {
66
-            $this->_webroot = realpath(realpath($this->basePath) . DIRECTORY_SEPARATOR . $this->webrootDirectory);
66
+            $this->_webroot = realpath(realpath($this->basePath).DIRECTORY_SEPARATOR.$this->webrootDirectory);
67 67
         }
68 68
         
69 69
         return $this->_webroot;
Please login to merge, or discard this patch.
core/helpers/FileHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $info = pathinfo($file);
43 43
         if (!isset($info['extension']) || empty($info['extension'])) {
44
-            $file = rtrim($file, '.') . '.' . $extension;
44
+            $file = rtrim($file, '.').'.'.$extension;
45 45
         }
46 46
 
47 47
         return $file;
Please login to merge, or discard this patch.