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