for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Remorhaz\UniLex\Parser;
use ArrayAccess;
use Remorhaz\UniLex\AttributeListInterface;
use Remorhaz\UniLex\Exception;
use ReturnTypeWillChange;
class AttributeListShortcut implements ArrayAccess
{
private $attributeList;
public function __construct(AttributeListInterface $attributeList)
$this->attributeList = $attributeList;
}
/**
* @param mixed $offset
* @return mixed
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
return $this
->attributeList
->getAttribute($offset);
* @param mixed $value
public function offsetSet($offset, $value)
$this
->setAttribute($offset, $value);
* @return bool
public function offsetExists($offset)
->attributeExists($offset);
* @throws Exception
public function offsetUnset($offset)
throw new Exception("Cannot remove symbol attribute");