Arxiv::getQueryString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0
cc 1
eloc 1
nc 1
nop 0
crap 2
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