Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[civiremote_entity] Code style #37

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/civiremote_entity/src/Api/CiviCRMApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion modules/civiremote_entity/src/Form/AbstractEntityForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Loading