for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Maketok\DataMigration\Hashmap;
use Maketok\DataMigration\HashmapInterface;
class ArrayHashmap implements HashmapInterface
{
/**
* @var string
*/
private $code;
* @var array
private $storage;
* @param string $code
public function __construct($code)
$this->code = $code;
}
* {@inheritdoc}
public function offsetExists($offset)
return isset($this->storage[$offset]);
public function offsetGet($offset)
return isset($this->storage[$offset]) ? $this->storage[$offset] : null;
public function offsetSet($offset, $value)
$this->storage[$offset] = $value;
public function offsetUnset($offset)
$this->storage[$offset] = null;
public function load(array $storage = [])
$this->storage = $storage;
public function __get($offset)
return $this->offsetGet($offset);
public function __set($offset, $value)
$this->offsetSet($offset, $value);
public function getCode()
return $this->code;