Files
DesignPatternsPHP/More/Delegation/JuniorDeveloper.php
2018-04-30 21:46:36 +02:00

20 lines
406 B
PHP

<?php
namespace DesignPatterns\More\Delegation;
class JuniorDeveloper
{
public function writeBadCode(): string
{
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();
}
}