GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 4b06eb...1bc1d9 )
by Simon
05:25
created

StrongConsistencyCommandBusMiddleware::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
namespace SmoothPhp\LaravelAdapter\StrongConsistency;
3
4
use SmoothPhp\CommandBus\SimpleCommandBus;
5
use SmoothPhp\Contracts\CommandBus\Command;
6
use SmoothPhp\Contracts\CommandBus\CommandBusMiddleware;
7
8
/**
9
 * Class CommandBus
10
 * @package SmoothPhp\LaravelAdapter\StrongConsistency
11
 * @author Simon Bennett <[email protected]>
12
 */
13
final class StrongConsistencyCommandBusMiddleware implements CommandBusMiddleware
14
{
15
    /** @var string */
16
    private $lastCommandId;
17
18
    /**
19
     * @param $command
20
     * @param callable $next
21
     * @return mixed
22
     */
23
    public function execute(Command $command, callable $next)
24
    {
25
        $this->lastCommandId = (string)$command;
26
        $next($command);
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getLastCommandId()
33
    {
34
        return $this->lastCommandId;
35
    }
36
}
37