| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4.016 |
| Changes | 5 | ||
| Bugs | 0 | Features | 3 |
| 1 | <?php |
||
| 19 | 25 | public function recognizeType($stuff) |
|
| 20 | { |
||
| 21 | 25 | switch (true) { |
|
| 22 | 25 | case $stuff instanceof \Closure: |
|
| 23 | 1 | return static::TYPE_CLOSURE; |
|
| 24 | 25 | case $stuff instanceof QueryBuilder: |
|
| 25 | 2 | return static::TYPE_SUB_QUERY; |
|
| 26 | 25 | case false !== strpos($stuff, '\\'): |
|
| 27 | 1 | return static::TYPE_CLASS_NAME; |
|
| 28 | } |
||
| 29 | |||
| 30 | 25 | return static::TYPE_TABLE_NAME; |
|
| 31 | } |
||
| 32 | |||
| 45 | } |