Conditions | 3 |
Paths | 4 |
Total Lines | 24 |
Code Lines | 17 |
Lines | 24 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
26 | public function __construct($command_bus_middleware_object, $message = '', $code = 0, \Exception $previous = null) |
||
27 | { |
||
28 | $command_bus_middleware = is_object($command_bus_middleware_object) |
||
29 | ? get_class($command_bus_middleware_object) |
||
30 | : gettype($command_bus_middleware_object); |
||
31 | |||
32 | if (empty($message)) { |
||
33 | $message = sprintf( |
||
34 | __( |
||
35 | 'The supplied Command Bus Middleware "%1$s" does not have a valid name. It should be in the following format: "{CommandName}Handler" ', |
||
36 | 'event_espresso' |
||
37 | ), |
||
38 | $command_bus_middleware |
||
39 | ); |
||
40 | } |
||
41 | parent::__construct( |
||
42 | '$command_bus_middleware', |
||
43 | $command_bus_middleware, |
||
44 | 'CommandBusMiddlewareInterface', |
||
45 | $message, |
||
46 | $code, |
||
47 | $previous |
||
48 | ); |
||
49 | } |
||
50 | } |
||
51 |