Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
37 | 2 | public function execute(Command $command, callable $next) |
|
38 | { |
||
39 | 2 | assert($command instanceof CreateCommand); |
|
40 | |||
41 | 2 | $filename = $command->getFile()->path(); |
|
42 | 2 | $this->log('Starting to parse file: ' . $filename, LogLevel::INFO); |
|
43 | |||
44 | try { |
||
45 | 2 | return $next($command); |
|
46 | 1 | } catch (Exception $e) { |
|
47 | 1 | $this->log( |
|
48 | 1 | ' Unable to parse file "' . $filename . '", an error was detected: ' . $e->getMessage(), |
|
49 | 1 | LogLevel::ALERT |
|
50 | ); |
||
51 | } |
||
52 | |||
53 | 1 | return null; |
|
54 | } |
||
55 | |||
64 |