1
0
mirror of https://github.com/jupeter/clean-code-php.git synced 2025-10-04 18:01:37 +02:00

correct word "employee"

This commit is contained in:
Peter Gribanov
2017-08-31 17:25:11 +03:00
committed by GitHub
parent e24c70fe7c
commit a64e611fa6

View File

@@ -1188,14 +1188,14 @@ all of the settings. Making them optional helps prevent having a "fat interface"
**Bad:** **Bad:**
```php ```php
interface Employe interface Employee
{ {
public function work(); public function work();
public function eat(); public function eat();
} }
class Human implements Employe class Human implements Employee
{ {
public function work() public function work()
{ {
@@ -1208,7 +1208,7 @@ class Human implements Employe
} }
} }
class Robot implements Employe class Robot implements Employee
{ {
public function work() public function work()
{ {
@@ -1221,19 +1221,19 @@ class Robot implements Employe
} }
} }
class Manager implements Employe class Manager implements Employee
{ {
private $employees = []; private $employees = [];
public function subdue(Employe $employe) public function subdue(Employee $employee)
{ {
$this->employees[] = $employe; $this->employees[] = $employee;
} }
public function work() public function work()
{ {
foreach ($this->employees as $employe) { foreach ($this->employees as $employee) {
$employe->work(); $employee->work();
} }
} }
@@ -1257,11 +1257,11 @@ interface Feedable
public function eat(); public function eat();
} }
interface Employe extends Feedable, Workable interface Employee extends Feedable, Workable
{ {
} }
class Human implements Employe class Human implements Employee
{ {
public function work() public function work()
{ {
@@ -1283,19 +1283,19 @@ class Robot implements Workable
} }
} }
class Manager implements Employe class Manager implements Employee
{ {
private $employees = []; private $employees = [];
public function subdue(Workable $employe) public function subdue(Workable $employee)
{ {
$this->employees[] = $employe; $this->employees[] = $employee;
} }
public function work() public function work()
{ {
foreach ($this->employees as $employe) { foreach ($this->employees as $employee) {
$employe->work(); $employee->work();
} }
} }