for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Botonomous\utility;
/**
* Class ArrayUtility.
*/
class ArrayUtility extends AbstractUtility
{
* @param array $toFilter
* @param array $keepKeys Includes the keys that need to be kept in $toFilter array
*
* @return array
public function filterArray(array $toFilter, array $keepKeys)
return array_intersect_key($toFilter, array_flip($keepKeys));
}