File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
src/iTXTech/SimpleFramework/Console/Option Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ public static function setSingleThread(bool $bool = false){
3636 }
3737 }
3838
39- public static function initTerminal (bool $ formattingCodes = true ){
39+ /**
40+ * Initiate Terminal
41+ *
42+ * @param bool|null $formattingCodes
43+ */
44+ public static function initTerminal (?bool $ formattingCodes = null ){
4045 \iTXTech \SimpleFramework \Console \Terminal::$ formattingCodes = $ formattingCodes ;
4146 \iTXTech \SimpleFramework \Console \Terminal::init ();
4247 }
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ private function handleLongOptionWithoutEqual(string $token){
257257 * @throws ParseException
258258 */
259259 private function handleLongOptionWithEqual (string $ token ){
260- list ($ value , $ opt ) = explode ("= " , $ token , 2 );
260+ list ($ opt , $ value ) = explode ("= " , $ token , 2 );
261261 $ matchingOpts = $ this ->getMatchingLongOptions ($ opt );
262262 if (empty ($ matchingOpts )){
263263 $ this ->handleUnknownToken ($ this ->currentToken );
@@ -356,6 +356,11 @@ private function isJavaProperty(string $token){
356356 return $ option !== null && ($ option ->getArgs () >= 2 or $ option ->getArgs () === Option::UNLIMITED_VALUES );
357357 }
358358
359+ /**
360+ * @param Option $option
361+ *
362+ * @throws ParseException
363+ */
359364 private function handleOption (Option $ option ){
360365 $ this ->checkRequiredArgs ();
361366
@@ -404,6 +409,11 @@ private function getMatchingLongOptions(string $token) : array{
404409 }
405410 }
406411
412+ /**
413+ * @param string $token
414+ *
415+ * @throws ParseException
416+ */
407417 protected function handleConcatenatedOptions (string $ token ){
408418 for ($ i = 1 ; $ i < strlen ($ token ) - 1 ; $ i ++){
409419 $ c = $ token {$ i };
You can’t perform that action at this time.
0 commit comments