for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Foo\Grid\Collection;
use Foo\Grid\Row\IRow;
use InvalidArgumentException;
use LogicException;
class Rows extends BaseCollection
{
/** @var IRow[] */
protected $components = [];
/**
* @param string|null $tag
* @param array $attributes
*/
public function __construct(string $tag = null, $attributes = [])
$tag = $tag ?: 'tbody';
parent::__construct($tag, $attributes);
}
* @return IRow
* @throws LogicException
public function current()
/** @var IRow $object */
$object = parent::current();
$this->verifyReturn($object, IRow::class);
return $object;
* @param int|null $offset
* @param IRow $value
*
* @throws InvalidArgumentException
public function offsetSet($offset, $value)
$this->verifyArgument($value, IRow::class);
parent::offsetSet($offset, $value);
* @param int $offset
* @return IRow|null
public function offsetGet($offset)
$object = parent::offsetGet($offset);