| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | protected function isFileMatch(string $targetPath) : bool |
||
| 49 | { |
||
| 50 | $rawPath = Util\Path::withoutLeadingSlash($this->path->getPathRaw()); |
||
| 51 | $rawPath = !empty($rawPath) ? Util\Path::withTrailingSlash($rawPath) : $rawPath; |
||
| 52 | $pathRegex = Util\Path::datePlaceholdersToRegex($rawPath); |
||
| 53 | $fileRegex = Util\Path::datePlaceholdersToRegex($this->target->getFilenameRaw()); |
||
| 54 | $targetPath = Util\Path::withoutLeadingSlash($targetPath); |
||
| 55 | return preg_match('#' . $pathRegex . $fileRegex . '$#i', $targetPath); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |