Passed
Branch master (df2ee3)
by Dawid
07:19 queued 02:10
created

StringUtils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 12
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A assertNotEmpty() 0 6 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiechu\SymfonyCommonsBundle\Utils;
6
7
class StringUtils
8
{
9
    /**
10
     * @throws \InvalidArgumentException
11
     */
12 1
    public static function assertNotEmpty(string $string): void
13
    {
14 1
        if ('' === $string) {
15
            throw new \InvalidArgumentException('Empty string provided');
16
        }
17 1
    }
18
}
19