Skip to content

Commit

Permalink
PHP-CS-Fixer edits
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyWyvern committed Jan 24, 2024
1 parent f0739c9 commit 5cf36eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Smalot/PdfParser/Encoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ protected function getEncodingClass(): string
$baseEncoding = preg_replace('/[^A-Z0-9]/is', '', $this->get('BaseEncoding')->getContent());

// Check for empty BaseEncoding field value
if ('' == $baseEncoding) $baseEncoding = 'StandardEncoding';
if ('' == $baseEncoding) {
$baseEncoding = 'StandardEncoding';
}

$className = '\\Smalot\\PdfParser\\Encoding\\'.$baseEncoding;

Expand Down
4 changes: 2 additions & 2 deletions tests/PHPUnit/Integration/EncodingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

use PHPUnitTests\TestCase;
use Smalot\PdfParser\Document;
use Smalot\PdfParser\Parser;
use Smalot\PdfParser\Element;
use Smalot\PdfParser\Encoding;
use Smalot\PdfParser\Encoding\StandardEncoding;
use Smalot\PdfParser\Exception\EncodingNotFoundException;
use Smalot\PdfParser\Header;
use Smalot\PdfParser\Parser;

class EncodingTest extends TestCase
{
Expand Down Expand Up @@ -124,7 +124,7 @@ public function testEmptyBaseEncodingFallback(): void
$document = $this->fixture->parseFile($filename);
$objects = $document->getObjects();

$this->assertEquals(25, count($objects));
$this->assertEquals(25, \count($objects));
$this->assertArrayHasKey('3_0', $objects);
}
}

0 comments on commit 5cf36eb

Please sign in to comment.