1 | <?php |
||
19 | class Builder |
||
20 | { |
||
21 | /** |
||
22 | * @var InputInterface |
||
23 | */ |
||
24 | protected $input; |
||
25 | |||
26 | /** |
||
27 | * @var Runner |
||
28 | */ |
||
29 | protected $runner; |
||
30 | |||
31 | /** |
||
32 | * @var Serializer |
||
33 | */ |
||
34 | protected $serializer; |
||
35 | |||
36 | /** |
||
37 | * @param array $config |
||
38 | */ |
||
39 | 9 | public function __construct(array $config = []) |
|
47 | |||
48 | /** |
||
49 | * Build and return a regular expression that matches all of the given strings |
||
50 | * |
||
51 | * @param string[] $strings Literal strings to be matched |
||
52 | * @return string Regular expression (without delimiters) |
||
53 | */ |
||
54 | 9 | public function build(array $strings) |
|
68 | |||
69 | /** |
||
70 | * Compare two split strings |
||
71 | * |
||
72 | * Will sort strings in ascending order |
||
73 | * |
||
74 | * @param integer[] $a |
||
75 | * @param integer[] $b |
||
76 | * @return integer |
||
77 | */ |
||
78 | 8 | protected function compareStrings(array $a, array $b) |
|
97 | |||
98 | /** |
||
99 | * Build the full config array based on given input |
||
100 | * |
||
101 | * @param array $config Sparse config |
||
102 | * @return array Full config |
||
103 | */ |
||
104 | 9 | protected function getConfig(array $config) |
|
129 | |||
130 | /** |
||
131 | * Split all given strings by character |
||
132 | * |
||
133 | * @param string[] $strings List of strings |
||
134 | * @return array[] List of arrays |
||
135 | */ |
||
136 | 8 | protected function splitStrings(array $strings) |
|
140 | } |