Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare(strict_types=1); namespace Endroid\QrCode\Label\Font; final class Font im..

Decoded Output download

<?php

declare(strict_types=1);

namespace Endroid\QrCode\Label\Font;

final class Font implements FontInterface
{
    public function __construct(
        private readonly string $path,
        private readonly int $size = 16
    ) {
        $this->assertValidPath($path);
    }

    private function assertValidPath(string $path): void
    {
        if (!file_exists($path)) {
            throw new \Exception(sprintf('Invalid font path "%s"', $path));
        }
    }

    public function getPath(): string
    {
        return $this->path;
    }

    public function getSize(): int
    {
        return $this->size;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Endroid\QrCode\Label\Font;

final class Font implements FontInterface
{
    public function __construct(
        private readonly string $path,
        private readonly int $size = 16
    ) {
        $this->assertValidPath($path);
    }

    private function assertValidPath(string $path): void
    {
        if (!file_exists($path)) {
            throw new \Exception(sprintf('Invalid font path "%s"', $path));
        }
    }

    public function getPath(): string
    {
        return $this->path;
    }

    public function getSize(): int
    {
        return $this->size;
    }
}

Function Calls

None

Variables

None

Stats

MD5 0080ada02c34b1aa8acf80f12018156f
Eval Count 0
Decode Time 99 ms