mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 01:32:22 +01:00
Fix codesniffer errors
This commit is contained in:
parent
0094586f88
commit
57e1896408
@ -6,9 +6,10 @@ namespace DesignPatterns\Delegation;
|
||||
* Class JuniorDeveloper
|
||||
* @package DesignPatterns\Delegation
|
||||
*/
|
||||
class JuniorDeveloper {
|
||||
public function writeBadCode()
|
||||
{
|
||||
return "Some junior developer generated code...";
|
||||
}
|
||||
class JuniorDeveloper
|
||||
{
|
||||
public function writeBadCode()
|
||||
{
|
||||
return "Some junior developer generated code...";
|
||||
}
|
||||
}
|
||||
|
@ -9,24 +9,24 @@ namespace DesignPatterns\Delegation;
|
||||
*/
|
||||
class TeamLead
|
||||
{
|
||||
/** @var JuniorDeveloper */
|
||||
protected $slave;
|
||||
/** @var JuniorDeveloper */
|
||||
protected $slave;
|
||||
|
||||
/**
|
||||
* Give junior developer into teamlead submission
|
||||
* @param JuniorDeveloper $junior
|
||||
*/
|
||||
public function __construct(JuniorDeveloper $junior)
|
||||
{
|
||||
$this->slave = $junior;
|
||||
}
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
/**
|
||||
* TeamLead drink coffee, junior work
|
||||
* @return mixed
|
||||
*/
|
||||
public function writeCode()
|
||||
{
|
||||
return $this->slave->writeBadCode();
|
||||
}
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ use DesignPatterns\Delegation;
|
||||
*/
|
||||
class DelegationTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testHowTeamLeadWriteCode()
|
||||
{
|
||||
public function testHowTeamLeadWriteCode()
|
||||
{
|
||||
$junior = new Delegation\JuniorDeveloper();
|
||||
$teamLead = new Delegation\TeamLead($junior);
|
||||
$this->assertEquals($junior->writeBadCode(), $teamLead->writeCode());
|
||||
}
|
||||
$teamLead = new Delegation\TeamLead($junior);
|
||||
$this->assertEquals($junior->writeBadCode(), $teamLead->writeCode());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user