Completed
Push — master ( d16560...9c731f )
by Dawid
28:16 queued 14:09
created

StringUtils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 14
ccs 4
cts 4
cp 1
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
     * @param string $string
11
     *
12
     * @throws \InvalidArgumentException
13
     */
14 16
    public static function assertNotEmpty(string $string): void
15
    {
16 16
        if ('' === $string) {
17 1
            throw new \InvalidArgumentException('Empty string provided');
18
        }
19 15
    }
20
}
21