Skip to content

Commit

Permalink
Merge e1c5dc9 into 3f1f3ee
Browse files Browse the repository at this point in the history
  • Loading branch information
snapshotpl committed Oct 31, 2020
2 parents 3f1f3ee + e1c5dc9 commit 8405143
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,5 +1,5 @@
language: php
dist: trusty
dist: focal

php:
- '7.4'
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Expand Up @@ -14,14 +14,14 @@
"psr/container": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/extension-installer": "^1.0",
"squizlabs/php_codesniffer": "^3.5",
"doctrine/coding-standard": "^8.1",
"phpunit/phpunit": "^9.4.2",
"phpstan/phpstan": "^0.12.52",
"phpstan/phpstan-phpunit": "^0.12.16",
"phpstan/extension-installer": "^1.0.5",
"squizlabs/php_codesniffer": "^3.5.8",
"doctrine/coding-standard": "^8.2",
"roave/security-advisories": "dev-latest",
"league/container": "^3.3"
"league/container": "^3.3.3"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 5 additions & 3 deletions src/CommandBus.php
Expand Up @@ -4,15 +4,17 @@

namespace League\Tactician;

use Closure;

use function array_pop;

/**
* Receives a command and sends it through a chain of middleware for processing.
*/
final class CommandBus
{
/** @var callable */
private $middlewareChain;
/** @var Closure(object $command):mixed */
private Closure $middlewareChain;

public function __construct(Middleware ...$middleware)
{
Expand All @@ -32,7 +34,7 @@ public function handle(object $command)
/**
* @param Middleware[] $middlewareList
*/
private function createExecutionChain(array $middlewareList): callable
private function createExecutionChain(array $middlewareList): Closure
{
$lastCallable = static fn () => null;

Expand Down

0 comments on commit 8405143

Please sign in to comment.