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

@@ -13,5 +13,5 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver;
interface DriverInterface
{
public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string;
public function generateFromString(string $template, string $resourceType, array $data, string $templateName = null): string;
}

View File

@@ -11,16 +11,13 @@ declare(strict_types=1);
namespace Chill\DocGeneratorBundle\GeneratorDriver\Exception;
use RuntimeException;
use Throwable;
/**
* A exception to throw when there are syntax errors in the
* template file.
*/
class TemplateException extends RuntimeException
class TemplateException extends \RuntimeException
{
public function __construct(private readonly array $errors, $code = 0, ?Throwable $previous = null)
public function __construct(private readonly array $errors, $code = 0, \Throwable $previous = null)
{
parent::__construct('Error while generating document from template', $code, $previous);
}

View File

@@ -20,7 +20,6 @@ use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Throwable;
final class RelatorioDriver implements DriverInterface
{
@@ -34,7 +33,7 @@ final class RelatorioDriver implements DriverInterface
$this->url = $parameterBag->get('chill_doc_generator')['driver']['relatorio']['url'];
}
public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string
public function generateFromString(string $template, string $resourceType, array $data, string $templateName = null): string
{
$form = new FormDataPart(
[
@@ -84,7 +83,7 @@ final class RelatorioDriver implements DriverInterface
]);
throw $e;
} catch (Throwable $exception) {
} catch (\Throwable $exception) {
$this
->logger
->error(