@@ -176,7 +176,7 @@ |
||
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
179 | - * @return bool |
|
179 | + * @return boolean|null |
|
180 | 180 | */ |
181 | 181 | private function writeAggregations() |
182 | 182 | { |
@@ -10,7 +10,6 @@ |
||
10 | 10 | use UCD\Unicode\Character\WritableRepository; |
11 | 11 | use UCD\Unicode\Codepoint; |
12 | 12 | use UCD\Unicode\CodepointAssigned; |
13 | - |
|
14 | 13 | use UCD\Infrastructure\Repository\CharacterRepository\FileRepository\CharacterSlicer; |
15 | 14 | use UCD\Infrastructure\Repository\CharacterRepository\FileRepository\Property; |
16 | 15 | use UCD\Infrastructure\Repository\CharacterRepository\FileRepository\PropertyAggregators; |
@@ -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; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | /** |
48 | 48 | * @param Property $property |
49 | - * @return PropertyFile|null |
|
49 | + * @return PropertyFile |
|
50 | 50 | * @throws UnexpectedValueException |
51 | 51 | */ |
52 | 52 | public function getFileForProperty(Property $property) |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace UCD\Infrastructure\Repository\CharacterRepository\FileRepository; |
4 | 4 | |
5 | 5 | use UCD\Exception\UnexpectedValueException; |
6 | -use UCD\Unicode\AggregatorRelay; |
|
7 | 6 | |
8 | 7 | abstract class PropertyFileDirectory |
9 | 8 | { |
@@ -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 | { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $keys = $this->container->idsByPrefix('repository'); |
67 | 67 | |
68 | - $mapper = function ($key) { |
|
68 | + $mapper = function($key) { |
|
69 | 69 | return explode('.', $key)[1]; |
70 | 70 | }; |
71 | 71 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function getWritableRepositoryNames() |
81 | 81 | { |
82 | - $filter = function ($name) { |
|
82 | + $filter = function($name) { |
|
83 | 83 | return $this->getRepositoryByName($name) instanceof WritableRepository; |
84 | 84 | }; |
85 | 85 |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function onlyCharacters() |
91 | 91 | { |
92 | - return $this->filterWith(function (CodepointAssigned $assigned) { |
|
92 | + return $this->filterWith(function(CodepointAssigned $assigned) { |
|
93 | 93 | return $assigned instanceof Character; |
94 | 94 | }); |
95 | 95 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function onlyNonCharacters() |
101 | 101 | { |
102 | - return $this->filterWith(function (CodepointAssigned $assigned) { |
|
102 | + return $this->filterWith(function(CodepointAssigned $assigned) { |
|
103 | 103 | return $assigned instanceof NonCharacter; |
104 | 104 | }); |
105 | 105 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function onlySurrogates() |
111 | 111 | { |
112 | - return $this->filterWith(function (CodepointAssigned $assigned) { |
|
112 | + return $this->filterWith(function(CodepointAssigned $assigned) { |
|
113 | 113 | return $assigned instanceof Surrogate; |
114 | 114 | }); |
115 | 115 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | { |
35 | 35 | $function = __FUNCTION__; |
36 | 36 | |
37 | - $characters->traverseWith(function (CodepointAssigned $c) use ($function) { |
|
37 | + $characters->traverseWith(function(CodepointAssigned $c) use ($function) { |
|
38 | 38 | $message = $this->composeMessage($function, [(string)$c->getCodepoint()]); |
39 | 39 | $this->log($message); |
40 | 40 | }); |
@@ -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 |