Completed
Push — master ( e1bdec...7344e0 )
by Marc
02:32
created
core/web/Composition.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@
 block discarded – undo
397 397
      * 
398 398
      * @see ArrayAccess::offsetGet()
399 399
      * @param string $offset The key to get from the array.
400
-     * @return mixed The value for the offset key from the array.
400
+     * @return string|boolean The value for the offset key from the array.
401 401
      */
402 402
     public function offsetGet($offset)
403 403
     {
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 3 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   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -100,22 +100,22 @@  discard block
 block discarded – undo
100 100
             }
101 101
         }
102 102
         
103
-        $appModulesFolder = Yii::$app->basePath . DIRECTORY_SEPARATOR . 'modules';
104
-        $moduleFolder = $appModulesFolder . DIRECTORY_SEPARATOR . $moduleName;
103
+        $appModulesFolder = Yii::$app->basePath.DIRECTORY_SEPARATOR.'modules';
104
+        $moduleFolder = $appModulesFolder.DIRECTORY_SEPARATOR.$moduleName;
105 105
         
106 106
         if (file_exists($moduleFolder)) {
107
-            return $this->outputError("The folder " . $moduleFolder . " exists already.");
107
+            return $this->outputError("The folder ".$moduleFolder." exists already.");
108 108
         }
109 109
         
110 110
         $folders = [
111 111
             'basePath' => $moduleFolder,
112
-            'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin',
113
-            'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'aws',
114
-            'frontendPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend',
115
-            'blocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'blocks',
116
-            'blocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'controllers',
117
-            'blocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'views',
118
-            'modelsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'models',
112
+            'adminPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin',
113
+            'adminPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'aws',
114
+            'frontendPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend',
115
+            'blocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'blocks',
116
+            'blocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'controllers',
117
+            'blocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'views',
118
+            'modelsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'models',
119 119
         ];
120 120
 
121 121
         $ns = 'app\\modules\\'.$moduleName;
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
         }
126 126
         
127 127
         $contents = [
128
-            $moduleFolder. DIRECTORY_SEPARATOR . 'README.md' => $this->renderReadme($folders, $moduleName, $ns),
129
-            $moduleFolder. DIRECTORY_SEPARATOR . 'admin/Module.php' => $this->renderAdmin($folders, $moduleName, $ns),
130
-            $moduleFolder. DIRECTORY_SEPARATOR . 'frontend/Module.php' => $this->renderFrontend($folders, $moduleName, $ns),
128
+            $moduleFolder.DIRECTORY_SEPARATOR.'README.md' => $this->renderReadme($folders, $moduleName, $ns),
129
+            $moduleFolder.DIRECTORY_SEPARATOR.'admin/Module.php' => $this->renderAdmin($folders, $moduleName, $ns),
130
+            $moduleFolder.DIRECTORY_SEPARATOR.'frontend/Module.php' => $this->renderFrontend($folders, $moduleName, $ns),
131 131
         ];
132 132
         
133 133
         foreach ($contents as $fileName => $content) {
Please login to merge, or discard this patch.
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -14,70 +14,70 @@
 block discarded – undo
14 14
  */
15 15
 class ModuleController extends \luya\console\Command
16 16
 {
17
-	/**
18
-	 * Humanize the class name
19
-	 * 
20
-	 * @return string The humanized name.
21
-	 */
22
-	public function humanizeName($name)
23
-	{
24
-		return $name = Inflector::humanize(Inflector::camel2words($name));
25
-	}
17
+    /**
18
+     * Humanize the class name
19
+     * 
20
+     * @return string The humanized name.
21
+     */
22
+    public function humanizeName($name)
23
+    {
24
+        return $name = Inflector::humanize(Inflector::camel2words($name));
25
+    }
26 26
 	
27
-	/**
28
-	 * Render the readme template.
29
-	 * 
30
-	 * @param array $folders
31
-	 * @param string $name
32
-	 * @param string $ns
33
-	 * @return string
34
-	 */
35
-	public function renderReadme($folders, $name, $ns)
36
-	{
37
-		return $this->view->render('@luya/console/commands/views/module/readme.php', [
38
-			'folders' => $folders,
39
-			'name' => $name,
40
-			'humanName' => $this->humanizeName($name),
41
-			'ns' => $ns,
42
-			'luyaText' => $this->getGeneratorText('module/create'),
43
-		]);
44
-	}
27
+    /**
28
+     * Render the readme template.
29
+     * 
30
+     * @param array $folders
31
+     * @param string $name
32
+     * @param string $ns
33
+     * @return string
34
+     */
35
+    public function renderReadme($folders, $name, $ns)
36
+    {
37
+        return $this->view->render('@luya/console/commands/views/module/readme.php', [
38
+            'folders' => $folders,
39
+            'name' => $name,
40
+            'humanName' => $this->humanizeName($name),
41
+            'ns' => $ns,
42
+            'luyaText' => $this->getGeneratorText('module/create'),
43
+        ]);
44
+    }
45 45
 	
46
-	/**
47
-	 * Render the admin template.
48
-	 * 
49
-	 * @param array $folders
50
-	 * @param string $name
51
-	 * @param string $ns
52
-	 * @return string
53
-	 */
54
-	public function renderAdmin($folders, $name, $ns)
55
-	{
56
-		return $this->view->render('@luya/console/commands/views/module/adminmodule.php', [
57
-			'folders' => $folders,
58
-			'name' => $this->humanizeName($name),
59
-			'ns' => $ns,
60
-			'luyaText' => $this->getGeneratorText('module/create'),
61
-		]);
62
-	}
46
+    /**
47
+     * Render the admin template.
48
+     * 
49
+     * @param array $folders
50
+     * @param string $name
51
+     * @param string $ns
52
+     * @return string
53
+     */
54
+    public function renderAdmin($folders, $name, $ns)
55
+    {
56
+        return $this->view->render('@luya/console/commands/views/module/adminmodule.php', [
57
+            'folders' => $folders,
58
+            'name' => $this->humanizeName($name),
59
+            'ns' => $ns,
60
+            'luyaText' => $this->getGeneratorText('module/create'),
61
+        ]);
62
+    }
63 63
 	
64
-	/**
65
-	 * Render the frontend template.
66
-	 * 
67
-	 * @param array $folders
68
-	 * @param string $name
69
-	 * @param string $ns
70
-	 * @return string
71
-	 */
72
-	public function renderFrontend($folders, $name, $ns)
73
-	{
74
-		return $this->view->render('@luya/console/commands/views/module/frontendmodule.php', [
75
-			'folders' => $folders,
76
-			'name' => $this->humanizeName($name),
77
-			'ns' => $ns,
78
-			'luyaText' => $this->getGeneratorText('module/create'),
79
-		]);
80
-	}
64
+    /**
65
+     * Render the frontend template.
66
+     * 
67
+     * @param array $folders
68
+     * @param string $name
69
+     * @param string $ns
70
+     * @return string
71
+     */
72
+    public function renderFrontend($folders, $name, $ns)
73
+    {
74
+        return $this->view->render('@luya/console/commands/views/module/frontendmodule.php', [
75
+            'folders' => $folders,
76
+            'name' => $this->humanizeName($name),
77
+            'ns' => $ns,
78
+            'luyaText' => $this->getGeneratorText('module/create'),
79
+        ]);
80
+    }
81 81
 	
82 82
     /**
83 83
      * Create a new frontend/admin module.
Please login to merge, or discard this patch.
core/console/commands/ActiveWindowController.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
      */
31 31
     public function renderWindowClassView($className, $namespace, $moduleId)
32 32
     {
33
-    	$alias = Inflector::humanize(Inflector::camel2words($className));
34
-    	return $this->view->render('@luya/console/commands/views/aw/create.php', [
33
+        $alias = Inflector::humanize(Inflector::camel2words($className));
34
+        return $this->view->render('@luya/console/commands/views/aw/create.php', [
35 35
             'className' => $className,
36 36
             'namespace' => $namespace,
37 37
             'luyaText' => $this->getGeneratorText('aw/create'),
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@
 block discarded – undo
55 55
         
56 56
         $module = Yii::$app->getModule($moduleId);
57 57
         
58
-        $folder = $module->basePath . DIRECTORY_SEPARATOR . 'aws';
58
+        $folder = $module->basePath.DIRECTORY_SEPARATOR.'aws';
59 59
         
60
-        $file = $folder . DIRECTORY_SEPARATOR . $className . '.php';
60
+        $file = $folder.DIRECTORY_SEPARATOR.$className.'.php';
61 61
         
62
-        $content = $this->renderWindowClassView($className, $module->getNamespace() . '\\aws', $moduleId);
62
+        $content = $this->renderWindowClassView($className, $module->getNamespace().'\\aws', $moduleId);
63 63
         
64 64
         FileHelper::createDirectory($folder);
65 65
         
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * Render the view file with its parameters.
24 24
      *
25 25
      * @param string $className
26
-     * @param string $namepsace
26
+     * @param string $namespace
27 27
      * @param string $moduleId
28 28
      * @return string
29 29
      */
Please login to merge, or discard this patch.