| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | 1 | public static function build(): iterable |
|
| 15 | { |
||
| 16 | 1 | yield 'logout' => fn () => [ |
|
| 17 | 1 | 'type' => Type::nonNull(Type::boolean()), |
|
| 18 | 1 | 'description' => 'Log out a user', |
|
| 19 | 1 | 'resolve' => function ($root, array $args, SessionInterface $session): bool { |
|
| 20 | // Logout |
||
| 21 | 1 | $session->clear(); |
|
| 22 | 1 | User::setCurrent(null); |
|
| 23 | |||
| 24 | 1 | return true; |
|
| 25 | 1 | }, |
|
| 29 |