Files
DesignPatternsPHP/More/Delegation/TeamLead.php
Dominik Liebler 2b1de13391 PHP7 Delegation
2016-09-22 15:28:46 +02:00

25 lines
390 B
PHP

<?php
namespace DesignPatterns\More\Delegation;
class TeamLead
{
/**
* @var JuniorDeveloper
*/
private $junior;
/**
* @param JuniorDeveloper $junior
*/
public function __construct(JuniorDeveloper $junior)
{
$this->junior = $junior;
}
public function writeCode(): string
{
return $this->junior->writeBadCode();
}
}