Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/Illuminate/Support/MessageBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MessageBag implements Jsonable, JsonSerializable, MessageBagContract, Mess
/**
* All of the registered messages.
*
* @var array
* @var array<string, array<string>>
*/
protected $messages = [];

Expand All @@ -28,7 +28,7 @@ class MessageBag implements Jsonable, JsonSerializable, MessageBagContract, Mess
/**
* Create a new message bag instance.
*
* @param array $messages
* @param array<string, Arrayable|string|array<string>> $messages
*/
public function __construct(array $messages = [])
{
Expand All @@ -42,7 +42,7 @@ public function __construct(array $messages = [])
/**
* Get the keys present in the message bag.
*
* @return array
* @return array<string>
*/
public function keys()
{
Expand Down Expand Up @@ -95,7 +95,7 @@ protected function isUnique($key, $message)
/**
* Merge a new array of messages into the message bag.
*
* @param \Illuminate\Contracts\Support\MessageProvider|array $messages
* @param \Illuminate\Contracts\Support\MessageProvider|array<string, array<string>> $messages
* @return $this
*/
public function merge($messages)
Expand Down Expand Up @@ -193,7 +193,7 @@ public function first($key = null, $format = null)
*
* @param string $key
* @param string|null $format
* @return array
* @return array<string>|array<string, array<string>>
*/
public function get($key, $format = null)
{
Expand All @@ -218,7 +218,7 @@ public function get($key, $format = null)
*
* @param string $key
* @param string|null $format
* @return array
* @return array<string, array<string>>
*/
protected function getMessagesForWildcardKey($key, $format)
{
Expand All @@ -234,7 +234,7 @@ protected function getMessagesForWildcardKey($key, $format)
* Get all of the messages for every key in the message bag.
*
* @param string|null $format
* @return array
* @return array<string>
*/
public function all($format = null)
{
Expand Down Expand Up @@ -276,10 +276,10 @@ public function forget($key)
/**
* Format an array of messages.
*
* @param array $messages
* @param array<string> $messages
* @param string $format
* @param string $messageKey
* @return array
* @return array<string>
*/
protected function transform($messages, $format, $messageKey)
{
Expand Down Expand Up @@ -310,7 +310,7 @@ protected function checkFormat($format)
/**
* Get the raw messages in the message bag.
*
* @return array
* @return array<string, array<string>>
*/
public function messages()
{
Expand All @@ -320,7 +320,7 @@ public function messages()
/**
* Get the raw messages in the message bag.
*
* @return array
* @return array<string, array<string>>
*/
public function getMessages()
{
Expand Down
Loading