Crawler   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 16
ccs 4
cts 4
cp 1
rs 10
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 4
1
<?php
2
3
namespace Pilipinews\Common;
4
5
use Symfony\Component\DomCrawler\Crawler as DomCrawler;
6
7
/**
8
 * Crawler
9
 *
10
 * @package Pilipinews
11
 * @author  Rougin Gutib <[email protected]>
12
 */
13
class Crawler extends DomCrawler
14
{
15
    /**
16
     * Initializes the crawler instance.
17
     *
18
     * @param mixed  $node
19
     * @param string $uri
20
     * @param string $href
21
     */
22 12
    public function __construct($node = null, $uri = null, $href = null)
23
    {
24 12
        $html = $node !== null && is_string($node);
25
26 12
        parent::__construct($html ? null : $node, $uri, $href);
27
28 12
        $html && $this->addHtmlContent((string) $node);
29 12
    }
30
}
31