Skip to content
Snippets Groups Projects
Commit 330cbd74 authored by catch's avatar catch
Browse files

Issue #3316276 by mondrake: Fix 'undefined variable' PHPStan L0 errors

(cherry picked from commit 2170e97e)
parent e3352f8e
No related branches found
No related tags found
17 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!3603#ISSUE 3346218 Add a different message on edit comment,!3555Issue #2473873: Views entity operations lack cacheability support, resulting in incorrect dropbuttons,!3494Issue #3327018 by Spokje, longwave, xjm, mondrake: Update PHPStan to 1.9.3 and...,!3410Issue #3340128: UserLoginForm::submitForm has some dead code,!3389Issue #3325184 by Spokje, andypost, xjm, smustgrave: $this->configFactory is...,!3381Issue #3332363: Refactor Claro's menus-and-lists stylesheet,!3307Issue #3326193: CKEditor 5 can grow past the viewport when there is a lot of content,!3236Issue #3332419: Refactor Claro's messages stylesheet,!3231Draft: Issue #3049525 by longwave, fougere, larowlan, kim.pepper, AaronBauman, Wim...,!3212Issue #3294003: Refactor Claro's entity-meta stylesheet,!3194Issue #3330981: Fix PHPStan L1 error "Relying on entity queries to check access by default is deprecated...",!3143Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28,!2972Issue #1845004: Replace custom password hashing library with PHP 5.5 password_hash()
...@@ -53,10 +53,6 @@ public function preQuery() { ...@@ -53,10 +53,6 @@ public function preQuery() {
continue; continue;
} }
if (isset($handler)) {
unset($handler);
}
$handler = &$this->view->argument[$key]; $handler = &$this->view->argument[$key];
if (empty($handler->definition['accept depth modifier'])) { if (empty($handler->definition['accept depth modifier'])) {
continue; continue;
......
...@@ -23,7 +23,7 @@ public function validateArgument($argument) { ...@@ -23,7 +23,7 @@ public function validateArgument($argument) {
return FALSE; return FALSE;
} }
if (!empty($this->argument->definition['numeric']) && !isset($this->argument->options['break_phrase']) && !is_numeric($arg)) { if (!empty($this->argument->definition['numeric']) && !isset($this->argument->options['break_phrase'])) {
return FALSE; return FALSE;
} }
......
...@@ -79,13 +79,7 @@ public function query() { ...@@ -79,13 +79,7 @@ public function query() {
$first['extra'] = $this->definition['join_extra']; $first['extra'] = $this->definition['join_extra'];
} }
if (!empty($def['join_id'])) { $first_join = $this->joinManager->createInstance('standard', $first);
$id = $def['join_id'];
}
else {
$id = 'standard';
}
$first_join = $this->joinManager->createInstance($id, $first);
$this->first_alias = $this->query->addTable($this->definition['field table'], $this->relationship, $first_join); $this->first_alias = $this->query->addTable($this->definition['field table'], $this->relationship, $first_join);
...@@ -103,13 +97,7 @@ public function query() { ...@@ -103,13 +97,7 @@ public function query() {
$second['type'] = 'INNER'; $second['type'] = 'INNER';
} }
if (!empty($def['join_id'])) { $second_join = $this->joinManager->createInstance('standard', $second);
$id = $def['join_id'];
}
else {
$id = 'standard';
}
$second_join = $this->joinManager->createInstance($id, $second);
$second_join->adjusted = TRUE; $second_join->adjusted = TRUE;
// use a short alias for this: // use a short alias for this:
......
...@@ -1155,11 +1155,6 @@ parameters: ...@@ -1155,11 +1155,6 @@ parameters:
count: 1 count: 1
path: modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php path: modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php
-
message: "#^Call to function unset\\(\\) contains undefined variable \\$handler\\.$#"
count: 1
path: modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php
- -
message: "#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#" message: "#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#"
count: 1 count: 1
...@@ -1315,11 +1310,6 @@ parameters: ...@@ -1315,11 +1310,6 @@ parameters:
count: 1 count: 1
path: modules/views/src/Plugin/views/argument/Date.php path: modules/views/src/Plugin/views/argument/Date.php
-
message: "#^Undefined variable\\: \\$arg$#"
count: 1
path: modules/views/src/Plugin/views/argument_validator/None.php
- -
message: "#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheGet\\(\\) should return bool but return statement is missing\\.$#" message: "#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheGet\\(\\) should return bool but return statement is missing\\.$#"
count: 1 count: 1
...@@ -1365,11 +1355,6 @@ parameters: ...@@ -1365,11 +1355,6 @@ parameters:
count: 2 count: 2
path: modules/views/src/Plugin/views/filter/FilterPluginBase.php path: modules/views/src/Plugin/views/filter/FilterPluginBase.php
-
message: "#^Undefined variable\\: \\$def$#"
count: 2
path: modules/views/src/Plugin/views/relationship/EntityReverse.php
- -
message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#" message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
count: 1 count: 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment