| Conditions | 9 |
| Paths | 4 |
| Total Lines | 25 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 15 | public function execute() { |
||
| 16 | |||
| 17 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
||
| 18 | $documentRepository = $objectManager->get(DocumentRepository::class); |
||
| 19 | $embargoDocuments = $documentRepository->crossClientEmbargoFindAll(); |
||
| 20 | |||
| 21 | $currentDate = new \DateTime('now'); |
||
| 22 | |||
| 23 | foreach ($embargoDocuments as $document) { |
||
| 24 | if ($currentDate > $document->getEmbargoDate()) { |
||
| 25 | |||
| 26 | if ($document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_ACTIVE OR |
||
| 27 | $document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_DELETED OR |
||
| 28 | $document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_INACTIVE OR |
||
| 29 | $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_IN_PROGRESS OR |
||
| 30 | $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_POSTPONED OR |
||
| 31 | $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_DISCARDED) { |
||
| 32 | // send message |
||
| 33 | $notifier = $objectManager->get(Notifier::class); |
||
| 34 | $notifier->sendEmbargoNotification($document); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | return TRUE; |
||
| 40 | } |
||
| 42 | } |
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