for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sludio\HelperBundle\Script\Model;
class AlertPublisher implements \Iterator, \ArrayAccess, \Countable
{
private $alerts;
public function __construct(AlertManagerInterface $alertManager)
$this->alerts = $alertManager->getAlerts();
}
/**
* @inheritdoc
*/
public function current()
return current($this->alerts);
public function next()
next($this->alerts);
public function key()
return key($this->alerts);
public function valid()
return key($this->alerts) !== null;
public function rewind()
return reset($this->alerts);
public function offsetExists($offset)
return isset($this->alerts[$offset]);
public function offsetGet($offset)
return isset($this->alerts[$offset]) ? $this->alerts[$offset] : null;
public function offsetSet($offset, $value)
$this->$this->alerts[$offset] = $value;
public function offsetUnset($offset)
unset($this->alerts[$offset]);
public function count()
return count($this->alerts);