Skip to content

Commit

Permalink
avoid declaring useless variable in condition
Browse files Browse the repository at this point in the history
Signed-off-by: Amir <[email protected]>
  • Loading branch information
amirkhodabande committed Nov 13, 2022
1 parent ef29f3f commit d56dc0d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/PHPUnit/Controller/AbstractControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,11 @@ public function url($url, $method = HttpRequest::METHOD_GET, $params = [])
public function dispatch($url, $method = null, $params = [], $isXmlHttpRequest = false)
{
if (
! isset($method)
! $method
&& $this->getRequest() instanceof HttpRequest
&& $requestMethod = $this->getRequest()->getMethod()
) {
$method = $requestMethod;
} elseif (! isset($method)) {
$method = $this->getRequest()->getMethod();
} elseif (! $method) {
$method = HttpRequest::METHOD_GET;
}

Expand Down

0 comments on commit d56dc0d

Please sign in to comment.