mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-10-01 08:46:55 +02:00
enhance delegation example
This commit is contained in:
@@ -8,4 +8,11 @@ class JuniorDeveloper
|
||||
{
|
||||
return 'Some junior developer generated code...';
|
||||
}
|
||||
/**
|
||||
* Junior is authorized to call method on TeamLead (real delegation)
|
||||
*/
|
||||
public function writeReallyBadCode(TeamLead $teamLead): string
|
||||
{
|
||||
return $teamLead->writeReallyBadCode();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user