@@ -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 | { |
@@ -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 | }); |
@@ -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 | |
@@ -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 | } |
@@ -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); |