@@ -29,14 +29,14 @@ public function __construct(string $row, int $column, CoordinateSystem $coordina
2929 {
3030 $ rows = $ coordinateSystem ->rows ();
3131 if (! in_array ($ row , $ rows , true )) {
32- $ rowList = \ implode (', ' , $ rows );
32+ $ rowList = implode (', ' , $ rows );
3333 throw new \InvalidArgumentException ("Expected a row with value of {$ rowList }, got {$ row }. " );
3434 }
3535 $ this ->row = $ row ;
3636
3737 $ columns = $ coordinateSystem ->columns ();
3838 if (! in_array ($ column , $ columns , true )) {
39- $ columnsList = \ implode (', ' , $ columns );
39+ $ columnsList = implode (', ' , $ columns );
4040 throw new \InvalidArgumentException ("Expected a column with value of {$ columnsList }, got {$ column }. " );
4141 }
4242 $ this ->column = $ column ;
@@ -67,13 +67,13 @@ public static function fromArray(array $coordinates, CoordinateSystem $coordinat
6767 public static function fromString (string $ coordinatesString , CoordinateSystem $ coordinateSystem ): self
6868 {
6969 $ rows = $ coordinateSystem ->rows ();
70- $ rowsOptions = \ implode ('| ' , $ rows );
70+ $ rowsOptions = implode ('| ' , $ rows );
7171
7272 $ columns = [
7373 ...$ coordinateSystem ->columns (),
7474 ...$ coordinateSystem ->paddedColumns (),
7575 ];
76- $ columnsOptions = \ implode ('| ' , $ columns );
76+ $ columnsOptions = implode ('| ' , $ columns );
7777
7878 $ valid = preg_match (
7979 "/^( {$ rowsOptions })( {$ columnsOptions }) \$/ " ,
@@ -84,7 +84,7 @@ public static function fromString(string $coordinatesString, CoordinateSystem $c
8484 if ($ valid === 0 ) {
8585 $ firstValidExample = Arr::first ($ rows ) . Arr::first ($ columns );
8686 $ lastValidExample = Arr::last ($ rows ) . Arr::last ($ columns );
87- $ coordinateSystemClass = \ get_class ($ coordinateSystem );
87+ $ coordinateSystemClass = get_class ($ coordinateSystem );
8888 throw new \InvalidArgumentException ("Expected coordinates between {$ firstValidExample } and {$ lastValidExample } for {$ coordinateSystemClass }, got: {$ coordinatesString }. " );
8989 }
9090 /** @var array{1: string, 2: string} $matches */
@@ -145,9 +145,9 @@ public function position(FlowDirection $direction): int
145145
146146 switch ($ direction ->value ) {
147147 case FlowDirection::ROW :
148- return $ rowIndex * \ count ($ this ->coordinateSystem ->columns ()) + $ columnIndex + 1 ;
148+ return $ rowIndex * count ($ this ->coordinateSystem ->columns ()) + $ columnIndex + 1 ;
149149 case FlowDirection::COLUMN :
150- return $ columnIndex * \ count ($ this ->coordinateSystem ->rows ()) + $ rowIndex + 1 ;
150+ return $ columnIndex * count ($ this ->coordinateSystem ->rows ()) + $ rowIndex + 1 ;
151151 // @codeCoverageIgnoreStart all Enums are listed and this should never happen
152152 default :
153153 throw new UnexpectedFlowDirection ($ direction );
0 commit comments