WebAccessLocal::getContent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 5
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WebThumbnailer\Application\WebAccess;
6
7
/**
8
 * Get a local file content.
9
 */
10
class WebAccessLocal implements WebAccess
11
{
12
    /** @inheritdoc */
13
    public function getContent(
14
        string $url,
15
        ?int $timeout = null,
16
        ?int $maxBytes = null,
17
        ?callable $dlCallback = null,
18
        ?string &$dlContent = null
19
    ): array {
20
        return [['200'], file_get_contents($url)];
21
    }
22
}
23