Php cs fixes

This commit is contained in:
2024-07-04 11:39:02 +02:00
parent 428494ca1f
commit 21b79c1981
26 changed files with 133 additions and 80 deletions

View File

@@ -1,18 +1,23 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\DocStoreBundle\Service;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
use Chill\MainBundle\Workflow\EntityWorkflowManager;
use Symfony\Component\Security\Core\Security;
class WorkflowDocumentService
{
public function __construct(private readonly Security $security, private readonly EntityWorkflowManager $entityWorkflowManager)
{
}
public function __construct(private readonly Security $security, private readonly EntityWorkflowManager $entityWorkflowManager) {}
public function notBlockedByWorkflow(object $entity): bool
{
@@ -22,7 +27,6 @@ class WorkflowDocumentService
$workflow = $this->entityWorkflowManager->findByRelatedEntity($entity);
$currentUser = $this->security->getUser();
if (null != $workflow) {
if ($workflow->isFinal()) {
return false;
@@ -35,5 +39,4 @@ class WorkflowDocumentService
return true;
}
}