From c839d1c2e29fce02c6e2f69f1767633ac70df45b Mon Sep 17 00:00:00 2001 From: Dominic Tubach Date: Tue, 24 Sep 2024 12:05:06 +0200 Subject: [PATCH] [civiremote_entity] Code style --- modules/civiremote_entity/src/Api/CiviCRMApiClient.php | 2 +- .../src/Api/Exception/ApiCallFailedException.php | 2 +- modules/civiremote_entity/src/CiviCRMPage/CiviCRMPageClient.php | 2 +- .../civiremote_entity/src/Controller/CiviCRMPageController.php | 2 +- modules/civiremote_entity/src/Form/AbstractEntityForm.php | 2 +- modules/civiremote_entity/src/Form/Control/FileArrayFactory.php | 2 +- .../src/Form/Control/InternalLinkArrayFactory.php | 2 +- .../src/Form/RequestHandler/EntityCreateFormRequestHandler.php | 2 +- .../src/Form/RequestHandler/EntityUpdateFormRequestHandler.php | 2 +- .../src/Form/ResponseHandler/FormResponseHandlerChain.php | 2 +- .../src/Form/ResponseHandler/FormResponseHandlerInterface.php | 2 +- .../src/Form/ResponseHandler/FormResponseHandlerMessage.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/civiremote_entity/src/Api/CiviCRMApiClient.php b/modules/civiremote_entity/src/Api/CiviCRMApiClient.php index c3e10d3..ec1c567 100644 --- a/modules/civiremote_entity/src/Api/CiviCRMApiClient.php +++ b/modules/civiremote_entity/src/Api/CiviCRMApiClient.php @@ -23,8 +23,8 @@ use Assert\Assertion; use CMRF\Core\Call; use CMRF\Core\Core; -use Drupal\civiremote_entity\Api\Exception\ApiCallFailedException; use Drupal\Core\Config\ImmutableConfig; +use Drupal\civiremote_entity\Api\Exception\ApiCallFailedException; final class CiviCRMApiClient implements CiviCRMApiClientInterface { diff --git a/modules/civiremote_entity/src/Api/Exception/ApiCallFailedException.php b/modules/civiremote_entity/src/Api/Exception/ApiCallFailedException.php index 13737a2..f2e5fbc 100644 --- a/modules/civiremote_entity/src/Api/Exception/ApiCallFailedException.php +++ b/modules/civiremote_entity/src/Api/Exception/ApiCallFailedException.php @@ -33,7 +33,7 @@ public static function fromCall(Call $call): self { return new self($call, $reply['error_message'], (int) $reply['error_code']); } - public function __construct(Call $call, string $message = '', int $code = 0, \Throwable $previous = NULL) { + public function __construct(Call $call, string $message = '', int $code = 0, ?\Throwable $previous = NULL) { parent::__construct($message, $code, $previous); $this->call = $call; } diff --git a/modules/civiremote_entity/src/CiviCRMPage/CiviCRMPageClient.php b/modules/civiremote_entity/src/CiviCRMPage/CiviCRMPageClient.php index f10be8f..0587884 100644 --- a/modules/civiremote_entity/src/CiviCRMPage/CiviCRMPageClient.php +++ b/modules/civiremote_entity/src/CiviCRMPage/CiviCRMPageClient.php @@ -22,8 +22,8 @@ use Assert\Assertion; use CMRF\Core\Core; -use Drupal\civiremote_entity\Access\RemoteContactIdProviderInterface; use Drupal\Core\Config\ImmutableConfig; +use Drupal\civiremote_entity\Access\RemoteContactIdProviderInterface; use GuzzleHttp\ClientInterface; use Psr\Http\Message\ResponseInterface; diff --git a/modules/civiremote_entity/src/Controller/CiviCRMPageController.php b/modules/civiremote_entity/src/Controller/CiviCRMPageController.php index 2fab07d..0b40821 100644 --- a/modules/civiremote_entity/src/Controller/CiviCRMPageController.php +++ b/modules/civiremote_entity/src/Controller/CiviCRMPageController.php @@ -20,9 +20,9 @@ namespace Drupal\civiremote_entity\Controller; +use Drupal\Core\Controller\ControllerBase; use Drupal\civiremote_entity\CiviCRMPage\CiviCRMPageProxyInterface; use Drupal\civiremote_entity\CiviCRMPage\CiviCRMUrlStorageInterface; -use Drupal\Core\Controller\ControllerBase; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; diff --git a/modules/civiremote_entity/src/Form/AbstractEntityForm.php b/modules/civiremote_entity/src/Form/AbstractEntityForm.php index 93b810a..124549b 100644 --- a/modules/civiremote_entity/src/Form/AbstractEntityForm.php +++ b/modules/civiremote_entity/src/Form/AbstractEntityForm.php @@ -21,11 +21,11 @@ namespace Drupal\civiremote_entity\Form; use Assert\Assertion; +use Drupal\Core\Form\FormStateInterface; use Drupal\civiremote_entity\Api\Exception\ApiCallFailedException; use Drupal\civiremote_entity\Api\Form\EntityForm; use Drupal\civiremote_entity\Form\RequestHandler\FormRequestHandlerInterface; use Drupal\civiremote_entity\Form\ResponseHandler\FormResponseHandlerInterface; -use Drupal\Core\Form\FormStateInterface; use Drupal\json_forms\Form\AbstractJsonFormsForm; use Drupal\json_forms\Form\FormArrayFactoryInterface; use Drupal\json_forms\Form\Util\FieldNameUtil; diff --git a/modules/civiremote_entity/src/Form/Control/FileArrayFactory.php b/modules/civiremote_entity/src/Form/Control/FileArrayFactory.php index a113980..224c33d 100644 --- a/modules/civiremote_entity/src/Form/Control/FileArrayFactory.php +++ b/modules/civiremote_entity/src/Form/Control/FileArrayFactory.php @@ -21,9 +21,9 @@ namespace Drupal\civiremote_entity\Form\Control; use Assert\Assertion; +use Drupal\Core\Form\FormStateInterface; use Drupal\civiremote_entity\CiviCRMPage\CiviCRMUrlStorageInterface; use Drupal\civiremote_entity\Form\Control\Callbacks\FileValueCallback; -use Drupal\Core\Form\FormStateInterface; use Drupal\json_forms\Form\AbstractConcreteFormArrayFactory; use Drupal\json_forms\Form\Control\ObjectArrayFactory; use Drupal\json_forms\Form\Control\Util\BasicFormPropertiesFactory; diff --git a/modules/civiremote_entity/src/Form/Control/InternalLinkArrayFactory.php b/modules/civiremote_entity/src/Form/Control/InternalLinkArrayFactory.php index db810d9..b75667f 100644 --- a/modules/civiremote_entity/src/Form/Control/InternalLinkArrayFactory.php +++ b/modules/civiremote_entity/src/Form/Control/InternalLinkArrayFactory.php @@ -22,8 +22,8 @@ namespace Drupal\civiremote_entity\Form\Control; use Assert\Assertion; -use Drupal\civiremote_entity\CiviCRMPage\CiviCRMUrlStorageInterface; use Drupal\Core\Form\FormStateInterface; +use Drupal\civiremote_entity\CiviCRMPage\CiviCRMUrlStorageInterface; use Drupal\json_forms\Form\AbstractConcreteFormArrayFactory; use Drupal\json_forms\Form\Control\Rule\StatesArrayFactory; use Drupal\json_forms\Form\FormArrayFactoryInterface; diff --git a/modules/civiremote_entity/src/Form/RequestHandler/EntityCreateFormRequestHandler.php b/modules/civiremote_entity/src/Form/RequestHandler/EntityCreateFormRequestHandler.php index e7f55c8..09b4526 100644 --- a/modules/civiremote_entity/src/Form/RequestHandler/EntityCreateFormRequestHandler.php +++ b/modules/civiremote_entity/src/Form/RequestHandler/EntityCreateFormRequestHandler.php @@ -21,11 +21,11 @@ namespace Drupal\civiremote_entity\Form\RequestHandler; use Assert\Assertion; +use Drupal\Core\Routing\RouteMatch; use Drupal\civiremote_entity\Api\AbstractEntityApi; use Drupal\civiremote_entity\Api\Form\EntityForm; use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; use Drupal\civiremote_entity\Api\Form\FormValidationResponse; -use Drupal\Core\Routing\RouteMatch; use Symfony\Component\HttpFoundation\Request; class EntityCreateFormRequestHandler implements FormRequestHandlerInterface { diff --git a/modules/civiremote_entity/src/Form/RequestHandler/EntityUpdateFormRequestHandler.php b/modules/civiremote_entity/src/Form/RequestHandler/EntityUpdateFormRequestHandler.php index 74a8e43..dcc17a4 100644 --- a/modules/civiremote_entity/src/Form/RequestHandler/EntityUpdateFormRequestHandler.php +++ b/modules/civiremote_entity/src/Form/RequestHandler/EntityUpdateFormRequestHandler.php @@ -21,11 +21,11 @@ namespace Drupal\civiremote_entity\Form\RequestHandler; use Assert\Assertion; +use Drupal\Core\Routing\RouteMatch; use Drupal\civiremote_entity\Api\AbstractEntityApi; use Drupal\civiremote_entity\Api\Form\EntityForm; use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; use Drupal\civiremote_entity\Api\Form\FormValidationResponse; -use Drupal\Core\Routing\RouteMatch; use Symfony\Component\HttpFoundation\Request; class EntityUpdateFormRequestHandler implements FormRequestHandlerInterface { diff --git a/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerChain.php b/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerChain.php index cd368c6..f599086 100644 --- a/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerChain.php +++ b/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerChain.php @@ -20,8 +20,8 @@ namespace Drupal\civiremote_entity\Form\ResponseHandler; -use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; use Drupal\Core\Form\FormStateInterface; +use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; /** * @codeCoverageIgnore diff --git a/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerInterface.php b/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerInterface.php index b4f4cbc..960072a 100644 --- a/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerInterface.php +++ b/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerInterface.php @@ -20,8 +20,8 @@ namespace Drupal\civiremote_entity\Form\ResponseHandler; -use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; use Drupal\Core\Form\FormStateInterface; +use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; interface FormResponseHandlerInterface { diff --git a/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerMessage.php b/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerMessage.php index c66c405..4419268 100644 --- a/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerMessage.php +++ b/modules/civiremote_entity/src/Form/ResponseHandler/FormResponseHandlerMessage.php @@ -20,10 +20,10 @@ namespace Drupal\civiremote_entity\Form\ResponseHandler; -use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\civiremote_entity\Api\Form\FormSubmitResponse; class FormResponseHandlerMessage implements FormResponseHandlerInterface {