Arxiv   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 27
c 0
b 0
f 0
rs 10
ccs 2
cts 2
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getQueryString() 0 3 1
1
<?php
2
3
namespace PubPeerFoundation\PublicationDataExtractor\Identifiers;
4
5
class Arxiv extends Identifier
6
{
7
    /**
8
     * @var array
9
     */
10
    protected $resources = [
11
        \PubPeerFoundation\PublicationDataExtractor\Resources\Arxiv::class,
12
    ];
13
14
    /**
15 4
     * @var string
16
     */
17 4
    protected $regex = '/\d{2}(0|1)[0-9]\.\d{4,5}(v|V)?(\d)?/';
18
19
    /**
20
     * @var string
21
     */
22
    protected $baseUrl = 'https://arxiv.org/abs/';
23
24
    /**
25
     * Get the query string.
26
     *
27
     * @return string
28
     */
29
    public function getQueryString()
30
    {
31
        return rtrim($this->matches[0], ' .');
32
    }
33
}
34