| Total Complexity | 9 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | abstract class Storable |
||
| 12 | { |
||
| 13 | const REGEXP_PATH = '@^(([a-zA-Z0-9._\-][\/]?))+$@'; |
||
| 14 | const REGEXP_NAME = '@^(([a-zA-Z0-9._\-]?))+$@'; |
||
| 15 | const DS = DIRECTORY_SEPARATOR; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | private $path; |
||
| 19 | |||
| 20 | /** @var Directory */ |
||
| 21 | private $directory; |
||
| 22 | |||
| 23 | /** @return string */ |
||
| 24 | public function __toString() |
||
| 25 | { |
||
| 26 | return $this->getPath(); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** @return string */ |
||
| 30 | public function getPath() |
||
| 31 | { |
||
| 32 | return $this->path; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** @return string */ |
||
| 36 | public function getAbsolutePath() |
||
| 37 | { |
||
| 38 | return BASE_PATH . static::DS . $this->path; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Retorna o diretório pai |
||
| 43 | * @return Directory |
||
| 44 | */ |
||
| 45 | public function getDirectory() |
||
| 53 | } |
||
| 54 | |||
| 55 | /** @return string */ |
||
| 56 | public function getName() |
||
| 57 | { |
||
| 58 | return pathinfo($this->getAbsolutePath(), PATHINFO_FILENAME); |
||
| 59 | } |
||
| 60 | |||
| 61 | /** @return string */ |
||
| 62 | public function getBaseName() |
||
| 65 | } |
||
| 66 | |||
| 67 | /** @return string */ |
||
| 68 | public function getUpdatedAt() |
||
| 69 | { |
||
| 73 | } |
||
| 74 | |||
| 75 | /** @param string $path */ |
||
| 76 | protected function setPath($path) |
||
| 81 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths