Conditions | 4 |
Paths | 5 |
Total Lines | 29 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace BestServedCold\PhalueObjects; |
||
28 | |||
29 | /** |
||
30 | * @return string |
||
31 | */ |
||
32 | public function getDirectoryName() |
||
33 | { |
||
34 | return pathinfo($this->getValue(), PATHINFO_DIRNAME); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return string |
||
39 | */ |
||
40 | public function getFileName() |
||
41 | { |
||
42 | return pathinfo($this->getValue(), PATHINFO_FILENAME); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param string $string |
||
47 | * @return static |
||
48 | */ |
||
49 | public static function fromString($string) |
||
50 | { |
||
51 | return new static($string); |
||
52 | } |
||
53 | } |
||
54 |
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.