for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Igorsgm\Ghost\Models;
class Meta extends BaseModel
{
/**
* @var array
*/
public $pagination;
public function __construct(array $data = [])
$this->pagination = (object) ($data['pagination'] ?? []);
(object)$data['pagination'] ?? array()
object
array
$pagination
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..
}
* @return int
public function page()
return $this->pagination->page ?? null;
public function limit()
return $this->pagination->limit ?? null;
public function pages()
return $this->pagination->pages ?? null;
public function total()
return $this->pagination->total ?? null;
* @return bool
public function hasNext()
return ! empty($this->pagination->next);
public function next()
return $this->pagination->next ?? null;
public function hasPrev()
return ! empty($this->pagination->prev);
public function prev()
return $this->pagination->prev ?? null;
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..