Field   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 26
wmc 2
lcom 0
cbo 1
ccs 9
cts 9
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A getMatchers() 0 10 1
1
<?php
2
3
namespace SP\Spiderling\Query;
4
5
/**
6
 * @author    Ivan Kerin <[email protected]>
7
 * @copyright 2015, Clippings Ltd.
8
 * @license   http://spdx.org/licenses/BSD-3-Clause
9
 */
10
class Field extends AbstractXPath
11
{
12
    const TYPE = '(self::input and (not(@type) or @type != \'submit\')) or self::textarea or self::select';
13
14
    /**
15
     * @return string
16
     */
17 12
    public function getType()
18
    {
19 12
        return Field::TYPE;
20
    }
21
22
    /**
23
     * @return array
24
     */
25 12
    public function getMatchers()
26
    {
27
        return [
28 12
            AbstractXPath::NAME,
29 12
            AbstractXPath::ID,
30 12
            AbstractXPath::PLACEHOLDER,
31 12
            AbstractXPath::LABEL_FOR,
32 12
            AbstractXPath::OPTION_TEXT,
33 12
        ];
34
    }
35
}
36