Conditions | 2 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 8 | public static function startSession($name): bool |
|
19 | { |
||
20 | 1 | $self = new static($name); |
|
21 | try{ |
||
22 | 1 | $self->start(); |
|
23 | 8 | register_shutdown_function([$self, 'shutdown']); |
|
24 | 8 | return true; |
|
25 | 1 | }catch (\Exception $exception){ |
|
26 | 1 | $self->addException($exception); |
|
27 | 1 | $self->save(); |
|
28 | 1 | return false; |
|
29 | } |
||
32 |