BlockKit classes is now countable
This commit is contained in:
parent
a1be3ccd09
commit
521de13d92
@ -12,7 +12,7 @@ use Slack\Exceptions\SlackSyntaxException;
|
|||||||
*
|
*
|
||||||
* @package Slack
|
* @package Slack
|
||||||
*/
|
*/
|
||||||
abstract class BlockKit implements \JsonSerializable
|
abstract class BlockKit implements \JsonSerializable,\Countable
|
||||||
{
|
{
|
||||||
protected Collection $_data;
|
protected Collection $_data;
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ final class Message extends BlockKit
|
|||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
// For interactive messages that generate a dialog, we need to return NULL
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user