Passed
Push — master ( ed38f6...30aafa )
by Timo
11:15
created

Classification::setUnMatchPatterns()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 1
cts 2
cp 0.5
cc 1
nc 1
nop 1
crap 1.125
1
<?php declare(strict_types = 1);
2
namespace ApacheSolrForTypo3\Solr\Domain\Index\Classification;
3
4
/***************************************************************
5
 *  Copyright notice
6
 *
7
 *  (c) 2010-2017 dkd Internet Service GmbH <[email protected]>
8
 *  All rights reserved
9
 *
10
 *  This script is part of the TYPO3 project. The TYPO3 project is
11
 *  free software; you can redistribute it and/or modify
12
 *  it under the terms of the GNU General Public License as published by
13
 *  the Free Software Foundation; either version 3 of the License, or
14
 *  (at your option) any later version.
15
 *
16
 *  The GNU General Public License can be found at
17
 *  http://www.gnu.org/copyleft/gpl.html.
18
 *
19
 *  This script is distributed in the hope that it will be useful,
20
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 *  GNU General Public License for more details.
23
 *
24
 *  This copyright notice MUST APPEAR in all copies of the script!
25
 ***************************************************************/
26
27
28
/**
29
 * Class Classification
30
 * @package ApacheSolrForTypo3\Solr\Domain\Index\Classification
31
 */
32
class Classification {
33
34
    /**
35
     * Array of regular expressions
36
     *
37
     * @var array
38
     */
39
    protected $matchPatterns = [];
40
41
    /**
42
     * Array of regular expressions
43
     * @var array
44
     */
45
    protected $unMatchPatterns = [];
46
47
    /**
48
     * @var string
49 2
     */
50
    protected $mappedClass = '';
51 2
52 2
    /**
53 2
     * Classification constructor.
54
     * @param array $matchPatterns
55
     * @param array $unMatchPatterns
56
     * @param string $mappedClass
57
     */
58 2
    public function __construct(array $matchPatterns = [], array $unMatchPatterns = [],string $mappedClass = '')
59
    {
60 2
        $this->matchPatterns = $matchPatterns;
61
        $this->unMatchPatterns = $unMatchPatterns;
62
        $this->mappedClass = $mappedClass;
63
    }
64
65
    /**
66
     * @return array
67
     */
68
    public function getUnMatchPatterns(): array
69
    {
70
        return $this->unMatchPatterns;
71
    }
72
73
    /**
74 2
     * @param array $unMatchPatterns
75
     */
76 2
    public function setUnMatchPatterns(array $unMatchPatterns)
77
    {
78
        $this->unMatchPatterns = $unMatchPatterns;
79
    }
80
81
    /**
82
     * @return array
83
     */
84
    public function getMatchPatterns(): array
85
    {
86
        return $this->matchPatterns;
87
    }
88
89
    /**
90
     * @param array $matchPatterns
91
     */
92
    public function setMatchPatterns(array $matchPatterns)
93
    {
94
        $this->matchPatterns = $matchPatterns;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getMappedClass(): string
101
    {
102
        return $this->mappedClass;
103
    }
104
105
    /**
106
     * @param string $mappedClass
107
     */
108
    public function setMappedClass(string $mappedClass)
109
    {
110
        $this->mappedClass = $mappedClass;
111
    }
112
}