| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function onAfterDuplicateToSubsite($originalPage) |
||
| 26 | { |
||
| 27 | $originalElementalArea = $originalPage->getComponent('ElementalArea'); |
||
| 28 | $duplicateElementalArea = $originalElementalArea->duplicate(false); |
||
| 29 | $duplicateElementalArea->write(); |
||
| 30 | $this->owner->ElementalAreaID = $duplicateElementalArea->ID; |
||
| 31 | $this->owner->write(); |
||
| 32 | |||
| 33 | foreach ($originalElementalArea->Items() as $originalElement) { |
||
| 34 | $duplicateElement = $originalElement->duplicate(true); |
||
| 35 | |||
| 36 | // manually set the ParentID of each element, so we don't get versioning issues |
||
| 37 | DB::query(sprintf("UPDATE Element SET ParentID = %d WHERE ID = %d", $duplicateElementalArea->ID, $duplicateElement->ID)); |
||
| 38 | } |
||
| 41 |
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