Passed
Push — master ( a9840c...5ab0c2 )
by Todd
03:34
created

Validator::optional()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Logikos\Util\Config\Field\Adapter\Particle;
4
5
use Particle\Validator as Particle;
6
7
class Validator extends Particle\Validator {
8
  /**
9
   * @param string $key
10
   * @param null   $name
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $name is correct as it would always require null to be passed?
Loading history...
11
   * @param bool   $allowEmpty
12
   * @return Chain|Particle\Chain
13
   */
14 8
  public function required($key, $name = null, $allowEmpty = false) {
15 8
    return parent::required($key, $name, $allowEmpty);
16
  }
17
18
  /**
19
   * @param string $key
20
   * @param null   $name
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $name is correct as it would always require null to be passed?
Loading history...
21
   * @param bool   $allowEmpty
22
   * @return Chain|Particle\Chain
23
   */
24 2
  public function optional($key, $name = null, $allowEmpty = true) {
25 2
    return parent::optional($key, $name, $allowEmpty);
26
  }
27
28 10
  protected function buildChain($key, $name, $required, $allowEmpty) {
29 10
    return new Chain($key, $name, $required, $allowEmpty);
30
  }
31
}