1
0
mirror of https://github.com/jupeter/clean-code-php.git synced 2025-09-30 16:09:03 +02:00

Merge pull request #9 from Vlassiuk/master

no need for minus before variable
This commit is contained in:
Piotr Plenik
2017-08-29 21:51:26 +02:00
committed by GitHub

View File

@@ -519,7 +519,7 @@ would be much better to use singleton design pattern and simple set configuratio
```php
function config() {
return [
'foo': 'bar',
'foo' => 'bar',
]
}
```
@@ -788,7 +788,7 @@ class BankAccount {
$bankAccount = new BankAccount();
// Buy shoes...
$bankAccount->withdrawBalance(-$shoesPrice);
$bankAccount->withdrawBalance($shoesPrice);
// Get balance
$balance = $bankAccount->getBalance();
@@ -1168,7 +1168,7 @@ class Manager {
/** @var WorkerInterface $worker **/
private $worker;
public void setWorker(WorkerInterface $worker) {
public function setWorker(WorkerInterface $worker) {
$this->worker = $worker;
}
@@ -1202,7 +1202,7 @@ class Worker implements WorkableInterface, FeedableInterface {
}
class Robot implements WorkableInterface {
public void work() {
public function work() {
// ....working
}
}
@@ -1296,11 +1296,11 @@ class Manager {
/** @var Worker $worker **/
private $worker;
public void __construct(WorkerInterface $worker) {
public function __construct(WorkerInterface $worker) {
$this->worker = $worker;
}
public void manage() {
public function manage() {
$this->worker->work();
}
}