BlockKit classes is now countable

This commit is contained in:
Deon George 2022-09-05 23:13:44 +10:00
parent a1be3ccd09
commit 521de13d92
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ use Slack\Exceptions\SlackSyntaxException;
*
* @package Slack
*/
abstract class BlockKit implements \JsonSerializable
abstract class BlockKit implements \JsonSerializable,\Countable
{
protected Collection $_data;

View File

@ -143,7 +143,7 @@ final class Message extends BlockKit
public function jsonSerialize()
{
// For interactive messages that generate a dialog, we need to return NULL
return $this->_data->count() ? parent::jsonSerialize() : NULL;
return count($this) ? parent::jsonSerialize() : NULL;
}
/**