for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PragmaRX\Firewall\Repositories;
class Message
{
/**
* Saved messages.
*
* @var array
*/
private $messages;
public function __construct()
$this->messages = collect();
collect()
Illuminate\Support\Collection
array
$messages
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
}
* Add a message to the messages list.
* @param $message
public function addMessage($message)
collect((array) $message)->each(function($item) {
collect($item)->flatten()->each(function($flattened) {
$this->messages->push($flattened);
});
* Get the messages.
* @return array
public function getMessages()
return $this->messages;
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..