mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-23 17:22:41 +01:00
30 lines
518 B
PHP
30 lines
518 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\More\Delegation;
|
|
|
|
class TeamLead
|
|
{
|
|
/** @var JuniorDeveloper */
|
|
protected $slave;
|
|
|
|
/**
|
|
* Give junior developer into teamlead submission.
|
|
*
|
|
* @param JuniorDeveloper $junior
|
|
*/
|
|
public function __construct(JuniorDeveloper $junior)
|
|
{
|
|
$this->slave = $junior;
|
|
}
|
|
|
|
/**
|
|
* TeamLead drink coffee, junior work.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function writeCode()
|
|
{
|
|
return $this->slave->writeBadCode();
|
|
}
|
|
}
|