for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace BuildR\Collection\Exception;
use BuildR\Foundation\Exception\Exception;
class MapException extends Exception {
const MESSAGE_NON_VALID_KEY = "Only scalar keys allowed, %s given in!";
const MESSAGE_NON_VALID_ARRAY = "This function only takes associative array as argument. Sequential given";
/**
* @param mixed $key
*
* @return self
*/
public static function notValidKey($key) {
$type = gettype($key);
return self::createByFormat(self::MESSAGE_NON_VALID_KEY, [$type]);
}
public function sequentialArray() {
return self::createByFormat(self::MESSAGE_NON_VALID_ARRAY);