File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,16 +7,19 @@ class PinCliParameters
77 private $ verbose ;
88 private $ log ;
99
10- public function __construct ($ verbose = 0 , $ log = null ) {
10+ public function __construct ($ verbose = 0 , $ log = null )
11+ {
1112 $ this ->verbose = $ verbose ;
1213 $ this ->log = $ log ;
1314 }
1415
15- public function getVerbose () {
16+ public function getVerbose ()
17+ {
1618 return $ this ->verbose ;
1719 }
1820
19- public function getLog () {
21+ public function getLog ()
22+ {
2023 return $ this ->log ;
2124 }
22- }
25+ }
Original file line number Diff line number Diff line change 22
33namespace Crypt \Console ;
44
5-
65require_once __DIR__ . '/PinCliParameters.php ' ;
76
87class SimpleCliWrapper
@@ -93,7 +92,6 @@ public function parseCli()
9392 * }
9493 * ```
9594 *
96- * @param $msg
9795 * @return void
9896 */
9997 public function writeToErrOrEcho ($ msg )
@@ -128,10 +126,7 @@ private function printHelp()
128126 " ;
129127 }
130128
131-
132129 /**
133- * @param array $opts
134- *
135130 * @return int
136131 */
137132 public static function getVerbosityLevel (array $ opts )
@@ -140,7 +135,6 @@ public static function getVerbosityLevel(array $opts)
140135 return self ::DEFAULT_VERBOSITY ;
141136 }
142137
143-
144138 // the default options with just a -v is false, but based
145139 // on the old system, it would be level 0
146140 if (isset ($ opts [self ::VERBOSE_SHORT ])) {
@@ -164,11 +158,10 @@ public static function getVerbosityLevel(array $opts)
164158
165159 }
166160
167-
168161 public static function getLogLocation (array $ opts )
169162 {
170163 if (!isset ($ opts [self ::LOG_SHORT ]) && !isset ($ opts [self ::LOG_LONG ])) {
171- return "" ;
164+ return '' ;
172165 }
173166
174167 if (isset ($ opts [self ::LOG_SHORT ]) && is_string ($ opts [self ::LOG_SHORT ])) {
@@ -181,4 +174,4 @@ public static function getLogLocation(array $opts)
181174
182175 return self ::INVALID_INPUT ;
183176 }
184- }
177+ }
Original file line number Diff line number Diff line change 55
66// Check if we're running directly from git repo or if we're running
77// from a PEAR or Composer packaged version.
8- $ ds = DIRECTORY_SEPARATOR ;
9- $ root = __DIR__ . $ ds . '.. ' ;
108$ paths = [
119 '@php-dir@ ' , // PEAR or Composer
12- $ root , // Git (or Composer with wrong @php-dir@)
13- // and composer-installed PEAR_Exception for Console_CommandLine (#21074)
14- $ root . $ ds . '.. ' . $ ds . '.. ' . $ ds . 'pear ' . $ ds . 'pear_exception ' ,
10+ __DIR__ . DIRECTORY_SEPARATOR . '.. ' , // Git (or Composer with wrong @php-dir@)
1511];
1612
1713foreach ($ paths as $ idx => $ path ) {
You can’t perform that action at this time.
0 commit comments