| 1 | <?php  | 
            ||
| 10 | abstract class AbstractPass implements PassInterface  | 
            ||
| 11 | { | 
            ||
| 12 | /**  | 
            ||
| 13 | * @var bool Whether the current set of strings is optional  | 
            ||
| 14 | */  | 
            ||
| 15 | protected $isOptional;  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | 	* {@inheritdoc} | 
            ||
| 19 | */  | 
            ||
| 20 | 27 | public function run(array $strings)  | 
            |
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * Process the list of strings after the pass is run  | 
            ||
| 34 | *  | 
            ||
| 35 | * @param array[] $strings  | 
            ||
| 36 | * @return array[]  | 
            ||
| 37 | */  | 
            ||
| 38 | 27 | protected function afterRun(array $strings)  | 
            |
| 47 | |||
| 48 | /**  | 
            ||
| 49 | * Prepare the list of strings before the pass is run  | 
            ||
| 50 | *  | 
            ||
| 51 | * @param array[] $strings  | 
            ||
| 52 | * @return array[]  | 
            ||
| 53 | */  | 
            ||
| 54 | 27 | protected function beforeRun(array $strings)  | 
            |
| 64 | |||
| 65 | /**  | 
            ||
| 66 | * Test whether this pass can be run on a given list of strings  | 
            ||
| 67 | *  | 
            ||
| 68 | * @param array[] $strings  | 
            ||
| 69 | * @return bool  | 
            ||
| 70 | */  | 
            ||
| 71 | 19 | protected function canRun(array $strings)  | 
            |
| 75 | |||
| 76 | /**  | 
            ||
| 77 | * Run this pass on a list of strings  | 
            ||
| 78 | *  | 
            ||
| 79 | * @param array[] $strings  | 
            ||
| 80 | * @return array[]  | 
            ||
| 81 | */  | 
            ||
| 82 | abstract protected function runPass(array $strings);  | 
            ||
| 83 | }  |