| Conditions | 4 |
| Paths | 3 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function requireDefaultRecords() |
||
| 24 | { |
||
| 25 | if (Config::inst()->get(CwpWorkflowDefinitionExtension::class, 'create_default_workflow')) { |
||
| 26 | // Only proceed if a definition using this template has not been created yet |
||
| 27 | $definition = WorkflowDefinition::get()->filter("Template", "Review and Approve")->First(); |
||
| 28 | if ($definition && $definition->exists()) { |
||
| 29 | return; |
||
| 30 | } |
||
| 31 | |||
| 32 | //generate from the template, which happens after we write the definition |
||
| 33 | $definition = WorkflowDefinition::create(); |
||
| 34 | $definition->Template = "Review and Approve"; |
||
| 35 | $definition->write(); |
||
| 36 | |||
| 37 | //change the title, description, and reminder days |
||
| 38 | $definition->update(array( |
||
| 39 | 'Title' => "Two-step Workflow", |
||
| 40 | 'Description' => "Content Authors can write content and Content Publishers can approve/reject.", |
||
| 41 | 'RemindDays' => 3, |
||
| 42 | )); |
||
| 43 | $definition->write(); |
||
| 44 | |||
| 45 | DB::alteration_message("Added default workflow definition to WorkflowDefinition table", "created"); |
||
| 46 | } |
||
| 49 |
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