Passed
Pull Request — master (#2)
by Victor
03:19
created

FailingPresenter::present()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
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 FailingPresenter 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