Skip to content
Snippets Groups Projects
Commit 2170e97e authored by catch's avatar catch
Browse files

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

parent b4b36b94
No related branches found
No related tags found
Loading
...@@ -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:
......
...@@ -1145,11 +1145,6 @@ parameters: ...@@ -1145,11 +1145,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
...@@ -1305,11 +1300,6 @@ parameters: ...@@ -1305,11 +1300,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
...@@ -1355,11 +1345,6 @@ parameters: ...@@ -1355,11 +1345,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.
Finish editing this message first!
Please register or to comment