Skip to content

Commit d56dc0d

Browse files
avoid declaring useless variable in condition
Signed-off-by: Amir <[email protected]>
1 parent ef29f3f commit d56dc0d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/PHPUnit/Controller/AbstractControllerTestCase.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,11 @@ public function url($url, $method = HttpRequest::METHOD_GET, $params = [])
291291
public function dispatch($url, $method = null, $params = [], $isXmlHttpRequest = false)
292292
{
293293
if (
294-
! isset($method)
294+
! $method
295295
&& $this->getRequest() instanceof HttpRequest
296-
&& $requestMethod = $this->getRequest()->getMethod()
297296
) {
298-
$method = $requestMethod;
299-
} elseif (! isset($method)) {
297+
$method = $this->getRequest()->getMethod();
298+
} elseif (! $method) {
300299
$method = HttpRequest::METHOD_GET;
301300
}
302301

0 commit comments

Comments
 (0)