diff --git a/Behavioral/ChainOfResponsibilities/README.md b/Behavioral/ChainOfResponsibilities/README.md index 462f6c11c..3369cd578 100644 --- a/Behavioral/ChainOfResponsibilities/README.md +++ b/Behavioral/ChainOfResponsibilities/README.md @@ -2,7 +2,7 @@ ## Purpose: -To build a chain of objects to handle a call. If one object cannot handle a call, it delegates the call to the next in the chain and so forth. +To build a chain of objects to handle a call in sequential order. If one object cannot handle a call, it delegates the call to the next in the chain and so forth. ## Examples: diff --git a/Behavioral/Observer/User.php b/Behavioral/Observer/User.php index 5b6fb4c01..b7ffd197b 100644 --- a/Behavioral/Observer/User.php +++ b/Behavioral/Observer/User.php @@ -59,7 +59,7 @@ public function detach(\SplObserver $observer) */ public function notify() { - /** @var SplObserver $observer */ + /** @var \SplObserver $observer */ foreach ($this->observers as $observer) { $observer->update($this); } diff --git a/Creational/Pool/Processor.php b/Creational/Pool/Processor.php index 0bb5e6742..957e91ff6 100644 --- a/Creational/Pool/Processor.php +++ b/Creational/Pool/Processor.php @@ -20,7 +20,7 @@ public function process($image) if ($this->processing++ < $this->maxProcesses) { $this->createWorker($image); } else { - $this->pushToWaitingQueue($worker); + $this->pushToWaitingQueue($image); } } diff --git a/Creational/Prototype/README.md b/Creational/Prototype/README.md index 3a99777e2..5ac8ca593 100644 --- a/Creational/Prototype/README.md +++ b/Creational/Prototype/README.md @@ -2,8 +2,8 @@ ## Purpose -To avoid the cost of creating objects the standard way (new Foo()) and instead create a prototype and clone it +To avoid the cost of creating objects the standard way (new Foo()) and instead create a prototype and clone it. ## Examples -* Large amounts of data (e.g. create 1,000,000 rows in a database at once via a ORM) +* Large amounts of data (e.g. create 1,000,000 rows in a database at once via a ORM). diff --git a/Creational/SimpleFactory/README.md b/Creational/SimpleFactory/README.md index 5bb2af6c0..c165dc569 100644 --- a/Creational/SimpleFactory/README.md +++ b/Creational/SimpleFactory/README.md @@ -6,4 +6,4 @@ ConcreteFactory is a simple factory pattern. It differs from the static factory because it is NOT static and as you know: static => global => evil! -Therefore, you can haZ multiple factories, differently parametrized, you can subclass it and you can mock-up it. +Therefore, you can have multiple factories, differently parametrized, you can subclass it and you can mock-up it. diff --git a/More/README.md b/More/README.md index bea0cf5ca..7667a6276 100644 --- a/More/README.md +++ b/More/README.md @@ -1,4 +1,5 @@ # More * [Delegation](Delegation) [:notebook:](http://en.wikipedia.org/wiki/Delegation_pattern) -* [ServiceLocator](ServiceLocator) [:notebook:](http://en.wikipedia.org/wiki/Service_locator_pattern) \ No newline at end of file +* [ServiceLocator](ServiceLocator) [:notebook:](http://en.wikipedia.org/wiki/Service_locator_pattern) +* [Repository](Repository)