-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anton Komarev
committed
Oct 11, 2023
1 parent
6cbdd46
commit e401f7e
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
/** | ||
* @author Anton Komarev <[email protected]> | ||
*/ | ||
final class TextUnicodeConverter | ||
class TextUnicodeConverter | ||
{ | ||
/** | ||
* Converts UTF-8 encoded string and returns unicode code points for every character. | ||
|
@@ -39,7 +39,7 @@ public static function convertTextToCodePoints( | |
$values[] = $thisValue; | ||
|
||
if (\count($values) === $lookingFor) { | ||
$number = ($lookingFor === 3) | ||
$number = (3 === $lookingFor) | ||
? (($values[0] % 16) * 4096) + (($values[1] % 64) * 64) + ($values[2] % 64) | ||
: (($values[0] % 32) * 64) + ($values[1] % 64); | ||
|
||
|