enhance delegation example

This commit is contained in:
Miroslav Trninic
2018-04-29 15:55:54 +02:00
parent 0ea1593c1d
commit b4599ec67c
3 changed files with 33 additions and 1 deletions

View File

@@ -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();
}
}