Completed
Pull Request — master (#221)
by Thomas
28:24 queued 26:59
created

ReaderException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
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 7
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A userAgentParserError() 0 4 1
1
<?php
2
/**
3
 * This file is part of the browscap-php package.
4
 *
5
 * Copyright (c) 1998-2017, Browser Capabilities Project
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types = 1);
12
namespace BrowscapPHP\Exception;
13
14
/**
15
 * Exception to handle errors while reading a log file
16
 */
17
final class ReaderException extends DomainException
18
{
19 1
    public static function userAgentParserError(string $line) : self
20
    {
21 1
        return new self(sprintf('Cannot extract user agent string from line "%s"', $line));
22
    }
23
}
24