@@ -29,14 +29,14 @@ public function __construct(string $row, int $column, CoordinateSystem $coordina
29
29
{
30
30
$ rows = $ coordinateSystem ->rows ();
31
31
if (! in_array ($ row , $ rows , true )) {
32
- $ rowList = \ implode (', ' , $ rows );
32
+ $ rowList = implode (', ' , $ rows );
33
33
throw new \InvalidArgumentException ("Expected a row with value of {$ rowList }, got {$ row }. " );
34
34
}
35
35
$ this ->row = $ row ;
36
36
37
37
$ columns = $ coordinateSystem ->columns ();
38
38
if (! in_array ($ column , $ columns , true )) {
39
- $ columnsList = \ implode (', ' , $ columns );
39
+ $ columnsList = implode (', ' , $ columns );
40
40
throw new \InvalidArgumentException ("Expected a column with value of {$ columnsList }, got {$ column }. " );
41
41
}
42
42
$ this ->column = $ column ;
@@ -67,13 +67,13 @@ public static function fromArray(array $coordinates, CoordinateSystem $coordinat
67
67
public static function fromString (string $ coordinatesString , CoordinateSystem $ coordinateSystem ): self
68
68
{
69
69
$ rows = $ coordinateSystem ->rows ();
70
- $ rowsOptions = \ implode ('| ' , $ rows );
70
+ $ rowsOptions = implode ('| ' , $ rows );
71
71
72
72
$ columns = [
73
73
...$ coordinateSystem ->columns (),
74
74
...$ coordinateSystem ->paddedColumns (),
75
75
];
76
- $ columnsOptions = \ implode ('| ' , $ columns );
76
+ $ columnsOptions = implode ('| ' , $ columns );
77
77
78
78
$ valid = preg_match (
79
79
"/^( {$ rowsOptions })( {$ columnsOptions }) \$/ " ,
@@ -84,7 +84,7 @@ public static function fromString(string $coordinatesString, CoordinateSystem $c
84
84
if ($ valid === 0 ) {
85
85
$ firstValidExample = Arr::first ($ rows ) . Arr::first ($ columns );
86
86
$ lastValidExample = Arr::last ($ rows ) . Arr::last ($ columns );
87
- $ coordinateSystemClass = \ get_class ($ coordinateSystem );
87
+ $ coordinateSystemClass = get_class ($ coordinateSystem );
88
88
throw new \InvalidArgumentException ("Expected coordinates between {$ firstValidExample } and {$ lastValidExample } for {$ coordinateSystemClass }, got: {$ coordinatesString }. " );
89
89
}
90
90
/** @var array{1: string, 2: string} $matches */
@@ -145,9 +145,9 @@ public function position(FlowDirection $direction): int
145
145
146
146
switch ($ direction ->value ) {
147
147
case FlowDirection::ROW :
148
- return $ rowIndex * \ count ($ this ->coordinateSystem ->columns ()) + $ columnIndex + 1 ;
148
+ return $ rowIndex * count ($ this ->coordinateSystem ->columns ()) + $ columnIndex + 1 ;
149
149
case FlowDirection::COLUMN :
150
- return $ columnIndex * \ count ($ this ->coordinateSystem ->rows ()) + $ rowIndex + 1 ;
150
+ return $ columnIndex * count ($ this ->coordinateSystem ->rows ()) + $ rowIndex + 1 ;
151
151
// @codeCoverageIgnoreStart all Enums are listed and this should never happen
152
152
default :
153
153
throw new UnexpectedFlowDirection ($ direction );
0 commit comments