Completed
Push — master ( 2c514d...b5f31e )
by Jan-Petter
05:00
created

TextString   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
c 2
b 1
f 0
lcom 0
cbo 1
dl 0
loc 14
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
6
/**
7
 * Class textString
8
 *
9
 * Parse line-separated text string
10
 *
11
 * @package vipnytt\XRobotsTagParser\Adapters
12
 */
13
class TextString extends XRobotsTagParser
14
{
15
    /**
16
     * Constructor
17
     *
18
     * @param string $string
19
     * @param string $userAgent
20
     */
21
    public function __construct($string, $userAgent = '')
22
    {
23
        $array = array_map('trim', preg_split('/\R/', $string));
24
        parent::__construct($userAgent, $array);
25
    }
26
}
27