@@ -37,7 +37,7 @@ |
||
37 | 37 | if ($style) { |
38 | 38 | $message = Console::ansiFormat($message, $style); |
39 | 39 | } |
40 | - Console::stdout($message . "\n"); |
|
40 | + Console::stdout($message."\n"); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | protected function getContextMessage() |
@@ -24,11 +24,17 @@ |
||
24 | 24 | return method_exists(Yii::class, 'autoload'); |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @return string |
|
29 | + */ |
|
27 | 30 | public static function bad2sep($str, $separator = '-') |
28 | 31 | { |
29 | 32 | return preg_replace('/[^a-zA-Z0-9-]/', $separator, $str); |
30 | 33 | } |
31 | 34 | |
35 | + /** |
|
36 | + * @param string $id |
|
37 | + */ |
|
32 | 38 | public static function id2camel($id, $separator = '-') |
33 | 39 | { |
34 | 40 | return Inflector::id2camel(self::bad2sep($id, $separator), $separator); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | $__class = Helper::isYii20() ? 'class' : '__class'; |
18 | 18 | |
19 | -$runtimePath = (substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR)) . '/.hidev/runtime'; |
|
19 | +$runtimePath = (substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR)).'/.hidev/runtime'; |
|
20 | 20 | |
21 | 21 | return array_filter([ |
22 | 22 | 'id' => 'hidev', |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | ], |
106 | 106 | 'own.version' => [ |
107 | 107 | 'class' => \hidev\components\Version::class, |
108 | - 'file' => dirname(dirname(__DIR__)) . '/version', |
|
108 | + 'file' => dirname(dirname(__DIR__)).'/version', |
|
109 | 109 | ], |
110 | 110 | ]), |
111 | 111 | 'controllerMap' => [ |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | ], |
126 | 126 | 'container' => [ |
127 | 127 | 'singletons' => [ |
128 | - \hidev\components\AbstractVcs::class => function () { |
|
128 | + \hidev\components\AbstractVcs::class => function() { |
|
129 | 129 | $detectedVCS = 'git'; /// TODO actual detection to be added |
130 | 130 | return Yii::$app->get($detectedVCS); |
131 | 131 | }, |