Passed
Pull Request — master (#2)
by Victor
02:42
created

FailurePresenter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A present() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shoot\Shoot\Tests\Fixtures;
5
6
use Psr\Http\Message\ServerRequestInterface;
7
use RuntimeException;
8
use Shoot\Shoot\PresentationModel;
9
use Shoot\Shoot\PresenterInterface;
10
11
final class FailurePresenter implements PresenterInterface
12
{
13
    /**
14
     * @param ServerRequestInterface $request           The current HTTP request being handled.
15
     * @param PresentationModel      $presentationModel The presentation model for the view being rendered.
16
     *
17
     * @return PresentationModel The populated presentation model.
18
     */
19
    public function present(ServerRequestInterface $request, PresentationModel $presentationModel): PresentationModel
20
    {
21
        throw new RuntimeException('An error occurred');
22
    }
23
}
24