Skip to content

Commit 540f61e

Browse files
committed
Update the coding standards using phpcbf
1 parent 4869248 commit 540f61e

30 files changed

+84
-64
lines changed

src/Argument/Argument.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace League\CLImate\Argument;
44

55
use League\CLImate\Exceptions\UnexpectedValueException;
6+
67
use function is_array;
78

89
class Argument

src/Decorator/Component/BackgroundColor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class BackgroundColor extends Color
1010
*
1111
* @const integer ADD
1212
*/
13-
const ADD = 10;
13+
public const ADD = 10;
1414

1515
/**
1616
* Get the code for the requested color

src/Logger.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Psr\Log\AbstractLogger;
66
use Psr\Log\InvalidArgumentException;
77
use Psr\Log\LogLevel;
8+
89
use function array_key_exists;
910
use function is_array;
1011
use function str_replace;
@@ -50,7 +51,7 @@ public function __construct($level = LogLevel::INFO, CLImate $climate = null)
5051
$this->level = $this->convertLevel($level);
5152

5253
if ($climate === null) {
53-
$climate = new CLImate;
54+
$climate = new CLImate();
5455
}
5556
$this->climate = $climate;
5657

src/TerminalObject/Basic/BasicTerminalObject.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
abstract class BasicTerminalObject implements BasicTerminalObjectInterface
1212
{
13-
use SettingsImporter, ParserImporter, UtilImporter;
13+
use SettingsImporter;
14+
use ParserImporter;
15+
use UtilImporter;
1416

1517
/**
1618
* Set the property if there is a valid value

src/TerminalObject/Basic/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ protected function buildHeaderRow()
197197
$header_row = $this->getHeaderRow();
198198
if ($header_row) {
199199
$this->addLine($this->buildRow($header_row));
200-
$this->addLine((new Border)->char('=')->length($this->table_width)->result());
200+
$this->addLine((new Border())->char('=')->length($this->table_width)->result());
201201
}
202202
}
203203

src/TerminalObject/Dynamic/Animation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected function setSleeper($sleeper = null)
138138
*/
139139
protected function setKeyFrames($keyframes)
140140
{
141-
$this->keyframes = $keyframes ?: new Keyframe;
141+
$this->keyframes = $keyframes ?: new Keyframe();
142142
}
143143

144144
/**

src/TerminalObject/Dynamic/Animation/Keyframe.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
class Keyframe
1010
{
11-
use StringLength, ParserImporter, UtilImporter;
11+
use StringLength;
12+
use ParserImporter;
13+
use UtilImporter;
1214

1315
/**
1416
* Get the enter keyframes for the desired direction

src/TerminalObject/Dynamic/Checkbox/Checkbox.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
class Checkbox
1010
{
11-
use StringLength, ParserImporter, UtilImporter;
11+
use StringLength;
12+
use ParserImporter;
13+
use UtilImporter;
1214

1315
/**
1416
* The value of the checkbox

src/TerminalObject/Dynamic/Checkbox/CheckboxGroup.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
class CheckboxGroup
1010
{
11-
use OutputImporter, ParserImporter, UtilImporter;
11+
use OutputImporter;
12+
use ParserImporter;
13+
use UtilImporter;
1214

1315
protected $checkboxes = [];
1416

@@ -136,7 +138,7 @@ protected function getCurrent()
136138
*/
137139
protected function getCurrentKey($direction, $option, $key)
138140
{
139-
$method = 'get' . ucwords($direction). 'Key';
141+
$method = 'get' . ucwords($direction) . 'Key';
140142

141143
return $this->{$method}($option, $key);
142144
}

src/TerminalObject/Dynamic/Checkboxes.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ protected function handleCharacter($char)
102102
case "\n":
103103
$this->output->sameLine()->write($this->util->cursor->defaultStyle());
104104
$this->output->sameLine()->write("\e[0m");
105-
return true; // Break the while loop as well
105+
return true; // Break the while loop as well
106106

107107
case "\e":
108108
$this->handleAnsi();
109-
break;
109+
break;
110110

111111
case ' ':
112112
$this->checkboxes->toggleCurrent();
113-
break;
113+
break;
114114
}
115115

116116
return false;
@@ -136,12 +136,12 @@ protected function handleAnsi()
136136
// Up arrow
137137
case '[A':
138138
$this->checkboxes->setCurrent('previous');
139-
break;
139+
break;
140140

141141
// Down arrow
142142
case '[B':
143143
$this->checkboxes->setCurrent('next');
144-
break;
144+
break;
145145
}
146146
}
147147

0 commit comments

Comments
 (0)