XmlResponse::crawler()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Zenstruck\Browser\Response;
4
5
use Symfony\Component\DomCrawler\Crawler;
6
7
/**
8
 * @author Kevin Bond <[email protected]>
9
 */
10
final class XmlResponse extends DomResponse
11
{
12
    public function crawler(): Crawler
13
    {
14
        $dom = new \DOMDocument();
15
        $dom->loadXML($this->body());
16
17
        return new Crawler($dom);
18
    }
19
}
20