public static function isValid($visibility)
    {
        switch ($visibility) {
            case Visibility::TYPE_PRIVATE:
            case Visibility::TYPE_PROTECTED:
            case Visibility::TYPE_PUBLIC:
                return true;
        }
        throw new \InvalidArgumentException('The ' . $visibility . ' is not allowed');
    }