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); /* * This file is a part of Sculpin. * * (c) Dragonfly..

Decoded Output download

<?php

declare(strict_types=1);

/*
 * This file is a part of Sculpin.
 *
 * (c) Dragonfly Development Inc.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sculpin\Core\Output;

use Sculpin\Core\Permalink\PermalinkInterface;
use Sculpin\Core\Source\SourceInterface;

/**
 * @author Beau Simensen <[email protected]>
 */
class SourceOutput implements OutputInterface
{
    /**
     * @var SourceInterface
     */
    protected $source;

    public function __construct(SourceInterface $source)
    {
        $this->source = $source;
    }

    /**
     * {@inheritdoc}
     */
    public function outputId(): string
    {
        return $this->source->sourceId();
    }

    /**
     * {@inheritdoc}
     */
    public function pathname(): string
    {
        return $this->source->relativePathname();
    }

    /**
     * {@inheritdoc}
     */
    public function permalink(): PermalinkInterface
    {
        return $this->source->permalink();
    }

    /**
     * {@inheritdoc}
     */
    public function hasFileReference(): bool
    {
        return $this->source->useFileReference();
    }

    /**
     * {@inheritdoc}
     */
    public function file(): ?\SplFileInfo
    {
        return $this->source->useFileReference() ? $this->source->file() : null;
    }

    /**
     * {@inheritdoc}
     */
    public function formattedContent(): ?string
    {
        return $this->source->useFileReference() ? null : $this->source->formattedContent();
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

/*
 * This file is a part of Sculpin.
 *
 * (c) Dragonfly Development Inc.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sculpin\Core\Output;

use Sculpin\Core\Permalink\PermalinkInterface;
use Sculpin\Core\Source\SourceInterface;

/**
 * @author Beau Simensen <[email protected]>
 */
class SourceOutput implements OutputInterface
{
    /**
     * @var SourceInterface
     */
    protected $source;

    public function __construct(SourceInterface $source)
    {
        $this->source = $source;
    }

    /**
     * {@inheritdoc}
     */
    public function outputId(): string
    {
        return $this->source->sourceId();
    }

    /**
     * {@inheritdoc}
     */
    public function pathname(): string
    {
        return $this->source->relativePathname();
    }

    /**
     * {@inheritdoc}
     */
    public function permalink(): PermalinkInterface
    {
        return $this->source->permalink();
    }

    /**
     * {@inheritdoc}
     */
    public function hasFileReference(): bool
    {
        return $this->source->useFileReference();
    }

    /**
     * {@inheritdoc}
     */
    public function file(): ?\SplFileInfo
    {
        return $this->source->useFileReference() ? $this->source->file() : null;
    }

    /**
     * {@inheritdoc}
     */
    public function formattedContent(): ?string
    {
        return $this->source->useFileReference() ? null : $this->source->formattedContent();
    }
}

Function Calls

None

Variables

None

Stats

MD5 472483e760496c660a6653b7c1d72c1e
Eval Count 0
Decode Time 96 ms