Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
27 | 5 | public function __construct(array $settings = array()) |
|
28 | { |
||
29 | 5 | $this->settings = array_merge(array( |
|
30 | 5 | 'nodes' => [], |
|
31 | 'whitelist' => [], |
||
32 | 'blacklist' => [], |
||
33 | 'default_execution_priority' => 0, |
||
34 | 'node_visitor_priority' => 10 |
||
35 | ), $settings); |
||
36 | |||
37 | 5 | $this->settings['nodes']['RunOpenCode\\Twig\\BufferizedTemplate\\Tag\\Bufferize\\Node'] = $this->settings['default_execution_priority']; |
|
38 | |||
39 | 5 | if (count($this->settings['blacklist']) > 0 && count($this->settings['whitelist'])) { |
|
40 | 1 | throw new InvalidArgumentException('You can use either black list or white list setting or non for bufferizing templates, but not both.'); |
|
41 | } |
||
42 | 4 | } |
|
43 | |||
64 |