Keep one level of conditions

This commit is contained in:
Guilherme Siani
2019-03-24 19:56:11 -03:00
committed by GitHub
parent 8b07133262
commit 68065ae43d

View File

@@ -29,11 +29,9 @@ abstract class Handler
{
$processed = $this->processing($request);
if ($processed === null) {
if ($processed === null && $this->successor !== null) {
// the request has not been processed by this handler => see the next
if ($this->successor !== null) {
$processed = $this->successor->handle($request);
}
$processed = $this->successor->handle($request);
}
return $processed;