for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Accessible\MethodManager;
class CollectionManager extends MethodCallManager
{
/**
* Indicates wether given collection contains the wanted item or not.
*
* @param mixed $needle
* @param array $haystack
* @return bool
*/
public static function collectionContains($needle, $haystack)
foreach ($haystack as $value) {
if ($value === $needle) {
return true;
}
return false;