This commit is contained in:
Antonio Spinelli
2014-04-16 17:59:03 -03:00
parent da35c96b90
commit fc3b6a1608
25 changed files with 65 additions and 64 deletions

View File

@@ -7,7 +7,7 @@ class Pool
private $instances = array();
private $class;
public function __construct($class)
{
$this->class = $class;
@@ -26,5 +26,4 @@ class Pool
{
$this->instances[] = $instance;
}
}

View File

@@ -2,8 +2,6 @@
namespace DesignPatterns\Creational\Pool;
use DesignPatterns\Creational\Pool\Pool;
class TestWorker
{
@@ -27,4 +25,3 @@ class PoolTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(1, $pool->get()->id);
}
}

View File

@@ -49,5 +49,4 @@ class Processor
{
return array_pop($this->waitingQueue);
}
}

View File

@@ -17,5 +17,4 @@ class Worker
// and when it's done, execute callback
call_user_func($callback, $this);
}
}

View File

@@ -41,5 +41,4 @@ class SimpleFactoryTest extends \PHPUnit_Framework_TestCase
{
$this->factory->createVehicle('car');
}
}
}