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

webeweb / jquery-datatables-bundle / 19800321758

30 Nov 2025 02:28PM UTC coverage: 99.666% (-0.1%) from 99.814%
19800321758

push

github

webeweb
Update GitHub action:
- restore Symfony 6.3

3581 of 3593 relevant lines covered (99.67%)

32.95 hits per line

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

75.0
/lib/common/Service/SessionService.php
1
<?php
2

3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2023 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types = 1);
13

14
namespace WBW\Bundle\CommonBundle\Service;
15

16
use Symfony\Component\DependencyInjection\ContainerInterface;
17
use Symfony\Component\HttpFoundation\Session\SessionInterface;
18
use Symfony\Component\HttpKernel\Kernel;
19
use WBW\Bundle\CommonBundle\DependencyInjection\Container\ContainerTrait;
20

21
/**
22
 * Session service.
23
 *
24
 * @author webeweb <https://github.com/webeweb>
25
 * @package WBW\Bundle\CommonBundle\Service
26
 */
27
class SessionService implements SessionServiceInterface {
28

29
    use ContainerTrait;
30

31
    /**
32
     * Service name.
33
     *
34
     * @var string
35
     */
36
    public const SERVICE_NAME = "wbw.common.service.session";
37

38
    /**
39
     * Constructor.
40
     *
41
     * @param ContainerInterface $container The container.
42
     */
43
    public function __construct(ContainerInterface $container) {
44
        $this->setContainer($container);
21✔
45
    }
46

47
    /**
48
     * {@inheritDoc}
49
     */
50
    public function getSession(): ?SessionInterface {
51

52
        // TODO: Remove when dropping support for Symfony 5.3
53
        if (Kernel::VERSION_ID < 50300) {
15✔
54

55
            /** @var SessionInterface */
56
            return $this->getContainer()->get("session");
15✔
57
        }
58

59
        return $this->getContainer()->get("request_stack")->getSession();
×
60
    }
61
}
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