Skip to content

Commit

Permalink
[8.x] Use actual countable interface on MessageBag (laravel#38227)
Browse files Browse the repository at this point in the history
* Use actual countable interface on MessageBag

* Remove Arrayable contract
  • Loading branch information
driesvints authored Aug 3, 2021
1 parent beb9de0 commit 1fd1bb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 3 additions & 8 deletions src/Illuminate/Contracts/Support/MessageBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace Illuminate\Contracts\Support;

interface MessageBag extends Arrayable
use Countable;

interface MessageBag extends Arrayable, Countable
{
/**
* Get the keys present in the message bag.
Expand Down Expand Up @@ -97,11 +99,4 @@ public function isEmpty();
* @return bool
*/
public function isNotEmpty();

/**
* Get the number of messages in the container.
*
* @return int
*/
public function count();
}
4 changes: 1 addition & 3 deletions src/Illuminate/Support/MessageBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

namespace Illuminate\Support;

use Countable;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\MessageBag as MessageBagContract;
use Illuminate\Contracts\Support\MessageProvider;
use JsonSerializable;

class MessageBag implements Arrayable, Countable, Jsonable, JsonSerializable, MessageBagContract, MessageProvider
class MessageBag implements Jsonable, JsonSerializable, MessageBagContract, MessageProvider
{
/**
* All of the registered messages.
Expand Down

0 comments on commit 1fd1bb1

Please sign in to comment.