@@ -44,6 +44,8 @@ |
||
44 | 44 | |
45 | 45 | /** |
46 | 46 | * {@inheritDoc} |
47 | + * @param string $uri |
|
48 | + * @param string $encoding |
|
47 | 49 | */ |
48 | 50 | public function open($uri, $encoding = null, $options = 0) |
49 | 51 | { |
@@ -146,7 +146,7 @@ |
||
146 | 146 | foreach ($characters as $character) { |
147 | 147 | $codepoint = $character->getCodepoint(); |
148 | 148 | $key = $codepoint->getValue(); |
149 | - $flattened[$key] = $this->serializer->serialize($character);; |
|
149 | + $flattened[$key] = $this->serializer->serialize($character); ; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | return $flattened; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $directory = new \FilesystemIterator($pathName, \FilesystemIterator::CURRENT_AS_FILEINFO); |
20 | 20 | |
21 | - return new self($directory, function (\SplFileInfo $file) { |
|
21 | + return new self($directory, function(\SplFileInfo $file) { |
|
22 | 22 | return $file->isFile(); |
23 | 23 | }); |
24 | 24 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function addMany(Collection $characters) |
40 | 40 | { |
41 | - $characters->traverseWith(function (CodepointAssigned $c) { |
|
41 | + $characters->traverseWith(function(CodepointAssigned $c) { |
|
42 | 42 | $codepoint = $c->getCodepoint(); |
43 | 43 | $index = $this->indexFromCodepoint($codepoint); |
44 | 44 | $this->characters[$index] = $c; |
@@ -102,7 +102,7 @@ |
||
102 | 102 | */ |
103 | 103 | protected function parseCodepointList($list) |
104 | 104 | { |
105 | - $mapper = function ($codepointValue) { |
|
105 | + $mapper = function($codepointValue) { |
|
106 | 106 | return Codepoint::fromHex($codepointValue); |
107 | 107 | }; |
108 | 108 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | $regexBuilder = new RegexBuilder(); |
41 | 41 | |
42 | - $this->traverseWith(function (Range $range) use ($regexBuilder) { |
|
42 | + $this->traverseWith(function(Range $range) use ($regexBuilder) { |
|
43 | 43 | $regexBuilder->addRange($range); |
44 | 44 | }); |
45 | 45 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function getCodepointsByBlock(Block $block) |
22 | 22 | { |
23 | - $comparator = function (CodepointAssigned $item) use ($block) { |
|
23 | + $comparator = function(CodepointAssigned $item) use ($block) { |
|
24 | 24 | return $item->getGeneralProperties() |
25 | 25 | ->getBlock() |
26 | 26 | ->equals($block); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getCodepointsByCategory(GeneralCategory $category) |
39 | 39 | { |
40 | - $comparator = function (CodepointAssigned $item) use ($category) { |
|
40 | + $comparator = function(CodepointAssigned $item) use ($category) { |
|
41 | 41 | return $item->getGeneralProperties() |
42 | 42 | ->getGeneralCategory() |
43 | 43 | ->equals($category); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getCodepointsByScript(Script $script) |
56 | 56 | { |
57 | - $comparator = function (CodepointAssigned $item) use ($script) { |
|
57 | + $comparator = function(CodepointAssigned $item) use ($script) { |
|
58 | 58 | return $item->getGeneralProperties() |
59 | 59 | ->getScript() |
60 | 60 | ->equals($script); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | $aggregator = new Aggregator(); |
44 | 44 | |
45 | - $this->traverseWith(function (Codepoint $codepoint) use ($aggregator) { |
|
45 | + $this->traverseWith(function(Codepoint $codepoint) use ($aggregator) { |
|
46 | 46 | $aggregator->addCodepoint($codepoint); |
47 | 47 | }); |
48 | 48 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $builder = new RegexBuilder(); |
58 | 58 | |
59 | - $this->traverseWith(function (Codepoint $codepoint) use ($builder) { |
|
59 | + $this->traverseWith(function(Codepoint $codepoint) use ($builder) { |
|
60 | 60 | $builder->addCodepoint($codepoint); |
61 | 61 | }); |
62 | 62 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | { |
133 | 133 | $characters = StringUtility::split($string, $encoding); |
134 | 134 | |
135 | - $mapper = function ($character) use ($encoding) { |
|
135 | + $mapper = function($character) use ($encoding) { |
|
136 | 136 | return Codepoint::fromEncodedCharacter($character, $encoding); |
137 | 137 | }; |
138 | 138 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | $characters = ''; |
201 | 201 | |
202 | - $this->traverseWith(function (Codepoint $codepoint) use ($convertTo, &$characters) { |
|
202 | + $this->traverseWith(function(Codepoint $codepoint) use ($convertTo, &$characters) { |
|
203 | 203 | $characters .= $codepoint->toEncodedCharacter($convertTo); |
204 | 204 | }); |
205 | 205 |
@@ -10,14 +10,11 @@ |
||
10 | 10 | use UCD\Unicode\Character\Repository; |
11 | 11 | use UCD\Unicode\Character\Repository\CharacterNotFoundException; |
12 | 12 | use UCD\Unicode\Codepoint; |
13 | -use UCD\Unicode\Codepoint\AggregatorRelay; |
|
14 | 13 | use UCD\Unicode\CodepointAssigned; |
15 | 14 | use UCD\Unicode\NonCharacter; |
16 | 15 | use UCD\Unicode\Surrogate; |
17 | - |
|
18 | 16 | use UCD\Exception\InvalidArgumentException; |
19 | 17 | use UCD\Exception\OutOfRangeException; |
20 | - |
|
21 | 18 | use UCD\Infrastructure\Repository\CharacterRepository\FileRepository\RangeFile\PHPRangeFileDirectory; |
22 | 19 | use UCD\Infrastructure\Repository\CharacterRepository\FileRepository\Serializer\PHPSerializer; |
23 | 20 | use UCD\Infrastructure\Repository\CharacterRepository\FileRepository; |