/** * Returns the Alias, if given * * @return String|NULL */ public function getAlias() { if (!isset($this->alias)) { $this->alias = \r8\ary\last(explode('\\', $this->path)); } return $this->alias; }
public function testLast() { $this->assertNull(\r8\ary\last(array())); $this->assertSame("value", \r8\ary\last(array("value"))); $this->assertSame(20, \r8\ary\last(range(1, 20))); }