@@ -2,5 +2,5 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Wonderland\Thread\Exception; |
| 4 | 4 | |
| 5 | -class ThreadException extends \Exception{ |
|
| 5 | +class ThreadException extends \Exception { |
|
| 6 | 6 | } |
@@ -1,16 +1,16 @@ |
||
| 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'; |
@@ -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 |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | |
| 84 | 84 | if (null === $status) { |
| 85 | 85 | throw new ThreadException( |
| 86 | - 'Error. You must return a process status in '.get_class($this).':'.$this->getMethodName() |
|
| 86 | + 'Error. You must return a process status in ' . get_class($this) . ':' . $this->getMethodName() |
|
| 87 | 87 | ); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Wonderland\Thread\Example\SelfManaging\ManagerThread; |
| 4 | 4 | use Wonderland\Thread\ThreadPool; |
| 5 | 5 | |
| 6 | -require __DIR__.'/../../vendor/autoload.php'; |
|
| 6 | +require __DIR__ . '/../../vendor/autoload.php'; |
|
| 7 | 7 | |
| 8 | 8 | $pool = new ThreadPool(); |
| 9 | 9 | $pool->setMaxRunningThreadNb(3); |