@@ -122,6 +122,9 @@ discard block |
||
122 | 122 | return $type2extension[$type]; |
123 | 123 | } |
124 | 124 | |
125 | + /** |
|
126 | + * @param string $extension |
|
127 | + */ |
|
125 | 128 | public function getTypeByExtension($extension) |
126 | 129 | { |
127 | 130 | return static::$_extension2type[$extension]; |
@@ -132,6 +135,9 @@ discard block |
||
132 | 135 | return ($this->goal ? $this->goal->fileType : null) ?: static::getTypeByExtension($this->_extension) ?: 'template'; |
133 | 136 | } |
134 | 137 | |
138 | + /** |
|
139 | + * @param string $path |
|
140 | + */ |
|
135 | 141 | public function setPath($path) |
136 | 142 | { |
137 | 143 | $path = Yii::getAlias($path); |
@@ -208,6 +214,9 @@ discard block |
||
208 | 214 | return $this->handler->renderPath($this->path, $this->data); |
209 | 215 | } |
210 | 216 | |
217 | + /** |
|
218 | + * @param string $content |
|
219 | + */ |
|
211 | 220 | public function write($content) |
212 | 221 | { |
213 | 222 | return $this->handler->write($this->path, $content); |
@@ -218,6 +227,9 @@ discard block |
||
218 | 227 | return $this->data = $this->handler->parsePath($this->path, $this->minimalPath); |
219 | 228 | } |
220 | 229 | |
230 | + /** |
|
231 | + * @return string |
|
232 | + */ |
|
221 | 233 | public function read() |
222 | 234 | { |
223 | 235 | return $this->handler->read($this->path); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | public function actionSave() |
29 | 29 | { |
30 | - passthru(($this->sudo ? 'sudo ' : '') . $this->command); |
|
30 | + passthru(($this->sudo ? 'sudo ' : '').$this->command); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | public function actionBefore() |
@@ -14,7 +14,7 @@ |
||
14 | 14 | 'name' => 'HiDev', |
15 | 15 | 'basePath' => dirname(__DIR__), |
16 | 16 | 'vendorPath' => HIDEV_VENDOR_DIR, |
17 | - 'runtimePath' => substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR) . '/runtime', |
|
17 | + 'runtimePath' => substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR).'/runtime', |
|
18 | 18 | 'enableCoreCommands' => false, |
19 | 19 | 'controllerNamespace' => 'hidev\\controllers', |
20 | 20 | 'defaultRoute' => 'default', |