for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace BitWasp\Bitcoin\Collection;
use BitWasp\Buffertools\BufferInterface;
/**
* @deprecated v2.0.0
*/
class StaticBufferCollection extends StaticCollection
BitWasp\Bitcoin\Collection\StaticCollection
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
class StaticBufferCollection extends /** @scrutinizer ignore-deprecated */ StaticCollection
{
* @var BufferInterface[]
protected $set = [];
* @var int
protected $position = 0;
* StaticBufferCollection constructor.
* @param BufferInterface ...$values
public function __construct(BufferInterface... $values)
$this->set = $values;
}
* @return BufferInterface
public function bottom(): BufferInterface
return parent::bottom();
public function top(): BufferInterface
return parent::top();
public function current(): BufferInterface
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];