S3NameValidator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 3 1
1
<?php
2
/**
3
 *  This file is part of the Simple S3 package.
4
 *
5
 * (c) Mauro Cassani<https://github.com/mauretto78>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 */
11
12
namespace Matecat\SimpleS3\Components\Validators;
13
14
abstract class S3NameValidator implements S3NameValidatorInterface
15
{
16
    /**
17
     * @param string $string
18
     *
19
     * @return bool
20
     */
21 7
    public static function isValid($string)
22
    {
23 7
        return (count(static::validate($string)) === 0);
24
    }
25
}
26