*/
public function add(Request $request)
{
- $this->stack = array_slice($this->stack, 0, $this->position + 1);
+ $this->stack = \array_slice($this->stack, 0, $this->position + 1);
$this->stack[] = clone $request;
- $this->position = count($this->stack) - 1;
+ $this->position = \count($this->stack) - 1;
}
/**
*/
public function isEmpty()
{
- return 0 == count($this->stack);
+ return 0 == \count($this->stack);
}
/**
*/
public function forward()
{
- if ($this->position > count($this->stack) - 2) {
+ if ($this->position > \count($this->stack) - 2) {
throw new \LogicException('You are already on the last page.');
}