public function valideAliasArray($aliasArray)
    {
        $aliasArray = array_replace(array('width' => null, 'height' => null), $aliasArray);

        foreach ($aliasArray as $name => $value) {
            if (!in_array($name, array('width', 'height', 'focus'))) {
                throw new \Exception($name.' is not a good key');
            }

            if (in_array($name, array('width', 'height')) && (!preg_match('#^\d+$#', $value) && $value !== null)) {
                throw new \Exception($value.' must be a integer or null');
            }

            if ($name === 'focus' && !is_bool($value)) {
                throw new \Exception($value.' must be a boolean');
            }
        }

        if ($aliasArray['width'] === null || $aliasArray['height'] === null) {
            $aliasArray['focus'] = false;
        } elseif (!isset($aliasArray['focus']) && $aliasArray['width'] !== null && $aliasArray['height'] !== null) {
            $aliasArray['focus'] = true;
        }

        return $aliasArray;
    }