Completed
Push — 7.0_master_link_manager_merge ( e446e3 )
by André
77:34 queued 60:56
created

Pattern   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 3
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
namespace eZ\Publish\API\Repository\Values\URL\Query\Criterion;
8
9
/**
10
 * Matches URLs which contains the pattern.
11
 */
12
class Pattern extends Matcher
13
{
14
    /**
15
     * String which needs to part of URL e.g. ez.no.
16
     *
17
     * @var string
18
     */
19
    public $pattern;
20
21
    /**
22
     * Pattern constructor.
23
     *
24
     * @param string $pattern
25
     */
26
    public function __construct($pattern)
27
    {
28
        if ($pattern === null || $pattern === '') {
29
            throw new \InvalidArgumentException('URL pattern should not be empty!');
30
        }
31
32
        $this->pattern = $pattern;
33
    }
34
}
35