for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace unreal4u\TelegramAPI\Telegram\Types\Inline\Keyboard;
use unreal4u\TelegramAPI\Abstracts\TelegramTypes;
use unreal4u\TelegramAPI\Telegram\Types\Custom\InlineKeyboardButtonArray;
/**
* This object represents an inline keyboard that appears right next to the message it belongs to.
*
* Warning: Inline keyboards are currently being tested and are only available in one-on-one chats (i.e., user-bot or
* user-user in the case of inline bots).
* Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported
* message.
* Objects defined as-is july 2016
* @see https://core.telegram.org/bots/api#replykeyboardhide
*/
class Markup
{
* Array of button rows, each represented by an Array of InlineKeyboardButton objects
* @var array
public $inline_keyboard = [];
protected function mapSubObjects(string $key, array $data): TelegramTypes
switch ($key) {
case 'inline_keyboard':
return new InlineKeyboardButtonArray($data, $this->logger);
logger
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
return parent::mapSubObjects($key, $data);
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: