protected function signatureToArray($method, $signature, $cleanup = true)
    {
        // get begin and end of arguments
        $begin = strpos($signature,  '(') + 1;
        $end   = strrpos($signature, ')');

        // extract the list of aringuments
        $signature = substr($signature, $begin, $end - $begin);

        // convert to array
        $arguments = explode(',', $signature);

        // empty result
        $result = [];

        $i = 1;

        // iterate arguments and check for typehint
        foreach ($arguments as $argument) {
            $argument = trim($argument);

            if ($cleanup === true) {
                // take it only if typehint exist and if this is not "array"
                if (stristr($argument, ' ') !== false && strtolower(substr($argument, 0, 5)) != 'array') {
                    $argument = explode(' ', $argument);
                    //array_push($result, $argument);
                    $result[$i] = $argument;
                }
            } else {
                //array_push($result, $argument);
                $result[$i] = $argument;
            }

            ++$i;
        }

        // Return arguments
        return [$method => $result];
    }