Completed
Push — master ( 0591fe...b215f8 )
by Jan-Petter
03:21
created

src/Parser/Directives/InlineCleanParamParser.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * vipnytt/RobotsTxtParser
4
 *
5
 * @link https://github.com/VIPnytt/RobotsTxtParser
6
 * @license https://github.com/VIPnytt/RobotsTxtParser/blob/master/LICENSE The MIT License (MIT)
7
 */
8
9
namespace vipnytt\RobotsTxtParser\Parser\Directives;
10
11
use vipnytt\RobotsTxtParser\Client\Directives\CleanParamClient;
12
use vipnytt\RobotsTxtParser\Client\Directives\InlineCleanParamClient;
13
14
/**
15
 * Class InlineCleanParamParser
16
 *
17
 * @package vipnytt\RobotsTxtParser\Parser\Directives
18
 */
19 View Code Duplication
class InlineCleanParamParser extends CleanParamParserCore
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
{
21
    /**
22
     * Client cache
23
     * @var InlineCleanParamClient
24
     */
25
    private $client;
26
27
    /**
28
     * InlineCleanParamParser constructor.
29
     */
30
    public function __construct()
31
    {
32
        parent::__construct();
33
    }
34
35
    /**
36
     * Client
37
     *
38
     * @return CleanParamClient
39
     */
40
    public function client()
41
    {
42
        if (isset($this->client)) {
43
            return $this->client;
44
        }
45
        return $this->client = new InlineCleanParamClient($this->cleanParam);
46
    }
47
}
48