for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File ClearableTrait.php
*
* @author Edward Pfremmer <[email protected]>
*/
namespace Epfremme\Collection\Traits;
* Trait ClearableTrait
* @property array|mixed[] $elements
* @package Epfremme\Collection\Traits
trait ClearableTrait
{
* Empty the collection
* @return void
public function clear()
$this->elements = [];
}
* Test if collection is empty
* @return bool
public function isEmpty()
return empty($this->elements);