From 2e7f2446d036d44c68025df9a9c503b511acc0a3 Mon Sep 17 00:00:00 2001 From: "alex.ma" Date: Sun, 15 Jun 2014 17:40:03 +0300 Subject: [PATCH 1/6] Fixed a bug in the implementation of a design pattern: Pool. --- Creational/Pool/Processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } From 23e13762da9093b1a3b9b71b45ffcf302bf99beb Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Sun, 15 Jun 2014 19:52:35 -0400 Subject: [PATCH 2/6] Corrected typo --- Creational/SimpleFactory/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 43ec81a3a647c5fc33da687fefe9fc5fa942f3e5 Mon Sep 17 00:00:00 2001 From: Gareth Evans Date: Tue, 17 Jun 2014 11:44:12 +0100 Subject: [PATCH 3/6] Add link to Repository pattern --- More/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From f9f008d5fb9e7199cb387db4e33e86cb2f739d88 Mon Sep 17 00:00:00 2001 From: dongww Date: Fri, 20 Jun 2014 15:36:24 +0800 Subject: [PATCH 4/6] Update User.php --- Behavioral/Observer/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } From f37dbf8be8c7e2749bccddaab37776323bbebc76 Mon Sep 17 00:00:00 2001 From: ParamountSoft Date: Sun, 29 Jun 2014 18:38:56 +0200 Subject: [PATCH 5/6] Update README.md --- Behavioral/ChainOfResponsibilities/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From ff7e679437d46f27599e159b6be8e63d5c79c899 Mon Sep 17 00:00:00 2001 From: ParamountSoft Date: Tue, 1 Jul 2014 22:02:40 +0200 Subject: [PATCH 6/6] Update README.md --- Creational/Prototype/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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).