Completed
Push — master ( 1d2efa...e76360 )
by Dmitry
02:30
created
src/controllers/AbstractController.php 1 patch
Doc Comments   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     }
48 48
 
49 49
     /**
50
-     * @return int|Response exit code
50
+     * @return null|integer exit code
51 51
      */
52 52
     public function actionMake()
53 53
     {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Is response NOT Ok.
143 143
      * @param Response|int $res
144
-     * @return bool
144
+     * @return integer
145 145
      */
146 146
     public static function isNotOk($res)
147 147
     {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
     /**
152 152
      * Is response Ok.
153
-     * @param Response|int $res
153
+     * @param integer $res
154 154
      * @return bool
155 155
      */
156 156
     public static function isOk($res)
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * Runs list of actions.
163 163
      * TODO: think to redo with runRequests.
164 164
      * @param null|string|array $actions
165
-     * @return int|Response exit code
165
+     * @return null|integer exit code
166 166
      */
167 167
     public function runActions($actions)
168 168
     {
@@ -244,6 +244,9 @@  discard block
 block discarded – undo
244 244
         return readline($prompt);
245 245
     }
246 246
 
247
+    /**
248
+     * @param string $prompt
249
+     */
247 250
     public function readpassword($prompt)
248 251
     {
249 252
         echo $prompt;
@@ -255,6 +258,9 @@  discard block
 block discarded – undo
255 258
         return $password;
256 259
     }
257 260
 
261
+    /**
262
+     * @param string $id
263
+     */
258 264
     public function takeGoal($id)
259 265
     {
260 266
         return $this->module->get('config')->getGoal($id);
Please login to merge, or discard this patch.
src/controllers/StartController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
         Yii::setAlias('@root', $this->getRootDir());
87 87
         $config = $this->takeConfig()->rawItem('package');
88 88
         $alias  = isset($config['namespace']) ? strtr($config['namespace'], '\\', '/') : '';
89
-        if ($alias && !Yii::getAlias('@' . $alias, false)) {
90
-            $srcdir = Yii::getAlias('@root/' . ($config['src'] ?: 'src'));
89
+        if ($alias && !Yii::getAlias('@'.$alias, false)) {
90
+            $srcdir = Yii::getAlias('@root/'.($config['src'] ?: 'src'));
91 91
             Yii::setAlias($alias, $srcdir);
92 92
         }
93 93
         $aliases = $this->takeConfig()->rawItem('aliases');
@@ -220,6 +220,6 @@  discard block
 block discarded – undo
220 220
 
221 221
     public function buildRootPath($subpath)
222 222
     {
223
-        return $this->getRootDir() . DIRECTORY_SEPARATOR . $subpath;
223
+        return $this->getRootDir().DIRECTORY_SEPARATOR.$subpath;
224 224
     }
225 225
 }
Please login to merge, or discard this patch.
src/controllers/DirectoryController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         foreach ($this->getItems() as $id => $config) {
41 41
             $defaults = [
42 42
                 'class' => isset($config['template']) || isset($config['copy']) ? 'template' : 'directory',
43
-                'file'  => $this->path . '/' . $id,
43
+                'file'  => $this->path.'/'.$id,
44 44
             ];
45 45
             if ($this->recursive) {
46 46
                 $defaults['recursive'] = $this->recursive;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function mkdir($path)
59 59
     {
60
-        Yii::warning('mkdir ' . $path, 'dir');
60
+        Yii::warning('mkdir '.$path, 'dir');
61 61
         mkdir($path);
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
src/controllers/PackageController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
72 72
 
73 73
     public function getFullName()
74 74
     {
75
-        return $this->getItem('fullName') ?: ($this->takeVendor()->name . '/' . $this->name);
75
+        return $this->getItem('fullName') ?: ($this->takeVendor()->name.'/'.$this->name);
76 76
     }
77 77
 
78 78
     public function getSource()
79 79
     {
80
-        return $this->getItem('source') ?: ('https://github.com/' . $this->takeGoal('github')->full_name);
80
+        return $this->getItem('source') ?: ('https://github.com/'.$this->takeGoal('github')->full_name);
81 81
     }
82 82
 
83 83
     public function getVersion()
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.
src/base/BinaryPython.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,16 +49,16 @@
 block discarded – undo
49 49
     {
50 50
         $path = parent::detectCommand($path);
51 51
 
52
-        return is_executable($path) ? $path : '/usr/bin/env python ' . $path;
52
+        return is_executable($path) ? $path : '/usr/bin/env python '.$path;
53 53
     }
54 54
 
55 55
     public function install()
56 56
     {
57 57
         if ($this->installer) {
58
-            passthru('/usr/bin/env wget ' . escapeshellarg($this->installer) . ' -O- | /usr/bin/env python', $exitcode);
58
+            passthru('/usr/bin/env wget '.escapeshellarg($this->installer).' -O- | /usr/bin/env python', $exitcode);
59 59
         } elseif ($this->download) {
60
-            $dest = Yii::getAlias('@root/' . $this->name, false);
61
-            passthru('/usr/bin/env wget ' . escapeshellarg($this->download) . ' -O ' . $dest, $exitcode);
60
+            $dest = Yii::getAlias('@root/'.$this->name, false);
61
+            passthru('/usr/bin/env wget '.escapeshellarg($this->download).' -O '.$dest, $exitcode);
62 62
         } else {
63 63
             $args = ['install'];
64 64
             if (!$_SERVER['VIRTUAL_ENV']) {
Please login to merge, or discard this patch.
src/helpers/FileHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 unlink($tmp);
45 45
             }
46 46
         }
47
-        Yii::warning('Written file: ' . $path, 'file');
47
+        Yii::warning('Written file: '.$path, 'file');
48 48
 
49 49
         return true;
50 50
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $path = rtrim(trim($path), '/');
62 62
         if (!file_exists($path)) {
63 63
             mkdir($path, 0777, true);
64
-            Yii::warning('Created dir:  ' . $path . '/', 'file');
64
+            Yii::warning('Created dir:  '.$path.'/', 'file');
65 65
 
66 66
             return true;
67 67
         }
Please login to merge, or discard this patch.
src/controllers/OwnVersionController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     public function actionMake($version = null)
27 27
     {
28
-        $path = dirname(dirname(__DIR__)) . '/bin/hidev';
28
+        $path = dirname(dirname(__DIR__)).'/bin/hidev';
29 29
         echo "HiDev $this->version $this->date $this->time $this->hash\n";
30 30
         echo "run from $path\n";
31 31
     }
Please login to merge, or discard this patch.