| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 28 | public function handle(MessageBuilderInterface $builder, Closure $next): MessageBuilderInterface |
|
| 24 | { |
||
| 25 | 28 | if ($this->user === null) { |
|
| 26 | 1 | return $next($builder); |
|
| 27 | } |
||
| 28 | |||
| 29 | 27 | $builder = $builder |
|
| 30 | 27 | ->withUserId($this->user->getId()) |
|
| 31 | 27 | ->withUserName($this->user->getName()); |
|
| 32 | |||
| 33 | 27 | return $next($builder); |
|
| 34 | } |
||
| 35 | } |