@@ -17,20 +17,31 @@ class ModuleController extends Controller
1717{
1818 public $ db = 'db ' ;
1919
20+ /**
21+ *
22+ */
2023 public function actionIndex ()
2124 {
2225 $ this ->run ('/help ' , ['module ' ]);
2326 }
2427
2528 /**
2629 * Run installation
30+ *
2731 * @param $name
32+ * @throws \yii\base\InvalidConfigException
2833 */
2934 public function actionInstall ($ name )
3035 {
3136 $ this ->runInstallerCommand ($ name , 'install ' , 'Module module was installed successfully. ' );
3237 }
3338
39+ /**
40+ * @param $name
41+ * @param $method
42+ * @param string $message
43+ * @throws \yii\base\InvalidConfigException
44+ */
3445 protected function runInstallerCommand ($ name , $ method , $ message = '' )
3546 {
3647 if ($ this ->moduleExists ($ name )) {
@@ -90,6 +101,9 @@ protected function getInstaller($name)
90101 }
91102 }
92103
104+ /**
105+ *
106+ */
93107 public function actionMigrate ()
94108 {
95109 $ changes = $ this ->getChanges ();
@@ -99,16 +113,21 @@ public function actionMigrate()
99113 Console::output ('Migrate successfully. ' );
100114 }
101115
116+ /**
117+ * @return array|mixed
118+ * @throws \yii\base\InvalidConfigException
119+ */
102120 protected function getChanges ()
103121 {
104122 /** @var Installer $installer */
105- $ installer = \Yii::createObject (Installer::className () , ['db ' => $ this ->db ]);
123+ $ installer = \Yii::createObject (Installer::class , ['db ' => $ this ->db ]);
106124
107125 return $ installer ->getChanges ();
108126 }
109127
110128 /**
111129 * @param $name
130+ * @throws \yii\base\InvalidConfigException
112131 */
113132 public function actionUninstall ($ name )
114133 {
@@ -130,6 +149,7 @@ public function actionUninstall($name)
130149
131150 /**
132151 * @param $name
152+ * @throws \yii\base\InvalidConfigException
133153 */
134154 public function actionReinstall ($ name )
135155 {
@@ -146,7 +166,7 @@ public function actionBindModels($modelName1, $modelName2)
146166 $ model2 = new $ modelName2 ();
147167
148168 if ($ this ->confirm ('Generate migration? ' )) {
149-
169+ //@TODO
150170 }
151171 }
152172}
0 commit comments