ProcessReportConfiguration   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
c 1
b 0
f 0
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getReportConfigurationId() 0 3 1
A __construct() 0 3 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Setono\SyliusStockMovementPlugin\Message\Command;
6
7
use Setono\SyliusStockMovementPlugin\Model\ReportConfigurationInterface;
8
9
final class ProcessReportConfiguration implements CommandInterface
10
{
11
    /** @var mixed */
12
    private $reportConfigurationId;
13
14
    /**
15
     * @param ReportConfigurationInterface|mixed $reportConfiguration
16
     */
17
    public function __construct($reportConfiguration)
18
    {
19
        $this->reportConfigurationId = $reportConfiguration instanceof ReportConfigurationInterface ? $reportConfiguration->getId() : $reportConfiguration;
20
    }
21
22
    public function getReportConfigurationId()
23
    {
24
        return $this->reportConfigurationId;
25
    }
26
}
27