Passed
Push — master ( 65b336...1323cd )
by Бабичев
44s
created

src/Router/Rules/HttpRule.php (1 issue)

1
<?php
2
3
namespace Bavix\Router\Rules;
4
5
/**
6
 * Class HttpRule
7
 *
8
 * @package Bavix\Router\Rules
9
 *
10
 * @deprecated use PrefixRule
11
 * @since 2.0.0
12
 */
13
final class HttpRule extends PrefixRule
14
{
15
16
    /**
17
     * @return string
18
     */
19
    protected function deprecated(): string
20
    {
21
        return \sprintf(
22
            '%s: Type `%s` %s, use `%s`',
23
            __CLASS__,
24
            'http',
25
            __FUNCTION__,
26
            'prefix'
27
        );
28
    }
29
30
    /**
31
     * HttpRule constructor.
32
     *
33
     * @param string $key
34
     * @param array  $storage
35
     * @param null   $parent
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $parent is correct as it would always require null to be passed?
Loading history...
36
     */
37
    public function __construct(string $key, array $storage, $parent = null)
38
    {
39
        \trigger_error(
40
            $this->deprecated(),
41
            \E_USER_DEPRECATED
42
        );
43
44
        parent::__construct($key, $storage, $parent);
45
    }
46
47
}
48