apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -17,12 +17,12 @@ use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
interface ContextManagerInterface
{
/**
* @throws ContextNotFoundException When the context is not found.
* @throws ContextNotFoundException when the context is not found
*/
public function getContextByDocGeneratorTemplate(DocGeneratorTemplate $docGeneratorTemplate): DocGeneratorContextInterface;
/**
* @throws ContextNotFoundException When the context is not found.
* @throws ContextNotFoundException when the context is not found
*/
public function getContextByKey(string $searchedKey): DocGeneratorContextInterface;

View File

@@ -15,6 +15,7 @@ use Symfony\Component\Form\FormBuilderInterface;
/**
* @template T of object
*
* @extends DocGeneratorContextInterface<T>
*/
interface DocGeneratorContextWithAdminFormInterface extends DocGeneratorContextInterface

View File

@@ -16,6 +16,7 @@ use Symfony\Component\Form\FormBuilderInterface;
/**
* @template T of object
*
* @extends DocGeneratorContextInterface<T>
*/
interface DocGeneratorContextWithPublicFormInterface extends DocGeneratorContextInterface
@@ -28,7 +29,7 @@ interface DocGeneratorContextWithPublicFormInterface extends DocGeneratorContext
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, mixed $entity): void;
/**
* Fill the form with initial data
* Fill the form with initial data.
*
* @param T $entity
*/
@@ -42,14 +43,14 @@ interface DocGeneratorContextWithPublicFormInterface extends DocGeneratorContext
public function hasPublicForm(DocGeneratorTemplate $template, mixed $entity): bool;
/**
* Transform the data from the form into serializable data, storable into messenger's message
* Transform the data from the form into serializable data, storable into messenger's message.
*
* @param T $entity
*/
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, mixed $entity, array $data): array;
/**
* Reverse the data from the messenger's message into data usable for doc's generation
* Reverse the data from the messenger's message into data usable for doc's generation.
*
* @param T $entity
*/

View File

@@ -11,9 +11,7 @@ declare(strict_types=1);
namespace Chill\DocGeneratorBundle\Context\Exception;
use RuntimeException;
class ContextNotFoundException extends RuntimeException
class ContextNotFoundException extends \RuntimeException
{
public function __construct($contextName)
{

View File

@@ -11,13 +11,7 @@ declare(strict_types=1);
namespace Chill\DocGeneratorBundle\Context\Exception;
use LogicException;
use function get_class;
use function gettype;
use function is_object;
class UnexpectedTypeException extends LogicException
class UnexpectedTypeException extends \LogicException
{
public function __construct($value, string $expectedType)
{