| Total Complexity | 7 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 90.91% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class BootstrapService |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @const |
||
| 11 | */ |
||
| 12 | const CONFIGURATION_KEY = 'bootstrap'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param ArrayNodeDefinition $definition |
||
| 16 | * |
||
| 17 | * @throws \RuntimeException |
||
| 18 | * |
||
| 19 | * @codeCoverageIgnore |
||
| 20 | */ |
||
| 21 | public function configure(ArrayNodeDefinition $definition) |
||
| 22 | { |
||
| 23 | $definition |
||
| 24 | ->children() |
||
| 25 | ->arrayNode(self::CONFIGURATION_KEY) |
||
| 26 | ->prototype('array') |
||
| 27 | ->beforeNormalization() |
||
| 28 | ->ifString() |
||
| 29 | ->then(function ($v) { |
||
| 30 | return [ |
||
| 31 | 'command' => $v, |
||
| 32 | ]; |
||
| 33 | }) |
||
| 34 | ->end() |
||
| 35 | ->children() |
||
| 36 | ->scalarNode('command') |
||
| 37 | ->isRequired() |
||
| 38 | ->end() |
||
| 39 | ->end() |
||
| 40 | ->end() |
||
| 41 | ->end() |
||
| 42 | ->end(); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Include configured bootstrap file. |
||
| 47 | * |
||
| 48 | * @param array $config |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | 4 | public function load(array $config) |
|
| 70 | } |
||
| 71 | } |
||
| 72 |