Skip to content

Commit

Permalink
Remove unnecessary qualifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
ackintosh committed Oct 2, 2021
1 parent 2d2b95d commit a5943f3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Snidel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
use Ackintosh\Snidel\Log;
use Ackintosh\Snidel\Pcntl;
use Ackintosh\Snidel\Task\Task;
use RuntimeException;

class Snidel
{
/** @var \Ackintosh\Snidel\Config */
/** @var Config */
private $config;

/** @var \Ackintosh\Snidel\Fork\Coordinator */
/** @var Coordinator */
private $coordinator;

/** @var \Ackintosh\Snidel\Log */
/** @var Log */
private $log;

/** @var array */
Expand All @@ -29,7 +30,7 @@ class Snidel

/**
* @param array $parameter
* @throws \RuntimeException
* @throws RuntimeException
*/
public function __construct(array $parameter = [])
{
Expand All @@ -44,13 +45,13 @@ public function __construct(array $parameter = [])
/**
* this method uses master / worker model.
*
* @throws \RuntimeException
* @throws RuntimeException
*/
public function process(callable $callable, array $args = [], ?string $tag = null): void
{
try {
$this->coordinator->enqueue(new Task($callable, $args, $tag));
} catch (\RuntimeException $e) {
} catch (RuntimeException $e) {
$this->log->error('failed to enqueue the task: ' . $e->getMessage());
throw $e;
}
Expand Down

0 comments on commit a5943f3

Please sign in to comment.