Completed
Push — 2.5 ( 115cf9...bc2a8f )
by Antoine
01:21 queued 01:14
created

NotFoundAction::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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