Passed
Pull Request — 2.5 (#3112)
by Antoine
07:23 queued 03:30
created

NotFoundAction   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
c 2
b 0
f 0
dl 0
loc 5
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace ApiPlatform\Core\Action;
15
16
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
17
18
/**
19
 * An action which always returns HTTP 404 Not Found. Useful for disabling an operation.
20
 */
21
final class NotFoundAction
22
{
23
    public function __invoke()
24
    {
25
        throw new NotFoundHttpException();
26
    }
27
}
28