Passed
Pull Request — master (#16)
by
unknown
03:22
created

DataSrc   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A scrape() 0 3 1
1
<?php
2
3
namespace Aoe\Asdis\Content\Scraper\Html;
4
5
use Aoe\Asdis\Content\Scraper\ScraperInterface;
6
use Aoe\Asdis\Domain\Model\Asset\Collection;
7
8
/**
9
 * Scrapes assets from "<image>" tags.
10
 */
11
class DataSrc extends AbstractHtmlScraper implements ScraperInterface
12
{
13 1
    public function scrape(string $content): ?Collection
14
    {
15 1
        return $this->getAssets('[A-z]?', 'data-src', $content);
16
    }
17
}
18