| Total Complexity | 7 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | trait CaseSensitiveTrait |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var bool |
||
| 16 | */ |
||
| 17 | private $caseSensitivity = null; |
||
| 18 | |||
| 19 | 481 | private function pushCaseSensitivityToContext(Context $context) |
|
| 20 | { |
||
| 21 | 481 | if ($this->caseSensitivity !== null) { |
|
| 22 | 30 | $context->pushCaseSensitivity($this->caseSensitivity); |
|
| 23 | } |
||
| 24 | 481 | } |
|
| 25 | |||
| 26 | 481 | private function popCaseSensitivityFromContext(Context $context) |
|
| 27 | { |
||
| 28 | 481 | if ($this->caseSensitivity !== null) { |
|
| 29 | 30 | $context->popCaseSensitivity(); |
|
| 30 | } |
||
| 31 | 481 | } |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @param bool $preference |
||
| 35 | * |
||
| 36 | * @return $this |
||
| 37 | */ |
||
| 38 | 1 | public function setCaseSensitivity($preference) |
|
| 39 | { |
||
| 40 | 1 | $this->caseSensitivity = $preference; |
|
| 41 | |||
| 42 | 1 | return $this; |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | public function caseSensitive() |
|
| 50 | } |
||
| 51 | |||
| 52 | 1 | public function caseInsensitive() |
|
| 57 | } |
||
| 58 | } |
||
| 59 |