| 1 | <?php |
||
| 22 | class Move implements StrategyInterface { |
||
| 23 | |||
| 24 | |||
| 25 | /** |
||
| 26 | * @var int |
||
| 27 | */ |
||
| 28 | protected $steps = null; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var int |
||
| 32 | */ |
||
| 33 | protected $direction = null; |
||
| 34 | |||
| 35 | |||
| 36 | /** |
||
| 37 | * @param int $steps |
||
| 38 | * @return static |
||
| 39 | */ |
||
| 40 | 7 | public static function create($steps) { |
|
| 43 | |||
| 44 | |||
| 45 | /** |
||
| 46 | * You can pass positive and negative numbers |
||
| 47 | * Positive - move forward |
||
| 48 | * Negative - move backward |
||
| 49 | * |
||
| 50 | * @param int $steps |
||
| 51 | */ |
||
| 52 | 6 | public function __construct($steps) { |
|
| 61 | |||
| 62 | |||
| 63 | /** |
||
| 64 | * @inheritdoc |
||
| 65 | */ |
||
| 66 | 4 | public function process(\Funivan\PhpTokenizer\Collection $collection, $currentIndex) { |
|
| 81 | |||
| 82 | } |