Skip to content

Commit ba2bdb9

Browse files
authored
Apply fixes from StyleCI (#141)
1 parent 7565f82 commit ba2bdb9

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

src/PrinterInit.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ public function __construct()
1515
{
1616
}
1717

18-
public function init($use_colors = "never")
18+
public function init($use_colors = 'never')
1919
{
20-
2120
$phpunit_xml_file = './phpunit.xml';
2221
if (!file_exists($phpunit_xml_file)) {
2322
$phpunit_xml_file = './phpunit.xml.dist';

src/PrinterTrait.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ public function __construct(
9595
$this->maxClassNameLength = 32;
9696
}
9797

98-
9998
$this->init($colors);
10099
}
101100

@@ -152,26 +151,24 @@ public function packageName()
152151
return '<unknown>';
153152
}
154153

155-
protected function init($use_color = "always")
154+
protected function init($use_color = 'always')
156155
{
157156
if (!self::$init) {
158157
$version = $this->version();
159158
$name = $this->packageName();
160159
echo PHP_EOL;
161-
if($use_color !== "never") {
160+
if ($use_color !== 'never') {
162161
echo $this->colorsTool->green() . "${name} ${version} by Codedungeon and contributors." . PHP_EOL;
163162
echo $this->colorsTool->reset();
164163
} else {
165164
echo "${name} ${version} by Codedungeon and contributors." . PHP_EOL;
166165
}
167166

168-
169167
if ($this->showConfig) {
170168
$home = getenv('HOME');
171169
$filename = str_replace($home, '~', $this->configFileName);
172170

173-
if($use_color !== "never")
174-
{
171+
if ($use_color !== 'never') {
175172
echo $this->colorsTool->yellow() . '==> Configuration: ';
176173
echo $this->colorsTool->yellow() . $filename;
177174
echo $this->colorsTool->reset();

src/ResultPrinter71.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ protected function setMessageColor(string $type, $msg): string
174174

175175
// otherwise, we have colors enabled and time to make it pretty
176176
$testMarker = $this->markers[$marker] ?? '';
177-
return "\033[01;{$color}m{$testMarker}{$msg}\033[0m";
177+
178+
return "\033[01;{$color}m{$testMarker}{$msg}\033[0m";
178179
}
179180
}
180181
}

src/init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
require_once 'PrinterInit.php';
44

55
$init = new PrinterInit();
6-
$init->init("always");
6+
$init->init('always');

0 commit comments

Comments
 (0)