| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class TaxonomyTermUrlExtension extends DataExtension |
||
| 17 | { |
||
| 18 | private static $db = array( |
||
| 19 | 'URLSegment' => 'Varchar(255)', |
||
| 20 | ); |
||
| 21 | |||
| 22 | public function updateCMSFields(FieldList $fields) |
||
| 23 | { |
||
| 24 | $field = $fields->dataFieldByName('URLSegment'); |
||
| 25 | if ($field) { |
||
| 26 | $field->setDescription('Leave blank to generate from name'); |
||
| 27 | $fields->insertAfter('Name', $field); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Set the URL segment allowing filtering by url slug |
||
| 33 | * |
||
| 34 | * {@inheritDoc} |
||
| 35 | */ |
||
| 36 | public function onBeforeWrite() { |
||
| 47 | } |
||
| 48 | } |
||
| 51 |
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