Passed
Pull Request — master (#252)
by Alejandro
03:08
created

PixelAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

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