| Conditions | 5 |
| Paths | 5 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | 6 | public function detect($path) |
|
| 11 | { |
||
| 12 | 6 | if (file_exists($path . '/concrete/config/version.php')) { |
|
| 13 | 6 | if (!defined('C5_EXECUTE')) { |
|
| 14 | 3 | define('C5_EXECUTE', true); |
|
| 15 | 2 | } |
|
| 16 | |||
| 17 | 6 | @include $path . '/concrete/config/version.php'; |
|
|
|
|||
| 18 | |||
| 19 | 6 | if (isset($APP_VERSION) && $APP_VERSION) { |
|
| 20 | 3 | return Site::create($path, $APP_VERSION); |
|
| 21 | } |
||
| 22 | 2 | } |
|
| 23 | |||
| 24 | 3 | return null; |
|
| 25 | } |
||
| 26 | } |
||
| 27 |
If you suppress an error, we recommend checking for the error condition explicitly: