Loading modules/actions_permissions/src/EventSubscriber/ActionsPermissionsEventSubscriber.php +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ class ActionsPermissionsEventSubscriber implements EventSubscriberInterface { // Subscribe to the VBO event with low priority // to let other modules alter requirements first. const PRIORITY = -999; private const PRIORITY = -999; /** * {@inheritdoc} Loading modules/views_bulk_operations_example/src/Plugin/Action/ViewsBulkOperationExampleAction.php +3 −3 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ class ViewsBulkOperationExampleAction extends ViewsBulkOperationsActionBase impl */ public function buildConfigurationForm(array $form, FormStateInterface $form_state): array { $form['example_config_setting'] = [ '#title' => \t('Example setting pre-execute'), '#title' => $this->t('Example setting pre-execute'), '#type' => 'textfield', '#default_value' => $form_state->getValue('example_config_setting'), ]; Loading Loading @@ -107,8 +107,8 @@ class ViewsBulkOperationExampleAction extends ViewsBulkOperationsActionBase impl * {@inheritdoc} */ public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) { // If certain fields are updated, access should be checked against them as well. // @see Drupal\Core\Field\FieldUpdateActionBase::access(). // If certain fields are updated, access should be checked against them // as well. @see Drupal\Core\Field\FieldUpdateActionBase::access(). return $object->access('update', $account, $return_as_object); } Loading src/Access/ViewsBulkOperationsAccess.php +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class ViewsBulkOperationsAccess implements AccessInterface { * @param \Drupal\Core\Routing\RouteMatch $routeMatch * The matched route. */ public function access(AccountInterface $account, RouteMatch $routeMatch) { public function access(AccountInterface $account, RouteMatch $routeMatch): AccessResult { $parameters = $routeMatch->getParameters()->all(); if ($view = Views::getView($parameters['view_id'])) { Loading src/Action/ViewsBulkOperationsActionBase.php +4 −4 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views /** * Action context. * * @var array * Contains view data and optionally batch operation context. */ protected array $context; Loading @@ -35,6 +34,7 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views * Configuration array. * * @var array * NOTE: Don't add a type hint due to parent declaration unless changed. */ protected $configuration; Loading Loading @@ -88,7 +88,7 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state object. */ public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { public function validateConfigurationForm(array &$form, FormStateInterface $form_state): void { } Loading @@ -103,7 +103,7 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state object. */ public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void { $form_state->cleanValues(); foreach ($form_state->getValues() as $key => $value) { $this->configuration[$key] = $value; Loading src/Action/ViewsBulkOperationsActionCompletedTrait.php +3 −2 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\views_bulk_operations\Action; use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\StringTranslation\TranslatableMarkup; use Symfony\Component\HttpFoundation\RedirectResponse; /** Loading @@ -15,7 +16,7 @@ trait ViewsBulkOperationsActionCompletedTrait { * * @see \Drupal\Core\Messenger\MessengerInterface */ public static function message($message = NULL, $type = 'status', $repeat = TRUE) { public static function message($message = NULL, $type = 'status', $repeat = TRUE): void { \Drupal::messenger()->addMessage($message, $type, $repeat); } Loading @@ -24,7 +25,7 @@ trait ViewsBulkOperationsActionCompletedTrait { * * @see \Drupal\Core\StringTranslation\TranslationInterface:translate() */ public static function translate($string, array $args = [], array $options = []) { public static function translate($string, array $args = [], array $options = []): TranslatableMarkup { return \Drupal::translation()->translate($string, $args, $options); } Loading Loading
modules/actions_permissions/src/EventSubscriber/ActionsPermissionsEventSubscriber.php +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ class ActionsPermissionsEventSubscriber implements EventSubscriberInterface { // Subscribe to the VBO event with low priority // to let other modules alter requirements first. const PRIORITY = -999; private const PRIORITY = -999; /** * {@inheritdoc} Loading
modules/views_bulk_operations_example/src/Plugin/Action/ViewsBulkOperationExampleAction.php +3 −3 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ class ViewsBulkOperationExampleAction extends ViewsBulkOperationsActionBase impl */ public function buildConfigurationForm(array $form, FormStateInterface $form_state): array { $form['example_config_setting'] = [ '#title' => \t('Example setting pre-execute'), '#title' => $this->t('Example setting pre-execute'), '#type' => 'textfield', '#default_value' => $form_state->getValue('example_config_setting'), ]; Loading Loading @@ -107,8 +107,8 @@ class ViewsBulkOperationExampleAction extends ViewsBulkOperationsActionBase impl * {@inheritdoc} */ public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) { // If certain fields are updated, access should be checked against them as well. // @see Drupal\Core\Field\FieldUpdateActionBase::access(). // If certain fields are updated, access should be checked against them // as well. @see Drupal\Core\Field\FieldUpdateActionBase::access(). return $object->access('update', $account, $return_as_object); } Loading
src/Access/ViewsBulkOperationsAccess.php +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class ViewsBulkOperationsAccess implements AccessInterface { * @param \Drupal\Core\Routing\RouteMatch $routeMatch * The matched route. */ public function access(AccountInterface $account, RouteMatch $routeMatch) { public function access(AccountInterface $account, RouteMatch $routeMatch): AccessResult { $parameters = $routeMatch->getParameters()->all(); if ($view = Views::getView($parameters['view_id'])) { Loading
src/Action/ViewsBulkOperationsActionBase.php +4 −4 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views /** * Action context. * * @var array * Contains view data and optionally batch operation context. */ protected array $context; Loading @@ -35,6 +34,7 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views * Configuration array. * * @var array * NOTE: Don't add a type hint due to parent declaration unless changed. */ protected $configuration; Loading Loading @@ -88,7 +88,7 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state object. */ public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { public function validateConfigurationForm(array &$form, FormStateInterface $form_state): void { } Loading @@ -103,7 +103,7 @@ abstract class ViewsBulkOperationsActionBase extends ActionBase implements Views * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state object. */ public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void { $form_state->cleanValues(); foreach ($form_state->getValues() as $key => $value) { $this->configuration[$key] = $value; Loading
src/Action/ViewsBulkOperationsActionCompletedTrait.php +3 −2 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\views_bulk_operations\Action; use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\StringTranslation\TranslatableMarkup; use Symfony\Component\HttpFoundation\RedirectResponse; /** Loading @@ -15,7 +16,7 @@ trait ViewsBulkOperationsActionCompletedTrait { * * @see \Drupal\Core\Messenger\MessengerInterface */ public static function message($message = NULL, $type = 'status', $repeat = TRUE) { public static function message($message = NULL, $type = 'status', $repeat = TRUE): void { \Drupal::messenger()->addMessage($message, $type, $repeat); } Loading @@ -24,7 +25,7 @@ trait ViewsBulkOperationsActionCompletedTrait { * * @see \Drupal\Core\StringTranslation\TranslationInterface:translate() */ public static function translate($string, array $args = [], array $options = []) { public static function translate($string, array $args = [], array $options = []): TranslatableMarkup { return \Drupal::translation()->translate($string, $args, $options); } Loading