Completed
Push — master ( 76395b...dc7112 )
by Alice
02:12
created
src/Exception/ThreadException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 
3 3
 namespace Wonderland\Thread\Exception;
4 4
 
5
-class ThreadException extends \Exception{
5
+class ThreadException extends \Exception {
6 6
 }
Please login to merge, or discard this patch.
tests/unit/Mediator/Listener/ListenerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 	public function setUp()
23 23
 	{
24
-		$this->callback = function(){
24
+		$this->callback = function() {
25 25
   };
26 26
 		$this->listener = new Listener(Event::POOL_NEW_THREAD, $this->callback);
27 27
 	}
Please login to merge, or discard this patch.
tests/unit/Mediator/MediatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 		$this->assertSame([], $this->mediator->getListeners());
30 30
 		$this->assertSame($this->mediator, $this->mediator->addListener($listener));
31 31
 		$this->assertSame([Event::POOL_NEW_THREAD => [$listener]], $this->mediator->getListeners());
32
-		$this->assertSame($this->mediator, $this->mediator->removeListener(new Listener('fake', function(){
32
+		$this->assertSame($this->mediator, $this->mediator->removeListener(new Listener('fake', function() {
33 33
   })));
34 34
 		$this->mediator->notify(Event::POOL_NEW_THREAD, new Event('unit-event'));
35 35
 		$this->assertSame($this->mediator, $this->mediator->removeListener($listener));
Please login to merge, or discard this patch.
tests/unit/ThreadPoolTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@
 block discarded – undo
78 78
 	public function test_run()
79 79
 	{
80 80
 		$thread = new Thread();
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 Listener(Event::POOL_NEW_THREAD, function (){
86
+		$listener = new Listener(Event::POOL_NEW_THREAD, function() {
87 87
   });
88 88
 
89 89
 		$this->threadPool->setMaxRunningThreadNb(10);
Please login to merge, or discard this patch.
tests/unit/Factory/ThreadFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 	public function test_create()
18 18
 	{
19
-		$callback = function(){
19
+		$callback = function() {
20 20
   };
21 21
 		$thread = new Thread();
22 22
 		$thread->setProcessName('unit-test');
Please login to merge, or discard this patch.
tests/unit/ThreadTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 	public function setUp()
22 22
 	{
23
-		$this->callback = function (){ return 0;
23
+		$this->callback = function() { return 0;
24 24
 
25 25
   };
26 26
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 	public function test_callback()
48 48
 	{
49
-		$callback = function(){ return 1;
49
+		$callback = function() { return 1;
50 50
 
51 51
   };
52 52
 
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2
-declare( strict_types = 1 );
2
+declare(strict_types=1);
3 3
 
4
-if ( PHP_SAPI !== 'cli' ) {
5
-	die( 'Not an entry point' );
4
+if (PHP_SAPI !== 'cli') {
5
+	die('Not an entry point');
6 6
 }
7 7
 
8 8
 error_reporting( -1 );
9 9
 
10
-ini_set( 'display_errors', '1' );
10
+ini_set('display_errors', '1');
11 11
 
12
-if ( !is_readable( __DIR__ . '/../vendor/autoload.php' ) ) {
13
-	die( 'You need to install this package with Composer before you can run the tests' );
12
+if (!is_readable(__DIR__ . '/../vendor/autoload.php')) {
13
+	die('You need to install this package with Composer before you can run the tests');
14 14
 }
15 15
 
16 16
 require_once __DIR__ . '/../vendor/autoload.php';
Please login to merge, or discard this patch.