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 /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@..

Decoded Output download

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\ContactEveryone;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Franck Ranaivo-Harisoa <[email protected]>
 */
final class ContactEveryoneTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): ContactEveryoneTransport
    {
        if ('contact-everyone' !== $dsn->getScheme()) {
            throw new UnsupportedSchemeException($dsn, 'contact-everyone', $this->getSupportedSchemes());
        }

        $token = $this->getUser($dsn);
        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $diffusionName = $dsn->getOption('diffusionname');
        $category = $dsn->getOption('category');

        return (new ContactEveryoneTransport($token, $diffusionName, $category, $this->client, $this->dispatcher))->setHost($host)->setPort($dsn->getPort());
    }

    protected function getSupportedSchemes(): array
    {
        return ['contact-everyone'];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\ContactEveryone;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Franck Ranaivo-Harisoa <[email protected]>
 */
final class ContactEveryoneTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): ContactEveryoneTransport
    {
        if ('contact-everyone' !== $dsn->getScheme()) {
            throw new UnsupportedSchemeException($dsn, 'contact-everyone', $this->getSupportedSchemes());
        }

        $token = $this->getUser($dsn);
        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $diffusionName = $dsn->getOption('diffusionname');
        $category = $dsn->getOption('category');

        return (new ContactEveryoneTransport($token, $diffusionName, $category, $this->client, $this->dispatcher))->setHost($host)->setPort($dsn->getPort());
    }

    protected function getSupportedSchemes(): array
    {
        return ['contact-everyone'];
    }
}

Function Calls

None

Variables

None

Stats

MD5 b80c898c9de971fd2084707356ddc7b8
Eval Count 0
Decode Time 88 ms