Completed
Pull Request — master (#19)
by Flo
04:12
created

NotEmpty   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 4 1
1
<?php
2
/**
3
 * Class NotEmpty | NotEmpty.php
4
 * @package Form\Validator\Base
5
 * @author  Florian Knapp <[email protected]>
6
 */
7
namespace Faulancer\Form\Validator\Base;
8
9
use Faulancer\Form\Validator\AbstractValidator;
10
11
/**
12
 * Class NotEmpty
13
 */
14
class NotEmpty extends AbstractValidator
15
{
16
17
    /** @var string  */
18
    protected $errorMessage = 'validator_empty_text';
19
20
    /**
21
     * @param mixed $data
22
     * @return bool
23
     * @codeCoverageIgnore
24
     */
25
    public function process($data)
26
    {
27
        return !empty($data);
28
    }
29
30
}