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\Telegram\Reply\Markup;
use Symfony\Component\Notifier\Bridge\Telegram\Reply\Markup\Button\KeyboardButton;
/**
* @author Mihail Krasilnikov <[email protected]>
*
* @see https://core.telegram.org/bots/api#replykeyboardmarkup
*/
final class ReplyKeyboardMarkup extends AbstractTelegramReplyMarkup
{
public function __construct()
{
$this->options['keyboard'] = [];
}
/**
* @param KeyboardButton[] $buttons
*
* @return $this
*/
public function keyboard(array $buttons): static
{
$buttons = array_map(static fn (KeyboardButton $button) => $button->toArray(), $buttons);
$this->options['keyboard'][] = $buttons;
return $this;
}
/**
* @return $this
*/
public function resizeKeyboard(bool $bool): static
{
$this->options['resize_keyboard'] = $bool;
return $this;
}
/**
* @return $this
*/
public function oneTimeKeyboard(bool $bool): static
{
$this->options['one_time_keyboard'] = $bool;
return $this;
}
/**
* @return $this
*/
public function selective(bool $bool): static
{
$this->options['selective'] = $bool;
return $this;
}
}
?>
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\Telegram\Reply\Markup;
use Symfony\Component\Notifier\Bridge\Telegram\Reply\Markup\Button\KeyboardButton;
/**
* @author Mihail Krasilnikov <[email protected]>
*
* @see https://core.telegram.org/bots/api#replykeyboardmarkup
*/
final class ReplyKeyboardMarkup extends AbstractTelegramReplyMarkup
{
public function __construct()
{
$this->options['keyboard'] = [];
}
/**
* @param KeyboardButton[] $buttons
*
* @return $this
*/
public function keyboard(array $buttons): static
{
$buttons = array_map(static fn (KeyboardButton $button) => $button->toArray(), $buttons);
$this->options['keyboard'][] = $buttons;
return $this;
}
/**
* @return $this
*/
public function resizeKeyboard(bool $bool): static
{
$this->options['resize_keyboard'] = $bool;
return $this;
}
/**
* @return $this
*/
public function oneTimeKeyboard(bool $bool): static
{
$this->options['one_time_keyboard'] = $bool;
return $this;
}
/**
* @return $this
*/
public function selective(bool $bool): static
{
$this->options['selective'] = $bool;
return $this;
}
}
Function Calls
None |
Stats
MD5 | d56c6614dc66c2c2204e165c152b6ba8 |
Eval Count | 0 |
Decode Time | 97 ms |