| Total Complexity | 8 |
| Total Lines | 79 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class SlugMakerOptions |
||
| 6 | { |
||
| 7 | /** @var string|array|callable */ |
||
| 8 | public $generateSlugFrom; |
||
| 9 | |||
| 10 | /** @var bool */ |
||
| 11 | public $generateUniqueSlugs = true; |
||
| 12 | |||
| 13 | /** @var int */ |
||
| 14 | public $maximumLength = 250; |
||
| 15 | |||
| 16 | /** @var bool */ |
||
| 17 | public $generateSlugsOnCreate = true; |
||
| 18 | |||
| 19 | /** @var bool */ |
||
| 20 | public $generateSlugsOnUpdate = true; |
||
| 21 | |||
| 22 | /** @var string */ |
||
| 23 | public $slugSeparator = '-'; |
||
| 24 | |||
| 25 | /** @var bool */ |
||
| 26 | public $removeSlugsOnDelete = true; |
||
| 27 | |||
| 28 | public static function create(): SlugMakerOptions |
||
| 29 | { |
||
| 30 | return new static(); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param $fieldName |
||
| 35 | * @return \App\Models\SlugMaker\SlugMakerOptions |
||
|
|
|||
| 36 | */ |
||
| 37 | public function generateSlugsFrom($fieldName): SlugMakerOptions |
||
| 38 | { |
||
| 39 | $this->generateSlugFrom = $fieldName; |
||
| 40 | |||
| 41 | return $this; |
||
| 42 | } |
||
| 43 | |||
| 44 | private function allowDuplicateSlugs(): SlugMakerOptions |
||
| 45 | { |
||
| 46 | $this->generateUniqueSlugs = false; |
||
| 47 | |||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function slugsShouldBeNoLongerThan(int $maximumLength): SlugMakerOptions |
||
| 52 | { |
||
| 53 | $this->maximumLength = $maximumLength; |
||
| 54 | |||
| 55 | return $this; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function doNotGenerateSlugsOnCreate(): SlugMakerOptions |
||
| 59 | { |
||
| 60 | $this->generateSlugsOnCreate = false; |
||
| 61 | |||
| 62 | return $this; |
||
| 63 | } |
||
| 64 | |||
| 65 | public function doNotGenerateSlugsOnUpdate(): SlugMakerOptions |
||
| 66 | { |
||
| 67 | $this->generateSlugsOnUpdate = false; |
||
| 68 | |||
| 69 | return $this; |
||
| 70 | } |
||
| 71 | |||
| 72 | public function doNotRemoveSlugsOnDelete(): SlugMakerOptions |
||
| 77 | } |
||
| 78 | |||
| 79 | public function usingSeparator(string $separator): SlugMakerOptions |
||
| 80 | { |
||
| 84 | } |
||
| 85 | } |
||
| 86 |
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