NotEmpty   A
last analyzed

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
namespace Faulancer\Form\Validator\Base;
4
5
use Faulancer\Form\Validator\AbstractValidator;
6
7
/**
8
 * Class NotEmpty
9
 *
10
 * @package Form\Validator\Base
11
 * @author  Florian Knapp <[email protected]>
12
 */
13
class NotEmpty extends AbstractValidator
14
{
15
16
    /** @var string  */
17
    protected $errorMessage = 'validator_empty_text';
18
19
    /**
20
     * @param mixed $data
21
     *
22
     * @return bool
23
     */
24
    public function process($data)
25
    {
26
        return !empty($data);
27
    }
28
29
}