Passed
Push — master ( 106687...22ee89 )
by WEBEWEB
02:59
created

SymfonyBCServiceTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
dl 0
loc 27
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setSymfonyBCService() 0 3 1
A getSymfonyBCService() 0 2 1
1
<?php
2
3
/*
4
 * This file is part of the core-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
namespace WBW\Bundle\CoreBundle\Service;
13
14
/**
15
 * Symfony backward compatibility service trait.
16
 *
17
 * @author webeweb <https://github.com/webeweb>
18
 * @package WBW\Bundle\CoreBundle\Service
19
 */
20
trait SymfonyBCServiceTrait {
21
22
    /**
23
     * Symfony backward compatibility service.
24
     *
25
     * @var SymfonyBCServiceInterface|null
26
     */
27
    protected $symfonyBCService;
28
29
    /**
30
     * Get the Symfony backward compatibility service.
31
     *
32
     * @return SymfonyBCServiceInterface|null Returns the Symfony backward compatibility service.
33
     */
34
    public function getSymfonyBCService(): ?SymfonyBCServiceInterface {
35
        return $this->symfonyBCService;
36
    }
37
38
    /**
39
     * Set the Symfony backward compatibility service.
40
     *
41
     * @param SymfonyBCServiceInterface|null $symfonyBCService The Symfony backward compatibility service.
42
     * @return self Returns this instance.
43
     */
44
    protected function setSymfonyBCService(?SymfonyBCServiceInterface $symfonyBCService): self {
45
        $this->symfonyBCService = $symfonyBCService;
46
        return $this;
47
    }
48
}
49