| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 13 |
| 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' => array(), |
||
| 19 | 'whitelist' => array(), |
||
| 20 | 'blacklist' => array(), |
||
| 21 | 'bufferManager' => 'RunOpenCode\\Twig\\BufferizedTemplate\\Buffer\\BufferManager', |
||
| 22 | 'defaultExecutionPriority' => 0, |
||
| 23 | 'nodeVisitorPriority' => 10 |
||
| 24 | ), $settings); |
||
| 25 | |||
| 26 | 2 | $this->settings['nodes']['RunOpenCode\\Twig\\BufferizedTemplate\\Tag\\Bufferize\\Node'] = $this->settings['defaultExecutionPriority']; |
|
| 27 | |||
| 28 | 2 | if (count($this->settings['blacklist']) > 0 && count($this->settings['whitelist'])) { |
|
| 29 | throw new \InvalidArgumentException('You can use either black list or white list setting or non for bufferizing templates, but not both.'); |
||
| 30 | } |
||
| 31 | 2 | } |
|
| 32 | |||
| 63 |