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 Illuminate\Console\View\Components; use Symfony\Component\Console\Questi..
Decoded Output download
<?php
namespace Illuminate\Console\View\Components;
use Symfony\Component\Console\Question\ChoiceQuestion;
class Choice extends Component
{
/**
* Renders the component using the given arguments.
*
* @param string $question
* @param array<array-key, string> $choices
* @param mixed $default
* @param int $attempts
* @param bool $multiple
* @return mixed
*/
public function render($question, $choices, $default = null, $attempts = null, $multiple = false)
{
return $this->usingQuestionHelper(
fn () => $this->output->askQuestion(
$this->getChoiceQuestion($question, $choices, $default)
->setMaxAttempts($attempts)
->setMultiselect($multiple)
),
);
}
/**
* Get a ChoiceQuestion instance that handles array keys like Prompts.
*
* @param string $question
* @param array $choices
* @param mixed $default
* @return \Symfony\Component\Console\Question\ChoiceQuestion
*/
protected function getChoiceQuestion($question, $choices, $default)
{
return new class($question, $choices, $default) extends ChoiceQuestion
{
protected function isAssoc(array $array): bool
{
return ! array_is_list($array);
}
};
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Console\View\Components;
use Symfony\Component\Console\Question\ChoiceQuestion;
class Choice extends Component
{
/**
* Renders the component using the given arguments.
*
* @param string $question
* @param array<array-key, string> $choices
* @param mixed $default
* @param int $attempts
* @param bool $multiple
* @return mixed
*/
public function render($question, $choices, $default = null, $attempts = null, $multiple = false)
{
return $this->usingQuestionHelper(
fn () => $this->output->askQuestion(
$this->getChoiceQuestion($question, $choices, $default)
->setMaxAttempts($attempts)
->setMultiselect($multiple)
),
);
}
/**
* Get a ChoiceQuestion instance that handles array keys like Prompts.
*
* @param string $question
* @param array $choices
* @param mixed $default
* @return \Symfony\Component\Console\Question\ChoiceQuestion
*/
protected function getChoiceQuestion($question, $choices, $default)
{
return new class($question, $choices, $default) extends ChoiceQuestion
{
protected function isAssoc(array $array): bool
{
return ! array_is_list($array);
}
};
}
}
Function Calls
None |
Stats
MD5 | 88754cdbdcdfaacdb3f1e7501d68371a |
Eval Count | 0 |
Decode Time | 104 ms |