Files
DesignPatternsPHP/More/Delegation/JuniorDeveloper.php
2018-04-29 15:55:54 +02:00

19 lines
405 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();
}
}