@@ -20,7 +20,7 @@ |
||
20 | 20 | { |
21 | 21 | $a = pathinfo($template); |
22 | 22 | |
23 | - return $a['dirname'] . '/' . $a['filename'] . $extension; |
|
23 | + return $a['dirname'].'/'.$a['filename'].$extension; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | public function actionPerform($template = null, $file = null) |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | foreach ($this->getItems() as $id => $config) { |
41 | 41 | $defaults = [ |
42 | 42 | 'class' => isset($config['template']) ? 'template' : 'directory', |
43 | - 'file' => $this->path . '/' . $id, |
|
43 | + 'file' => $this->path.'/'.$id, |
|
44 | 44 | ]; |
45 | 45 | $goal = $this->takeConfig()->createItem($id, array_merge($defaults, $config ?: [])); |
46 | 46 | $goal->perform(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function mkdir($path) |
51 | 51 | { |
52 | - Yii::warning('mkdir ' . $path, 'dir'); |
|
52 | + Yii::warning('mkdir '.$path, 'dir'); |
|
53 | 53 | mkdir($path); |
54 | 54 | } |
55 | 55 | } |
@@ -36,12 +36,12 @@ |
||
36 | 36 | { |
37 | 37 | $v = trim($this->exec('git', ['log', '-n', '1', '--pretty=%ai %H %s'])[0]); |
38 | 38 | list($date, $time, $zone, $hash, $commit) = explode(' ', $v, 5); |
39 | - if (!$this->exists() || !in_array($commit, ['minor', 'version bump to ' . $this->version], true)) { |
|
39 | + if (!$this->exists() || !in_array($commit, ['minor', 'version bump to '.$this->version], true)) { |
|
40 | 40 | if ($hash !== $this->hash) { |
41 | 41 | $this->version = 'dev'; |
42 | 42 | } |
43 | 43 | $version = $version ?: $this->takeGoal('bump')->version ?: $this->version ?: 'dev'; |
44 | - $this->getFile()->write(implode(' ', [$version, $date, $time, $zone, $hash]) . "\n"); |
|
44 | + $this->getFile()->write(implode(' ', [$version, $date, $time, $zone, $hash])."\n"); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | public function getTitleAndHomepage() |
34 | 34 | { |
35 | - return $this->title . ($this->homepage ? ' (' . $this->homepage . ')' : ''); |
|
35 | + return $this->title.($this->homepage ? ' ('.$this->homepage.')' : ''); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function getDescription() |
@@ -46,7 +46,7 @@ |
||
46 | 46 | if ($style) { |
47 | 47 | $message = Console::ansiFormat($message, $style); |
48 | 48 | } |
49 | - Console::stdout($message . "\n"); |
|
49 | + Console::stdout($message."\n"); |
|
50 | 50 | } |
51 | 51 | parent::log($message, $level, $category); |
52 | 52 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected static $_extension2type = [ |
111 | 111 | 'json' => 'json', |
112 | - 'yml' => 'yaml', /// first one is preferred |
|
112 | + 'yml' => 'yaml', /// first one is preferred |
|
113 | 113 | 'yaml' => 'yaml', |
114 | 114 | 'xml' => 'xml', |
115 | 115 | 'xml.dist' => 'xml', |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | public function setBasename($basename) |
160 | 160 | { |
161 | - $this->setPath($this->_dirname . '/' . $basename); |
|
161 | + $this->setPath($this->_dirname.'/'.$basename); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | public function getBasename() |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | public function setDirname($dirname) |
170 | 170 | { |
171 | - $this->setPath($dirname . '/' . $this->_basename); |
|
171 | + $this->setPath($dirname.'/'.$this->_basename); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | public function getDirname() |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | public function setFilename($filename) |
180 | 180 | { |
181 | - $this->setPath($this->_dirname . '/' . $filename . '.' . $this->_extension); |
|
181 | + $this->setPath($this->_dirname.'/'.$filename.'.'.$this->_extension); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | public function getFilename() |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | public function setExtension($extension) |
190 | 190 | { |
191 | - $this->setPath($this->_dirname . '/' . $this->_filename . '.' . $extension); |
|
191 | + $this->setPath($this->_dirname.'/'.$this->_filename.'.'.$extension); |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | public function getExtension() |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | { |
240 | 240 | if (!is_object($this->_handler)) { |
241 | 241 | $this->_handler = Yii::createObject([ |
242 | - 'class' => 'hidev\handlers\\' . $this->getCtype() . 'Handler', |
|
242 | + 'class' => 'hidev\handlers\\'.$this->getCtype().'Handler', |
|
243 | 243 | 'template' => $this->template, |
244 | 244 | 'goal' => $this->goal, |
245 | 245 | ]); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | |
337 | 337 | public function chown($value) |
338 | 338 | { |
339 | - $ownergroup = $this->getOwner() . ':' . $this->getGroup(); |
|
339 | + $ownergroup = $this->getOwner().':'.$this->getGroup(); |
|
340 | 340 | if (in_array($value, [$ownergroup, $this->getOwner(), $this->getUid()], false)) { |
341 | 341 | return; |
342 | 342 | } |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function prepareCommand($args) |
64 | 64 | { |
65 | - return $this->getCommand() . $this->prepareArguments($args); |
|
65 | + return $this->getCommand().$this->prepareArguments($args); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | public function install() |
69 | 69 | { |
70 | - throw new InvalidConfigException('Don\'t know how to install ' . $this->name); |
|
70 | + throw new InvalidConfigException('Don\'t know how to install '.$this->name); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function detectPath($name) |
101 | 101 | { |
102 | - return exec('which ' . $name) ?: null; |
|
102 | + return exec('which '.$name) ?: null; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $path = $this->getPath(); |
135 | 135 | } |
136 | 136 | if (!$path || !file_exists($path)) { |
137 | - throw new InvalidConfigException('Failed to find how to run ' . $this->name); |
|
137 | + throw new InvalidConfigException('Failed to find how to run '.$this->name); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | return $path; |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | public function prepareArguments($args) |
149 | 149 | { |
150 | 150 | if (is_string($args)) { |
151 | - $res = ' ' . trim($args); |
|
151 | + $res = ' '.trim($args); |
|
152 | 152 | } else { |
153 | 153 | $res = ''; |
154 | 154 | foreach ($args as $a) { |
155 | - $res .= ' ' . escapeshellarg($a); |
|
155 | + $res .= ' '.escapeshellarg($a); |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if (!defined('HIDEV_VENDOR_DIR')) { |
13 | - foreach ([dirname(__DIR__) . '/vendor', dirname(dirname(dirname(__DIR__)))] as $dir) { |
|
14 | - if (file_exists($dir . '/autoload.php')) { |
|
13 | + foreach ([dirname(__DIR__).'/vendor', dirname(dirname(dirname(__DIR__)))] as $dir) { |
|
14 | + if (file_exists($dir.'/autoload.php')) { |
|
15 | 15 | define('HIDEV_VENDOR_DIR', $dir); |
16 | 16 | break; |
17 | 17 | } |
@@ -22,6 +22,6 @@ discard block |
||
22 | 22 | exit(1); |
23 | 23 | } |
24 | 24 | |
25 | - require HIDEV_VENDOR_DIR . '/autoload.php'; |
|
26 | - require HIDEV_VENDOR_DIR . '/yiisoft/yii2/Yii.php'; |
|
25 | + require HIDEV_VENDOR_DIR.'/autoload.php'; |
|
26 | + require HIDEV_VENDOR_DIR.'/yiisoft/yii2/Yii.php'; |
|
27 | 27 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | |
64 | 64 | public static function readExtraVendor($dir) |
65 | 65 | { |
66 | - return static::readExtraConfig($dir . '/hiqdev/hidev-config.php'); |
|
66 | + return static::readExtraConfig($dir.'/hiqdev/hidev-config.php'); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | public static function readExtraConfig($path) |