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 * Class JuniorDeveloper
* @package DesignPatterns\Delegation * @package DesignPatterns\Delegation
*/ */
class JuniorDeveloper { class JuniorDeveloper
public function writeBadCode() {
{ public function writeBadCode()
return "Some junior developer generated code..."; {
} return "Some junior developer generated code...";
}
} }

View File

@@ -9,24 +9,24 @@ namespace DesignPatterns\Delegation;
*/ */
class TeamLead class TeamLead
{ {
/** @var JuniorDeveloper */ /** @var JuniorDeveloper */
protected $slave; protected $slave;
/** /**
* Give junior developer into teamlead submission * Give junior developer into teamlead submission
* @param JuniorDeveloper $junior * @param JuniorDeveloper $junior
*/ */
public function __construct(JuniorDeveloper $junior) public function __construct(JuniorDeveloper $junior)
{ {
$this->slave = $junior; $this->slave = $junior;
} }
/** /**
* TeamLead drink coffee, junior work * TeamLead drink coffee, junior work
* @return mixed * @return mixed
*/ */
public function writeCode() public function writeCode()
{ {
return $this->slave->writeBadCode(); return $this->slave->writeBadCode();
} }
} }

View File

@@ -9,10 +9,10 @@ use DesignPatterns\Delegation;
*/ */
class DelegationTest extends \PHPUnit_Framework_TestCase class DelegationTest extends \PHPUnit_Framework_TestCase
{ {
public function testHowTeamLeadWriteCode() public function testHowTeamLeadWriteCode()
{ {
$junior = new Delegation\JuniorDeveloper(); $junior = new Delegation\JuniorDeveloper();
$teamLead = new Delegation\TeamLead($junior); $teamLead = new Delegation\TeamLead($junior);
$this->assertEquals($junior->writeBadCode(), $teamLead->writeCode()); $this->assertEquals($junior->writeBadCode(), $teamLead->writeCode());
} }
} }