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 Livewire\Features\SupportConsoleCommands\Commands\Upgrade; use Livewire\..

Decoded Output download

<?php

namespace Livewire\Features\SupportConsoleCommands\Commands\Upgrade;

use Livewire\Features\SupportConsoleCommands\Commands\UpgradeCommand;

class ChangeTestAssertionMethods extends UpgradeStep
{
    public function handle(UpgradeCommand $console, \Closure $next)
    {
        $this->interactiveReplacement(
            console: $console,
            title: 'assertEmitted is now assertDispatched.',
            before: 'assertEmitted',
            after: 'assertDispatched',
            pattern: '/assertEmitted\((.*)\)/',
            replacement: 'assertDispatched($1)',
            directories: 'tests'
        );

        $this->interactiveReplacement(
            console: $console,
            title: 'assertEmittedTo is now assertDispatchedTo.',
            before: 'assertEmittedTo',
            after: 'assertDispatchedTo',
            pattern: '/assertEmittedTo\((.*)\)/',
            replacement: 'assertDispatchedTo($1)',
            directories: 'tests'
        );

        $this->interactiveReplacement(
            console: $console,
            title: 'assertNotEmitted is now assertNotDispatched.',
            before: 'assertNotEmitted',
            after: 'assertNotDispatched',
            pattern: '/assertNotEmitted\((.*)\)/',
            replacement: 'assertNotDispatched($1)',
            directories: 'tests'
        );

        $this->interactiveReplacement(
            console: $console,
            title: 'assertEmittedUp is no longer available.',
            before: 'assertEmittedUp',
            after: '<removed>',
            pattern: '/->assertEmittedUp\(.*\)/',
            replacement: '',
            directories: 'tests'
        );

        return $next($console);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Livewire\Features\SupportConsoleCommands\Commands\Upgrade;

use Livewire\Features\SupportConsoleCommands\Commands\UpgradeCommand;

class ChangeTestAssertionMethods extends UpgradeStep
{
    public function handle(UpgradeCommand $console, \Closure $next)
    {
        $this->interactiveReplacement(
            console: $console,
            title: 'assertEmitted is now assertDispatched.',
            before: 'assertEmitted',
            after: 'assertDispatched',
            pattern: '/assertEmitted\((.*)\)/',
            replacement: 'assertDispatched($1)',
            directories: 'tests'
        );

        $this->interactiveReplacement(
            console: $console,
            title: 'assertEmittedTo is now assertDispatchedTo.',
            before: 'assertEmittedTo',
            after: 'assertDispatchedTo',
            pattern: '/assertEmittedTo\((.*)\)/',
            replacement: 'assertDispatchedTo($1)',
            directories: 'tests'
        );

        $this->interactiveReplacement(
            console: $console,
            title: 'assertNotEmitted is now assertNotDispatched.',
            before: 'assertNotEmitted',
            after: 'assertNotDispatched',
            pattern: '/assertNotEmitted\((.*)\)/',
            replacement: 'assertNotDispatched($1)',
            directories: 'tests'
        );

        $this->interactiveReplacement(
            console: $console,
            title: 'assertEmittedUp is no longer available.',
            before: 'assertEmittedUp',
            after: '<removed>',
            pattern: '/->assertEmittedUp\(.*\)/',
            replacement: '',
            directories: 'tests'
        );

        return $next($console);
    }
}

Function Calls

None

Variables

None

Stats

MD5 84e352aa0554705a0dd4772a85072af1
Eval Count 0
Decode Time 120 ms