Completed
Branch develop (4c3d66)
by Mariano
11:18
created

ServerError   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 13
wmc 2
lcom 1
cbo 3
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 8 2
1
<?php
2
namespace Mcustiel\PowerRoute\Actions;
3
4
use Mcustiel\PowerRoute\Common\TransactionData;
5
use Mcustiel\PowerRoute\Common\ArgumentAware;
6
7
class ServerError implements ActionInterface
8
{
9
    use ArgumentAware;
10
11 3
    public function execute(TransactionData $transactionData)
12
    {
13 3
        return $transactionData->setResponse(
14 3
            $transactionData->getResponse()->withStatus(
15 3
                $this->argument ? $this->argument : 500
16 3
            )
17 3
        );
18
    }
19
}
20