first() public method

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