Fix codesniffer errors

This commit is contained in:
maximkou 2014-03-02 22:24:19 +04:00
parent 0094586f88
commit 57e1896408
3 changed files with 29 additions and 28 deletions

View File

@ -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...";
}
}

View File

@ -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();
}
}

View File

@ -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());
}
}