Skip to content

Commit

Permalink
Merge pull request #769 from yalesites-org/lint-fixes
Browse files Browse the repository at this point in the history
Fix linting issues on develop preventing multidev creation
  • Loading branch information
dblanken-yale authored Sep 23, 2024
2 parents 94e1e13 + 0f49d89 commit f138cb2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function execute($entity = NULL) {
/**
* {@inheritdoc}
*/
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
$key = $object->getEntityType()->getKey('published');

/** @var \Drupal\Core\Entity\EntityInterface $object */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function execute($entity = NULL) {
/**
* {@inheritdoc}
*/
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
$key = $object->getEntityType()->getKey('published');

/** @var \Drupal\Core\Entity\EntityInterface $object */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Drupal\ys_layouts\Service;

use Drupal\block_content\Entity\BlockContent;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityFieldManager;
use Drupal\Core\Entity\EntityStorageException;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\block_content\Entity\BlockContent;
use Drupal\node\NodeInterface;
use Psr\Log\LoggerInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Drupal\ys_localist;

use Drupal\calendar_link\Twig\CalendarLinkTwigExtension;
use Drupal\Core\Datetime\DateFormatter;
use Drupal\Core\Entity\EntityTypeManager;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Url;
use Drupal\calendar_link\Twig\CalendarLinkTwigExtension;
use Drupal\node\NodeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function getSourceData(string $url): array {
// If json_decode() has returned NULL, it might be that the data isn't
// valid utf8 see http://php.net/manual/en/function.json-decode.php#86997.
if (is_null($source_data)) {
$utf8response = utf8_encode($response);
$utf8response = mb_convert_encoding($response, 'UTF-8', 'ISO-8859-1');
$source_data = json_decode($utf8response, TRUE, 512, JSON_THROW_ON_ERROR);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use Drupal\field\Entity\FieldStorageConfig;
*
* @see options_allowed_values()
*/
function ys_themes_allowed_values_function(FieldStorageConfig $definition, ContentEntityInterface $entity = NULL, $cacheable) {
function ys_themes_allowed_values_function(FieldStorageConfig $definition, ?ContentEntityInterface $entity = NULL, $cacheable) {
$options = [];
$config = \Drupal::config('ys_themes.component_overrides');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function create(ContainerInterface $container, array $configuratio
/**
* {@inheritdoc}
*/
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
parent::init($view, $display, $options);

$this->valueTitle = $this->t('Post Year Filter');
Expand Down

0 comments on commit f138cb2

Please sign in to comment.