WithLaminasServiceManager   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setupServiceManager() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the doyo/mezzio-testing project.
5
 *
6
 * (c) Anthonius Munthi <https://itstoni.com>
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 Doyo\Mezzio\Testing\Modules;
15
16
use Laminas\ServiceManager\ServiceManager;
17
18
trait WithLaminasServiceManager
19
{
20
    protected static function setupServiceManager(): void
21
    {
22
        $config                     = static::$config;
23
        $deps                       = $config['dependencies'];
24
        $deps['services']['config'] = $config;
25
26
        static::$container         = new ServiceManager($deps);
0 ignored issues
show
Bug Best Practice introduced by
The property container does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
27
    }
28
}
29