Skip to content

Commit

Permalink
Remove strcmp
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <[email protected]>
  • Loading branch information
kamil-tekiela committed Sep 14, 2023
1 parent 1bb27ca commit 4d7a3f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/MoParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use PhpMyAdmin\MoTranslator\Cache\CacheInterface;

use function is_readable;
use function strcmp;

final class MoParser
{
Expand Down Expand Up @@ -69,9 +68,9 @@ public function parseIntoCache(CacheInterface $cache): void

try {
$magic = $stream->read(0, 4);
if (strcmp($magic, self::MAGIC_LE) === 0) {
if ($magic === self::MAGIC_LE) {
$unpack = 'V';
} elseif (strcmp($magic, self::MAGIC_BE) === 0) {
} elseif ($magic === self::MAGIC_BE) {
$unpack = 'N';
} else {
$this->error = self::ERROR_BAD_MAGIC;
Expand Down

0 comments on commit 4d7a3f8

Please sign in to comment.