Remove unnecessary conditional when creating keyboard from params.

parent ce42f431
......@@ -91,7 +91,6 @@ class Keyboard extends Entity
if (!array_key_exists($keyboard_type, (array)$data)) {
$new_keyboard = [];
foreach ($args as $row) {
if (is_array($row)) {
$new_row = [];
if ($button_class::couldBe($row)) {
$new_row[] = new $button_class($row);
......@@ -104,13 +103,6 @@ class Keyboard extends Entity
}
}
}
} else {
$button = $row;
if (!($button instanceof $button_class)) {
$button = new $button_class($button);
}
$new_row = [$button];
}
$new_keyboard[] = $new_row;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment