Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 118 | public function __construct($filePath) |
|
19 | { |
||
20 | 118 | $this->fs = new Filesystem(); |
|
21 | 118 | $p = $this->filePath = $this->fs->absolutePath((string)$filePath); |
|
22 | |||
23 | 118 | if (!$this->fs->exists($p)) |
|
24 | 118 | { |
|
25 | 1 | throw new FileNotFoundException("The following file could not be found: ${p}"); |
|
26 | } |
||
27 | |||
28 | $this->extension = strtolower($this->fs->getExtension($p)); |
||
29 | |||
30 | $this->refreshFileContent(); |
||
31 | } |
||
32 | |||
60 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.