Middleware::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
ccs 6
cts 6
cp 1
rs 10
cc 1
nc 1
nop 4
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TechDeCo\ElasticApmAgent\Convenience\Middleware;
5
6
use Psr\Http\Server\MiddlewareInterface;
7
use TechDeCo\ElasticApmAgent\Client;
8
use TechDeCo\ElasticApmAgent\Message\Process;
9
use TechDeCo\ElasticApmAgent\Message\Service;
10
use TechDeCo\ElasticApmAgent\Message\System;
11
12
abstract class Middleware implements MiddlewareInterface
13
{
14
    /**
15
     * @var Client
16
     */
17
    protected $client;
18
19
    /**
20
     * @var Service
21
     */
22
    protected $service;
23
24
    /**
25
     * @var Process
26
     */
27
    protected $process;
28
29
    /**
30
     * @var System
31
     */
32
    protected $system;
33
34 28
    public function __construct(Client $client, Service $service, Process $process, System $system)
35
    {
36 28
        $this->client  = $client;
37 28
        $this->service = $service;
38 28
        $this->process = $process;
39 28
        $this->system  = $system;
40 28
    }
41
}
42