Checks if DCA is installed.

@throws \Discord\Exceptions\DCANotFoundException Thrown when DCA is not found.

@return bool Whether DCA is installed or not.
554209
public function checkForDCA()
    {
        $binaries = [
            'Darwin' => [
                32 => 'dca-v0.1.0-darwin-10.6-386',
                64 => 'dca-v0.1.0-darwin-10.6-amd64',
            ],
            'Linux' => [
                32 => 'dca-v0.1.0-linux-386',
                64 => 'dca-v0.1.0-linux-amd64',
            ],
        ];

        if (array_key_exists(PHP_OS, $binaries)) {
            $binary = realpath(__DIR__.'/../../../bin/'.$binaries[PHP_OS][PHP_INT_SIZE * 8]);

            $this->dca = $binary;

            return true;
        }

        $this->emit('error', [new DCANotFoundException('No DCA binary was found that is compatible with your operating system and arch.')]);

        return false;
    }
76379
public function isAuthenticated(): bool
    {
        if (!$this->securityContext->canBeInitialized()) {
            return false;
        }

        return array_reduce($this->securityContext->getAuthenticationTokens(), function (bool $isAuthenticated, TokenInterface $token) {
            return $isAuthenticated || $token->isAuthenticated();
        }, false);
    }
234485
public function check()
    {
        $result = false;

        $version = $this->dataService->getVersion();

        // Check the version. If this is > 0 then it seems to be a version number like 1.2.3
        // Because the getVersion method can return an error like
        //      Warning: Identity file /Users/agrunwald/.ssh/id_rsa_config not accessible: No such file or directory.
        //      Permission denied (publickey).
        //
        if ($version && version_compare($version, 0, '>')) {
            $this->version = $version;
            $result = true;
        }

        return $result;
    }
202177
public function canUpdate()
    {
        return $this->canModify() && (
            $this->canInstall() || (
                ! empty( $this->installedVersion ) && (
                    ( ( $this->availableVersion == 'dev-master' ||
                        $this->installedVersion == 'dev-master' ) &&
                      $this->installedReference != $this->availableReference ) ||
                    version_compare(
                        $this->availableVersion,
                        $this->installedVersion,
                        '>'
                    )
                )
            )
        );
    }
502798
protected function isInstalled()
    {
        $disk = Storage::createLocalDriver([
            'driver' => 'local',
            'root'   => app_path(),
        ]);
        
        foreach ($this->files['required'] as $required) {
            if (! $disk->exists(str_replace(['.stub', app_path()], ['.php', ''], $required))) {
                return false;
            }
        }
        
        return true;
    }
1101341
protected function _isAllowed()
    {
        $result = parent::_isAllowed();
        $result = $result && $this->_authorization->isAllowed($this->_aclResource);
        return $result;
    }
1146424
public static boolean isInstalled() throws SecurityException {
        java.util.logging.Logger rootLogger = getRootLogger();
        Handler[] handlers = rootLogger.getHandlers();
        for (int i = 0; i < handlers.length; i++) {
            if (handlers[i] instanceof SLF4JBridgeHandler) {
                return true;
            }
        }
        return false;
    }
1056873
public function isAccessible()
    {
        if ($this->hasAccessRestrictions() === false) {
            return true;
        }

        if ($this->securityContext->canBeInitialized() === false) {
            return true;
        }

        foreach ($this->accessRoles as $roleName) {
            if ($this->securityContext->hasRole($roleName)) {
                return true;
            }
        }

        return false;
    }
13932
public function isActive()
    {
        // wee need a namespace first
        if(!isset($this->namespace)) {
            return false;
        }

        // Plugin is not active is it's not installed
        if(!self::isInstalled($this->namespace)) {
            return false;
        }

        if(!$this->isActive) {
            return false;
        }
        return true;
    }
1325743
public function isIndirect()
    {
        $erroringFile = $erroringPackage = null;
        foreach ($this->trace as $line) {
            if (\in_array($line['function'], ['require', 'require_once', 'include', 'include_once'], true)) {
                continue;
            }
            if (!isset($line['file'])) {
                continue;
            }
            $file = $line['file'];
            if ('-' === $file || 'Standard input code' === $file || !realpath($file)) {
                continue;
            }
            if (!$this->pathOriginatesFromVendor($file)) {
                return false;
            }
            if (null !== $erroringFile && null !== $erroringPackage) {
                $package = $this->getPackage($file);
                if ('composer' !== $package && $package !== $erroringPackage) {
                    return true;
                }
                continue;
            }
            $erroringFile = $file;
            $erroringPackage = $this->getPackage($file);
        }

        return false;
    }
523695
public function canAdd()
    {
        $result = false;

        $component = $this->getService('repos:components.component')
        ->find(array('component' => 'com_'.$this->getIdentifier()->package));

        if ($component) {
            $result = $component->authorize('add');
        }

        return $result;
    }
189391
public function hasChildren()
    {
        if ($this->isDot()) {
            return false;
        }
        if (is_link($this->getPathname()) && !($this->flags & self::FOLLOW_SYMLINKS)) {
            return false;
        }
        return $this->isDir();
    }
450181
protected function isAPCUSupported()
    {
        static $apcuSupported = null;
        if (null === $apcuSupported) {
            // Need to check for CLI because Symfony won't: https://github.com/symfony/symfony/pull/25080
            $apcuSupported = Director::is_cli() ? ini_get('apc.enable_cli') && ApcuAdapter::isSupported() : ApcuAdapter::isSupported();
        }
        return $apcuSupported;
    }
1106175
public function isValid()
    {
        if (!$this->hasValidFormat()) {
            return false;
        }

        $vn_has_to_be = $this->calculateVerificationNumber();
        if ($this->vn == $vn_has_to_be) {
            return true;
        }

        return false;
    }
45823
public function is_authenticated() {
		$retval = false;
		$parentRes = false;
		
		try {
			if(parent::is_authenticated()) {
				$parentRes = true;
				$retval = $this->is_valid_sid($this->sid);
			}
		}
		catch(Exception $e) {
			$this->exception_handler($e->getMessage());
		}
		
		return ($retval);
	}
1336026
public static function isPiwikInstalled()
    {
        $config = Config::getInstance()->getLocalPath();
        $exists = file_exists($config);

        // Piwik is not installed if the config file is not found
        if (!$exists) {
            return false;
        }

        $general = Config::getInstance()->General;

        $isInstallationInProgress = false;
        if (array_key_exists('installation_in_progress', $general)) {
            $isInstallationInProgress = (bool) $general['installation_in_progress'];
        }
        if ($isInstallationInProgress) {
            return false;
        }

        // Check that the database section is really set, ie. file is not empty
        if (empty(Config::getInstance()->database['username'])) {
            return false;
        }
        return true;
    }
886951
private function isEnabled()
    {
        if (!$this->enabled) {
            return false;
        }

        if ($this->authorizationChecker) {
            foreach ($this->trustedRoles as $trustedRole) {
                if ($this->authorizationChecker->isGranted($trustedRole)) {
                    return false;
                }
            }
        }

        return true;
    }