DateUtil   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 9 3
1
<?php
2
3
namespace Ipag\Classes\Util;
4
5
final class DateUtil
6
{
7
    public function isValid($date)
8
    {
9
        if (preg_match("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/", $date, $matches)) {
10
            if (checkdate($matches[2], $matches[1], $matches[3])) {
11
                return true;
12
            }
13
        }
14
15
        return false;
16
    }
17
}
18