for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Jmw\Collection\Lists;
use Jmw\Collection\ImmutableCollectionTrait;
use Jmw\Collection\Exception\UnsupportedOperationException;
/**
* This trait is ensures immutability by throwing an exception
* on all mutable ListInterface methods
* @author john
*
*/
trait ImmutableListTrait
{
use ImmutableCollectionTrait;
* @throws UnsupportedOperationException
public function addAt($index, $element)
$index
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$element
throw new UnsupportedOperationException('addAt');
}
public function removeAt($index)
throw new UnsupportedOperationException('removeAt');
public function set($index, $element)
throw new UnsupportedOperationException('set');
/*********************************************
** Array Access Methods
*********************************************/
* {@inheritDoc}
* @see ArrayAccess::offsetSet()
public function offsetSet($offset, $value)
$offset
$value
throw new UnsupportedOperationException('offsetSet');
* @see ArrayAccess::offsetUnset()
public function offsetUnset($offset)
throw new UnsupportedOperationException('offsetUnset');
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.