@@ -4,7 +4,7 @@ |
||
4 | 4 | use Wonderland\Thread\Example\Simple\TestThread; |
5 | 5 | use Wonderland\Thread\ThreadPool; |
6 | 6 | |
7 | -require __DIR__.'/../../vendor/autoload.php'; |
|
7 | +require __DIR__ . '/../../vendor/autoload.php'; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @param $increment |
@@ -78,12 +78,12 @@ |
||
78 | 78 | public function test_run() |
79 | 79 | { |
80 | 80 | $thread = new AbstractThread(); |
81 | - $thread->setCallback(function (){ return 0; |
|
81 | + $thread->setCallback(function() { return 0; |
|
82 | 82 | |
83 | 83 | }); |
84 | 84 | $thread->setProcessName('unitTest'); |
85 | 85 | $threads = []; |
86 | - $listener = new AbstractListener(PoolEvent::POOL_NEW_THREAD, function (){ |
|
86 | + $listener = new AbstractListener(PoolEvent::POOL_NEW_THREAD, function() { |
|
87 | 87 | }); |
88 | 88 | |
89 | 89 | $this->threadPool->setMaxRunningThreadNb(10); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | public function setUp() |
23 | 23 | { |
24 | - $this->callback = function(){ |
|
24 | + $this->callback = function() { |
|
25 | 25 | }; |
26 | 26 | $this->listener = new AbstractListener(PoolEvent::POOL_NEW_THREAD, $this->callback); |
27 | 27 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $this->assertSame([], $this->mediator->getListeners()); |
30 | 30 | $this->assertSame($this->mediator, $this->mediator->addListener($listener)); |
31 | 31 | $this->assertSame([PoolEvent::POOL_NEW_THREAD => [$listener]], $this->mediator->getListeners()); |
32 | - $this->assertSame($this->mediator, $this->mediator->removeListener(new AbstractListener('fake', function(){ |
|
32 | + $this->assertSame($this->mediator, $this->mediator->removeListener(new AbstractListener('fake', function() { |
|
33 | 33 | }))); |
34 | 34 | $this->mediator->notify(PoolEvent::POOL_NEW_THREAD, new PoolEvent('unit-event')); |
35 | 35 | $this->assertSame($this->mediator, $this->mediator->removeListener($listener)); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | public function test_create() |
18 | 18 | { |
19 | - $callback = function(){ |
|
19 | + $callback = function() { |
|
20 | 20 | }; |
21 | 21 | $thread = new AbstractThread(); |
22 | 22 | $thread->setProcessName('unit-test'); |