Skip to content

Commit b304262

Browse files
author
Mathieu Ferment
committed
Fix codestyle
1 parent 8530eb7 commit b304262

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Util/TextColorWriter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Text Color Writer
55
*
66
* Thanks Thijs Lensselink
7+
*
78
* @link http://blog.lenss.nl/2012/05/adding-colors-to-php-cli-script-output/
89
*/
910
class TextColorWriter
@@ -20,6 +21,7 @@ class TextColorWriter
2021
*
2122
* @param string $string
2223
* @param int $colorID
24+
*
2325
* @return string
2426
*/
2527
public static function textColor($string, $colorID)
@@ -28,7 +30,7 @@ public static function textColor($string, $colorID)
2830
throw new Exception("Error unknown color ID $colorID");
2931
}
3032

31-
$colorChar = "\033[".$colorID."m";
33+
$colorChar = "\033[" . $colorID . "m";
3234
$coloredString = $colorChar . $string . "\033[0m";
3335

3436
return $coloredString;

explore_url.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ function validateInput($argv)
4848
require 'Util/TextColorWriter.php';
4949

5050
// parse url
51-
$url = $argv[1];
52-
$GETParts = explode('&', $url);
51+
$url = $argv[1];
52+
$GETParts = explode('&', $url);
5353
$pathParts = explode('?', $GETParts[0]);
5454

55-
$path = $pathParts[0];
55+
$path = $pathParts[0];
5656
$firstParameter = $pathParts[1];
5757
$moreParameters = array_slice($GETParts, 1);
58-
$parameters = array_merge(array($firstParameter), $moreParameters);
58+
$parameters = array_merge(array($firstParameter), $moreParameters);
5959

6060
// echo result
6161
echo TextColorWriter::textColor('URL ANALYSIS:', TextColorWriter::BASH_PROMPT_GREEN) . PHP_EOL;
62-
echo TextColorWriter::textColor('Path:', TextColorWriter::BASH_PROMPT_BLUE). ' '. $path . PHP_EOL;
63-
echo TextColorWriter::textColor('GET parameters:', TextColorWriter::BASH_PROMPT_BLUE). PHP_EOL;
62+
echo TextColorWriter::textColor('Path:', TextColorWriter::BASH_PROMPT_BLUE) . ' ' . $path . PHP_EOL;
63+
echo TextColorWriter::textColor('GET parameters:', TextColorWriter::BASH_PROMPT_BLUE) . PHP_EOL;
6464

6565
$urldecode = isset($argv[2]);
6666

0 commit comments

Comments
 (0)