| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| 1 | <?php |
||
| 33 | 6 | public function withName($name) { |
|
| 34 | 6 | if (is_string($name)) { |
|
| 35 | 3 | $this->nameQuery = Strict::create()->valueIs($name); |
|
| 36 | 6 | } elseif ($name instanceof QueryStrategy) { |
|
| 37 | 3 | $this->nameQuery = $name; |
|
| 38 | 3 | } else { |
|
| 39 | 3 | throw new \InvalidArgumentException('Invalid name format. Expect string or Query'); |
|
| 40 | } |
||
| 41 | |||
| 42 | 3 | return $this; |
|
| 43 | } |
||
| 44 | |||
| 65 | } |