for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BitWasp\Bitcoin\Collection;
use BitWasp\Buffertools\BufferInterface;
class StaticBufferCollection extends StaticCollection
{
/**
* @var BufferInterface[]
*/
protected $set = [];
* @var int
protected $position = 0;
* StaticBufferCollection constructor.
* @param BufferInterface[] $sigValues
public function __construct(array $sigValues)
array_map(function (BufferInterface $data) {
$this->set[] = $data;
}, $sigValues);
}
* @return BufferInterface
public function bottom()
return parent::bottom();
public function top()
return parent::top();
public function current()
return $this->set[$this->position];
* @param int $offset
public function offsetGet($offset)
if (!array_key_exists($offset, $this->set)) {
throw new \OutOfRangeException('No offset found');
return $this->set[$offset];