Skip to content
Snippets Groups Projects
Commit b670b8e1 authored by Luhur Abdi Rizal's avatar Luhur Abdi Rizal
Browse files

Issue #3431996 by el7cosmos: Setup phpcs and phpstan config

parent bb997392
No related branches found
No related tags found
1 merge request!3Setup phpcs and phpstan config
Pipeline #122945 passed
<?xml version="1.0"?>
<ruleset name="Drupal Coding Standards">
<description>Enforce Drupal coding standards with some exceptions</description>
<rule ref="./web/core/phpcs.xml.dist">
<exclude name="Drupal.Commenting.ClassComment.Short"/>
</rule>
<rule ref="Drupal"/>
<rule ref="DrupalPractice">
<exclude name="DrupalPractice.Commenting.CommentEmptyLine.SpacingAfter"/>
</rule>
</ruleset>
parameters:
level: max
checkMissingIterableValueType: false
treatPhpDocTypesAsCertain: false
......@@ -79,11 +79,14 @@ class PhpRedisBatchStorage implements BatchStorageInterface {
/**
* {@inheritdoc}
*
* @phpstan-return array|false
*/
public function load($id) {
$this->session->start();
$hash = $this->getClient()->hGetAll($this->getPrefix() . ':' . $id);
if ($hash && $this->csrfToken->validate($hash['token'], $id)) {
if ($hash && $this->csrfToken->validate($hash['token'], (string) $id)) {
/** @var array */
return $this->serializer::decode($hash['batch']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment