last() public method

Return the last element in the array or null if empty
public last ( ) : Rule | null
return Rule | null
Ejemplo n.º 1
0
 public function testCanReturnEndRules()
 {
     $repo = new RuleRepository($this->rules);
     $this->assertSame($this->rules[0], $repo->first());
     $this->assertSame($this->rules[1], $repo->last());
 }