PixelAction   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 12
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createSuccessResp() 0 3 1
A createErrorResp() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shlinkio\Shlink\Core\Action;
6
7
use Psr\Http\Message\ResponseInterface;
8
use Psr\Http\Message\ServerRequestInterface;
9
use Psr\Http\Server\RequestHandlerInterface;
10
use Shlinkio\Shlink\Common\Response\PixelResponse;
11
12
class PixelAction extends AbstractTrackingAction
13
{
14 1
    protected function createSuccessResp(string $longUrl): ResponseInterface
15
    {
16 1
        return new PixelResponse();
17
    }
18
19
    protected function createErrorResp(
20
        ServerRequestInterface $request,
21
        RequestHandlerInterface $handler
22
    ): ResponseInterface {
23
        return new PixelResponse();
24
    }
25
}
26