@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | public function getRowAndSeat() |
43 | 43 | { |
44 | - if( !$this->event->seatMap->layout ) { |
|
44 | + if (!$this->event->seatMap->layout) { |
|
45 | 45 | return null; |
46 | 46 | } |
47 | 47 | |
@@ -49,15 +49,15 @@ discard block |
||
49 | 49 | $columnCounter = 0; |
50 | 50 | $result = []; |
51 | 51 | $rows = json_decode($this->event->seatMap->layout); |
52 | - foreach( $rows as $rowId => $row ) { |
|
52 | + foreach ($rows as $rowId => $row) { |
|
53 | 53 | $columnCounter = 0; |
54 | - foreach( str_split($row) as $charId => $char) { |
|
55 | - if($char === 'a') { |
|
54 | + foreach (str_split($row) as $charId => $char) { |
|
55 | + if ($char === 'a') { |
|
56 | 56 | $counter++; |
57 | 57 | $columnCounter++; |
58 | 58 | } |
59 | - if($counter === $this->seat_number) { |
|
60 | - $result['row'] = $rowId+1; |
|
59 | + if ($counter === $this->seat_number) { |
|
60 | + $result['row'] = $rowId + 1; |
|
61 | 61 | $result['seat'] = $columnCounter; |
62 | 62 | break; |
63 | 63 | } |