Completed
Push — master ( 9b56e4...2c514d )
by Jan-Petter
02:30
created

string   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
namespace vipnytt\XRobotsTagParser\Adapters;
3
4
use vipnytt\XRobotsTagParser;
5
use vipnytt\XRobotsTagParser\Exceptions\XrobotsTagParserException;
6
7
/**
8
 * Class string
9
 *
10
 * Parse line-separated string
11
 *
12
 * @package vipnytt\XRobotsTagParser\Adapters
13
 */
14
class string extends XRobotsTagParser
15
{
16
    /**
17
     * Constructor
18
     *
19
     * @param string $string
20
     * @param string $userAgent
21
     * @throws XRobotsTagParserException
22
     */
23
    public function __construct($string, $userAgent = '')
24
    {
25
        $array = array_map('trim', preg_split('/\R/', $string));
26
        parent::__construct($userAgent, $array);
27
    }
28
}