@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $level = $die ? Logger::LEVEL_ERROR : Logger::LEVEL_WARNING; |
| 35 | - Yii::getLogger()->log('Failed to read file: ' . $path, $level, 'file'); |
|
| 35 | + Yii::getLogger()->log('Failed to read file: '.$path, $level, 'file'); |
|
| 36 | 36 | |
| 37 | 37 | return false; |
| 38 | 38 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | unlink($tmp); |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | - Yii::warning('Written file: ' . $path, 'file'); |
|
| 67 | + Yii::warning('Written file: '.$path, 'file'); |
|
| 68 | 68 | |
| 69 | 69 | return true; |
| 70 | 70 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $path = rtrim(trim($path), '/'); |
| 82 | 82 | if (!file_exists($path)) { |
| 83 | 83 | mkdir($path, 0777, true); |
| 84 | - Yii::warning('Created dir: ' . $path . '/', 'file'); |
|
| 84 | + Yii::warning('Created dir: '.$path.'/', 'file'); |
|
| 85 | 85 | |
| 86 | 86 | return true; |
| 87 | 87 | } |
@@ -35,6 +35,6 @@ |
||
| 35 | 35 | { |
| 36 | 36 | $ref = new ReflectionClass($this); |
| 37 | 37 | |
| 38 | - return dirname($ref->getFileName()) . '/views'; |
|
| 38 | + return dirname($ref->getFileName()).'/views'; |
|
| 39 | 39 | } |
| 40 | 40 | } |
@@ -34,6 +34,6 @@ |
||
| 34 | 34 | { |
| 35 | 35 | $ref = new ReflectionClass($this); |
| 36 | 36 | |
| 37 | - return dirname(dirname($ref->getFileName())) . '/views'; |
|
| 37 | + return dirname(dirname($ref->getFileName())).'/views'; |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -157,9 +157,9 @@ discard block |
||
| 157 | 157 | Yii::setAlias('@root', $this->getRootDir()); |
| 158 | 158 | Yii::setAlias('@hidev', dirname(__DIR__)); |
| 159 | 159 | $package = $this->goals['package']; |
| 160 | - $alias = isset($package['namespace']) ? strtr($package['namespace'], '\\', '/') : ''; |
|
| 161 | - if ($alias && !Yii::getAlias('@' . $alias, false)) { |
|
| 162 | - $srcdir = Yii::getAlias('@root/' . ($package['src'] ?: 'src')); |
|
| 160 | + $alias = isset($package['namespace']) ? strtr($package['namespace'], '\\', '/') : ''; |
|
| 161 | + if ($alias && !Yii::getAlias('@'.$alias, false)) { |
|
| 162 | + $srcdir = Yii::getAlias('@root/'.($package['src'] ?: 'src')); |
|
| 163 | 163 | Yii::setAlias($alias, $srcdir); |
| 164 | 164 | } |
| 165 | 165 | $aliases = $this->goals['aliases']; |
@@ -326,6 +326,6 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | public function buildRootPath($subpath) |
| 328 | 328 | { |
| 329 | - return $this->getRootDir() . DIRECTORY_SEPARATOR . $subpath; |
|
| 329 | + return $this->getRootDir().DIRECTORY_SEPARATOR.$subpath; |
|
| 330 | 330 | } |
| 331 | 331 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $cur = (int) date('Y'); |
| 43 | 43 | $old = (int) $this->year; |
| 44 | 44 | |
| 45 | - return ($old && $old < $cur ? $this->year . '-' : '') . $cur; |
|
| 45 | + return ($old && $old < $cur ? $this->year.'-' : '').$cur; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function getYear() |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | public function getIssues() |
| 59 | 59 | { |
| 60 | - return $this->getItem('issues') ?: ($this->source . '/issues'); |
|
| 60 | + return $this->getItem('issues') ?: ($this->source.'/issues'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public function getWiki() |
| 64 | 64 | { |
| 65 | - return $this->getItem('wiki') ?: ($this->source . '/wiki'); |
|
| 65 | + return $this->getItem('wiki') ?: ($this->source.'/wiki'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | public function getKeywords() |
@@ -72,12 +72,12 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | public function getFullName() |
| 74 | 74 | { |
| 75 | - return $this->getItem('fullName') ?: ($this->take('vendor')->name . '/' . $this->name); |
|
| 75 | + return $this->getItem('fullName') ?: ($this->take('vendor')->name.'/'.$this->name); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | public function getSource() |
| 79 | 79 | { |
| 80 | - return $this->getItem('source') ?: ('https://github.com/' . $this->take('github')->full_name); |
|
| 80 | + return $this->getItem('source') ?: ('https://github.com/'.$this->take('github')->full_name); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | public function getVersion() |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | public static function defaultNamespace($vendor, $package) |
| 94 | 94 | { |
| 95 | - return preg_replace('/[^a-zA-Z0-9\\\\]+/', '', $vendor . strtr("-$package", '-', '\\')); |
|
| 95 | + return preg_replace('/[^a-zA-Z0-9\\\\]+/', '', $vendor.strtr("-$package", '-', '\\')); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | public function getSrc() |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | public function getHomepage() |
| 106 | 106 | { |
| 107 | - return $this->getItem('homepage') ?: ($this->isDomain() ? 'http://' . $this->name . '/' : $this->getSource()); |
|
| 107 | + return $this->getItem('homepage') ?: ($this->isDomain() ? 'http://'.$this->name.'/' : $this->getSource()); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | public function getForum() |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | public function getRepositoryUrl($file) |
| 141 | 141 | { |
| 142 | - return 'https://github.com/' . $this->getFullName() . '/blob/master/' . $file; |
|
| 142 | + return 'https://github.com/'.$this->getFullName().'/blob/master/'.$file; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | public function getAuthors() |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | public function getFull_name() |
| 33 | 33 | { |
| 34 | - return $this->getVendor() . '/' . $this->getName(); |
|
| 34 | + return $this->getVendor().'/'.$this->getName(); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public function setFullName($value) |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | 'name' => 'HiDev', |
| 18 | 18 | 'basePath' => dirname(__DIR__), |
| 19 | 19 | 'vendorPath' => HIDEV_VENDOR_DIR, |
| 20 | - 'runtimePath' => substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR) . '/runtime', |
|
| 20 | + 'runtimePath' => substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR).'/runtime', |
|
| 21 | 21 | 'controllerNamespace' => 'hidev\\controllers', |
| 22 | 22 | 'defaultRoute' => 'default', |
| 23 | 23 | 'bootstrap' => ['log'], |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | 'singletons' => [ |
| 98 | 98 | \hidev\base\Interpolator::class => [ |
| 99 | 99 | ], |
| 100 | - 'Detect VCS' => function () { |
|
| 100 | + 'Detect VCS' => function() { |
|
| 101 | 101 | $detectedVCS = 'git'; |
| 102 | 102 | return Yii::$app->get($detectedVCS); |
| 103 | 103 | }, |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | if ($style) { |
| 40 | 40 | $message = Console::ansiFormat($message, $style); |
| 41 | 41 | } |
| 42 | - Console::stdout($message . "\n"); |
|
| 42 | + Console::stdout($message."\n"); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function getLevel() |