| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.0261 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | 2 | public function __construct(array $settings = array()) |
|
| 15 | { |
||
| 16 | 2 | $this->settings = array_merge(array( |
|
| 17 | 2 | 'enabled' => true, |
|
| 18 | 'nodes' => [], |
||
| 19 | 'whitelist' => [], |
||
| 20 | 'blacklist' => [], |
||
| 21 | 'default_execution_priority' => 0, |
||
| 22 | 'node_visitor_priority' => 10 |
||
| 23 | ), $settings); |
||
| 24 | |||
| 25 | 2 | $this->settings['nodes']['RunOpenCode\\Twig\\BufferizedTemplate\\Tag\\Bufferize\\Node'] = $this->settings['default_execution_priority']; |
|
| 26 | |||
| 27 | 2 | if (count($this->settings['blacklist']) > 0 && count($this->settings['whitelist'])) { |
|
| 28 | throw new \InvalidArgumentException('You can use either black list or white list setting or non for bufferizing templates, but not both.'); |
||
| 29 | } |
||
| 30 | 2 | } |
|
| 31 | |||
| 50 |