mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-03 13:37:27 +02:00
Merge pull request #360 from guilhermesiani/patch-1
Keep one level of conditions
This commit is contained in:
@@ -29,12 +29,10 @@ abstract class Handler
|
|||||||
{
|
{
|
||||||
$processed = $this->processing($request);
|
$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
|
// 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;
|
return $processed;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user