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 namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; use Psalm\Type\Uni..

Decoded Output download

<?php

namespace Psalm\Storage\Assertion;

use Psalm\Storage\Assertion;
use Psalm\Type\Union;

/**
 * @psalm-immutable
 */
final class InArray extends Assertion
{
    public Union $type;

    public function __construct(Union $type)
    {
        $this->type = $type;
    }

    public function getNegation(): Assertion
    {
        return new NotInArray($this->type);
    }

    public function __toString(): string
    {
        return 'in-array-' . $this->type->getId();
    }

    public function isNegationOf(Assertion $assertion): bool
    {
        return $assertion instanceof NotInArray && $this->type->getId() === $assertion->type->getId();
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Psalm\Storage\Assertion;

use Psalm\Storage\Assertion;
use Psalm\Type\Union;

/**
 * @psalm-immutable
 */
final class InArray extends Assertion
{
    public Union $type;

    public function __construct(Union $type)
    {
        $this->type = $type;
    }

    public function getNegation(): Assertion
    {
        return new NotInArray($this->type);
    }

    public function __toString(): string
    {
        return 'in-array-' . $this->type->getId();
    }

    public function isNegationOf(Assertion $assertion): bool
    {
        return $assertion instanceof NotInArray && $this->type->getId() === $assertion->type->getId();
    }
}

Function Calls

None

Variables

None

Stats

MD5 c9dbd9b534c4a057ecccc397d47ba4f2
Eval Count 0
Decode Time 77 ms