Completed
Push — master ( 27f2e3...f81c2b )
by Felix
07:02
created

Crawler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A extracting() 0 7 1
1
<?php
2
3
namespace Felix\Scraper;
4
5
use Goutte\Client;
6
7
class Crawler
8
{
9
    /**
10
     * Obtener el HTML y parsear su contenido.
11
     * 
12
     * @return object
13
     */
14 1
    public static function extracting($url, $xpath = "//")
15
    {
16 1
        $client = new Client();
17 1
        $crawler = $client->request('GET', $url);
18
        
19 1
        return $crawler->filterXPath($xpath);
20
    }
21
}
22