1 | <?php |
||
8 | final class RotateAction implements ActionInterface |
||
9 | { |
||
10 | private static $rotateMap = [ |
||
11 | 'left' => [ |
||
12 | 'up' => 'left', |
||
13 | 'down' => 'right', |
||
14 | 'right' => 'up', |
||
15 | 'left' => 'down', |
||
16 | ], |
||
17 | 'right' => [ |
||
18 | 'up' => 'right', |
||
19 | 'down' => 'left', |
||
20 | 'right' => 'down', |
||
21 | 'left' => 'up', |
||
22 | ], |
||
23 | ]; |
||
24 | |||
25 | public function execute(Board $board, string $alias, array $operation) |
||
32 | |||
33 | public function getAlias(): string |
||
37 | |||
38 | public function getArguments(): array |
||
42 | } |
||
43 |
Late static binding only has effect in subclasses. A
final
class cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::
withself::
.To learn more about late static binding, please refer to the PHP core documentation.