mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: fix cs
This commit is contained in:
parent
b1d4334c0f
commit
c35ca3dbeb
@ -151,6 +151,7 @@ final class CalendarContext implements CalendarContextInterface
|
||||
|
||||
/**
|
||||
* param array{mainPerson?: Person, thirdParty?: ThirdParty, title: string} $contextGenerationData
|
||||
* @param mixed $entity
|
||||
*/
|
||||
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array
|
||||
{
|
||||
|
@ -257,7 +257,8 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
return $this->render('@ChillDocGenerator/Generator/debug_value.html.twig', [
|
||||
'datas' => json_encode($context->getData($template, $entity, $contextGenerationData), JSON_PRETTY_PRINT)
|
||||
]);
|
||||
} elseif ($isTest) {
|
||||
}
|
||||
if ($isTest) {
|
||||
$generated = $this->generator->generateDocFromTemplate(
|
||||
$template,
|
||||
$entityId,
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Generator;
|
||||
|
||||
use Chill\DocGeneratorBundle\Context\ContextManagerInterface;
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Generator;
|
||||
|
||||
class GeneratorException extends \RuntimeException
|
||||
@ -12,8 +21,11 @@ class GeneratorException extends \RuntimeException
|
||||
public function __construct(array $errors = [], \Throwable $previous = null)
|
||||
{
|
||||
$this->errors = $errors;
|
||||
parent::__construct("Could not generate the document", 15252,
|
||||
$previous);
|
||||
parent::__construct(
|
||||
"Could not generate the document",
|
||||
15252,
|
||||
$previous
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Generator;
|
||||
|
||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Generator;
|
||||
|
||||
class ObjectReadyException extends \RuntimeException
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Generator;
|
||||
|
||||
class RelatedEntityNotFoundException extends \RuntimeException
|
||||
@ -9,6 +18,7 @@ class RelatedEntityNotFoundException extends \RuntimeException
|
||||
parent::__construct(
|
||||
sprintf("Related entity not found: %s, %s", $relatedEntityClass, $relatedEntityId),
|
||||
99876652,
|
||||
$previous);
|
||||
$previous
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Messenger;
|
||||
|
||||
use Chill\DocGeneratorBundle\Repository\DocGeneratorTemplateRepository;
|
||||
@ -31,7 +40,7 @@ final class OnGenerationFails implements EventSubscriberInterface
|
||||
|
||||
private UserRepositoryInterface $userRepository;
|
||||
|
||||
const LOG_PREFIX = '[docgen failed] ';
|
||||
public const LOG_PREFIX = '[docgen failed] ';
|
||||
|
||||
/**
|
||||
* @param DocGeneratorTemplateRepository $docGeneratorTemplateRepository
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Messenger;
|
||||
|
||||
use Chill\DocGeneratorBundle\Repository\DocGeneratorTemplateRepository;
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\Service\Messenger;
|
||||
|
||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||
|
@ -2,6 +2,13 @@
|
||||
|
||||
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\Migrations\DocGenerator;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\DocGeneratorBundle\tests\Service\Context\Generator;
|
||||
|
||||
use Chill\DocGeneratorBundle\Context\ContextManagerInterface;
|
||||
@ -17,6 +26,10 @@ use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class GeneratorTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
@ -29,7 +42,7 @@ class GeneratorTest extends TestCase
|
||||
$reflection = new \ReflectionClass($destinationStoredObject);
|
||||
$reflection->getProperty('id')->setAccessible(true);
|
||||
$reflection->getProperty('id')->setValue($destinationStoredObject, 1);
|
||||
$entity = new class {};
|
||||
$entity = new class () {};
|
||||
$data = [];
|
||||
|
||||
$context = $this->prophesize(DocGeneratorContextInterface::class);
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?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\Controller;
|
||||
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
|
@ -35,12 +35,11 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
*/
|
||||
class StoredObject implements AsyncFileInterface, Document, TrackCreationInterface
|
||||
{
|
||||
use TrackCreationTrait;
|
||||
public const STATUS_READY = "ready";
|
||||
public const STATUS_PENDING = "pending";
|
||||
public const STATUS_FAILURE = "failure";
|
||||
|
||||
use TrackCreationTrait;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json", name="datas")
|
||||
* @Serializer\Groups({"read", "write"})
|
||||
|
@ -2,6 +2,13 @@
|
||||
|
||||
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\Migrations\DocStore;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
@ -104,7 +104,8 @@ final class Editor
|
||||
$this->engine
|
||||
->render('@ChillWopi/Editor/stored_object_failure.html.twig')
|
||||
);
|
||||
} elseif (StoredObject::STATUS_PENDING === $storedObject->getStatus()) {
|
||||
}
|
||||
if (StoredObject::STATUS_PENDING === $storedObject->getStatus()) {
|
||||
return new Response(
|
||||
$this->engine
|
||||
->render('@ChillWopi/Editor/stored_object_pending.html.twig', [
|
||||
|
Loading…
x
Reference in New Issue
Block a user