for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* User: delboy1978uk
* Date: 19/11/2016
* Time: 12:18
*/
namespace Del\Form\Collection;
use Del\Form\Field\FieldInterface;
class FieldCollection extends AbstractCollection implements CollectionInterface
{
* @param $name
* @return FieldInterface|null
public function findByName($name)
$this->rewind();
while ($this->valid()) {
/** @var FieldInterface $field */
$field = $this->current();
if ($field->getName() == $name) {
return $field;
}
$this->next();
return null;
* @return bool
public function removeByName($name): bool
$key = $this->key();
$this->offsetUnset($key);
return true;
return false;
* @return FieldInterface
public function current(): FieldInterface
return parent::current();