@param Tool $tool

@return bool
492595
public function canProceed(Tool $tool)
    {
        if (false === $this->helper->getFilesystem()->isFileAlreadyExist($tool->getFilename())) {
            return true;
        }

        $doReplace = $tool->forceReplace();

        if (true === $this->configuration->isInteractiveMode()) {
            $this->io->write('<comment>Checksums are not equal!</comment>');
            $this->io->write(sprintf(
                '<comment>Do you want to overwrite the existing file "%s"?</comment>',
                $tool->getName()
            ));

            $doReplace = $this->io->askConfirmation('<question>[yes] or [no]?</question>', false);
        }

        return $doReplace;
    }
1037995
protected function templateExists($template)
    {
        $loader = $this->twig->getLoader();
        if (method_exists($loader, 'exists')) {
            return $loader->exists($template);
        }

        try {
            // cast possible TemplateReferenceInterface to string because the
            // EngineInterface supports them but Twig_LoaderInterface does not
            $loader->getSource($template)->getCode();
        } catch (\Twig_Error_Loader $e) {
            return false;
        }

        return true;
    }
527248
public function hasIndex($index)
    {
        if ($index instanceof Index) {
            $index = $index->getName();
        }

        return \in_array($index, $this->_indices);
    }
252996
public function canProceed(Tool $tool)
    {
        if (false === $this->helper->getDownloader()->isAccessible($tool->getUrl())) {
            return false;
        }

        if (empty($tool->getSignUrl())) {
            return true;
        }

        if (false === $this->helper->getDownloader()->isAccessible($tool->getSignUrl())) {
            return false;
        }

        return true;
    }
898839
public function canProceed(Tool $tool)
    {
        if (false === $this->configuration->isDevMode() && true === $tool->isOnlyDev()) {
            return false;
        }

        return true;
    }
400161
public function check_tool_proxy($toolproxyguid, $body = null) {

        $ok = false;
        $toolproxy = null;
        $consumerkey = lti\get_oauth_key_from_headers();
        if (empty($toolproxyguid)) {
            $toolproxyguid = $consumerkey;
        }

        if (!empty($toolproxyguid)) {
            $toolproxy = lti_get_tool_proxy_from_guid($toolproxyguid);
            if ($toolproxy !== false) {
                if (!$this->is_unsigned() && ($toolproxy->guid == $consumerkey)) {
                    $ok = $this->check_signature($toolproxy->guid, $toolproxy->secret, $body);
                } else {
                    $ok = $this->is_unsigned();
                }
            }
        }
        if ($ok) {
            $this->toolproxy = $toolproxy;
        }
        return $ok;
    }
71829
public function hasOptions($command = '') {
        if ($command) {
            $def = $this->getSchema($command);
            return $this->hasOptionsDef($def);
        } else {
            foreach ($this->commandSchemas as $pattern => $def) {
                if ($this->hasOptionsDef($def)) {
                    return true;
                }
            }
        }
        return false;
    }
930064
public function hasOwnMethod($name)
    {
        if ($this->hasMethod($name) === true) {
            return $this->getMethod($name)->class === $this->getName();
        } else {
            return false;
        }
    }
147899
public function hasLogger($channel): bool
    {
        $channel = strtolower($channel);

        return isset($this->loggers[$channel]);
    }
357073
private static function validate_method( $method ) {

		if ( $method && isset( $method[0] ) && isset( $method[1] ) ) {
			if ( method_exists( $method[0], $method[1] ) ) {
				return true;
			}
		}

		return false;
	}
361014
public boolean isToolSelected(int tool) {
        boolean selected = false;
        switch (tool) {
            case IBurpExtenderCallbacks.TOOL_PROXY:
                selected = jCheckBoxProxy.isSelected();
                break;
            case IBurpExtenderCallbacks.TOOL_REPEATER:
                selected = jCheckBoxRepeater.isSelected();
                break;
            case IBurpExtenderCallbacks.TOOL_SCANNER:
                selected = jCheckBoxScanner.isSelected();
                break;
            case IBurpExtenderCallbacks.TOOL_INTRUDER:
                selected = jCheckBoxIntruder.isSelected();
                break;
            case IBurpExtenderCallbacks.TOOL_SEQUENCER:
                selected = jCheckBoxSequencer.isSelected();
                break;
            case IBurpExtenderCallbacks.TOOL_SPIDER:
                selected = jCheckBoxSpider.isSelected();
                break;
            case IBurpExtenderCallbacks.TOOL_EXTENDER:
                selected = jCheckBoxExtender.isSelected();
                break;
            case IBurpExtenderCallbacks.TOOL_TARGET:
                break;
            default:
                break;
        }
        return selected;
    }
1082569
public function hasScope($scope)
    {
        if (is_array($scope)) {
            foreach ($scope as $s) {
                if ($this->hasScope($s) === false) {
                    return false;
                }
            }

            return true;
        }

        return $this->getAccessToken()->hasScope($scope);
    }
573365
public static function hasAlias(string $alias): bool
    {
        // empty OR not an alias
        if (!$alias || $alias[0] !== '@') {
            return false;
        }

        return isset(self::$aliases[$alias]);
    }
116822
protected function renderCustomTools($tools)
    {
        return $tools->map(function ($tool) {
            if ($tool instanceof Renderable) {
                return $tool->render();
            }

            if ($tool instanceof Htmlable) {
                return $tool->toHtml();
            }

            return (string) $tool;
        })->implode(' ');
    }
448025
public function serialize(AdminTool $tool, array $options = [])
    {
        $serialized = [
            'id' => $tool->getUuid(),
            'icon' => $tool->getClass(),
            'name' => $tool->getName(),
        ];

        return $serialized;
    }
1076365
public function hasMethod($methodName)
    {
        return \method_exists($this, $methodName) || \method_exists($this, $this->public_function_prefix . $methodName);
    }
199365
public function offsetExists($index)
    {
        foreach ($this->keys() as $key) {
            if ($key === $index) {
                return true;
            }
        }

        return false;
    }