• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICanBoogie / ICanBoogie / 11651757567

03 Nov 2024 01:28PM UTC coverage: 41.117%. Remained the same
11651757567

push

github

olvlvl
Tidy

81 of 197 relevant lines covered (41.12%)

0.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/lib/SessionWithEvent.php
1
<?php
2

3
namespace ICanBoogie;
4

5
use ICanBoogie\Session\StartEvent;
6

7
/**
8
 * Extends the {@see Session} to emit {@see StartEvent} when the session starts.
9
 */
10
final class SessionWithEvent extends Session
11
{
12
    private static SessionWithEvent $instance;
13

14
    public static function for_app(Application $app): self
15
    {
16
        return self::$instance ??= new self($app->config->session);
2✔
17
    }
18

19
    /**
20
     * @inheritdoc
21
     *
22
     * Emits {@see StartEvent} when the session starts.
23
     */
24
    public function start(): bool
25
    {
26
        $started = parent::start();
×
27

28
        if ($started) {
×
29
            emit(new StartEvent($this));
×
30
        }
31

32
        return $started;
×
33
    }
34
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc