File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ would be much better to use singleton design pattern and simple set configuratio
519519``` php
520520function config() {
521521 return [
522- 'foo': 'bar',
522+ 'foo' => 'bar',
523523 ]
524524}
525525```
@@ -788,7 +788,7 @@ class BankAccount {
788788$bankAccount = new BankAccount();
789789
790790// Buy shoes...
791- $bankAccount->withdrawBalance(- $shoesPrice);
791+ $bankAccount->withdrawBalance($shoesPrice);
792792
793793// Get balance
794794$balance = $bankAccount->getBalance();
@@ -1168,7 +1168,7 @@ class Manager {
11681168 /** @var WorkerInterface $worker **/
11691169 private $worker;
11701170
1171- public void setWorker(WorkerInterface $worker) {
1171+ public function setWorker(WorkerInterface $worker) {
11721172 $this->worker = $worker;
11731173 }
11741174
@@ -1202,7 +1202,7 @@ class Worker implements WorkableInterface, FeedableInterface {
12021202}
12031203
12041204class Robot implements WorkableInterface {
1205- public void work() {
1205+ public function work() {
12061206 // ....working
12071207 }
12081208}
@@ -1296,11 +1296,11 @@ class Manager {
12961296 /** @var Worker $worker **/
12971297 private $worker;
12981298
1299- public void __construct(WorkerInterface $worker) {
1299+ public function __construct(WorkerInterface $worker) {
13001300 $this->worker = $worker;
13011301 }
13021302
1303- public void manage() {
1303+ public function manage() {
13041304 $this->worker->work();
13051305 }
13061306}
You can’t perform that action at this time.
0 commit comments