Checks if an update is needed

@param string &$description The description for the update
@return bool Whether an update is needed (TRUE) or not (FALSE)
500326
public function checkForUpdate(&$description)
    {
        if ($this->isWizardDone()) {
            return false;
        }

        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_template');
        $queryBuilder->getRestrictions()->removeAll();
        $affectedRows = $queryBuilder->count('uid')
            ->from('sys_template')
            ->where(
                $queryBuilder->expr()->orX(
                    $queryBuilder->expr()->like(
                        'constants',
                        $queryBuilder->createNamedParameter('%' . $this->oldLocation . '%', \PDO::PARAM_STR)
                    ),
                    $queryBuilder->expr()->like(
                        'config',
                        $queryBuilder->createNamedParameter('%' . $this->oldLocation . '%', \PDO::PARAM_STR)
                    ),
                    $queryBuilder->expr()->like(
                        'include_static_file',
                        $queryBuilder->createNamedParameter('%' . $this->oldLocation . '%', \PDO::PARAM_STR)
                    )
                )
            )
            ->execute()->fetchColumn(0);

        if ($affectedRows) {
            $description = 'tt_address\' Static templates have been relocated to EXT:tt_address/Configuration/TypoScript/LegacyPlugin';
        }
        return (bool)$affectedRows;
    }
892768
public function setDescription($description)
    {
        $tag = ($this->version == Eresus_Feed_Writer::ATOM) ? 'summary' : 'description';
        $this->addElement($tag, $description);
    }
663770
private function checkPackageRequirements($package = '')
	{
		if ($package == '')
		{
			return false;
		}

		$installed_exts = get_loaded_extensions();
		if (!in_array($package, $installed_exts))
		{
			$this->setError(\Lang::txt('[ERROR] You are missing the required PHP package %s.', $package));
			return false;
		}

		return true;
	}
1073451
public function appendHelpParameter($description) {
        $Option = new HelpOption($description);
        $Self = $this;
        $this->appendParameter($Option, function() use ($Self) {
            $Self->displayHelp();
        });
    }
1224006
public function required($value)
    {

        if(!$this->hasMessage('required')){
            $this->addMessage('required', 'This value is required');
        }

        if (is_null($value) || $value == '') {
            return false;
        }

        return true;
    }
834663
protected function needInstallConfirmation(string $hook) : bool
    {
        return $this->repository->hookExists($hook) && !$this->force;
    }
1143595
public function validateCode($code)
    {
        $coupon = $this->_controller->getRepository()->find(array('code' => $code));

        if ($coupon && !$coupon->expired()) {
            $discount = $coupon->discount * 100;
            $this->setMessage(AnTranslator::sprintf('COM-SUBSCRIPTIONS-VALID-COUPON', $discount));
            return true;
        } else {
            $this->setMessage(AnTranslator::_('COM-SUBSCRIPTIONS-INVALID-COUPON'));
            return false;
        }
    }
1237922
public function checkCommentDescription(bool $descriptionRequired): void
    {
        $this->descriptionRequired = $descriptionRequired;

        $commentStartToken = $this->docHelper->getBlockStartToken();
        $commentEndToken = $this->docHelper->getBlockEndToken();

        $summaryPtr = $this->summaryHelper->getCommentSummaryPosition();

        if ($summaryPtr === -1) {
            return;
        }

        $hasTags = count($commentStartToken['comment_tags']) > 0;

        $descriptionStartPtr = $this->getCommentDescriptionStartPointer();

        if ($descriptionStartPtr === -1) {
            $this->addDescriptionNotFoundError($summaryPtr);

            return;
        }

        $descriptionEndPtr = $this->getCommentDescriptionEndPointer();
        $descEndToken = $this->tokens[$descriptionEndPtr];

        $this->checkCommentDescriptionUcFirst($descriptionStartPtr);

        //Fix no or too much lines after description.
        $toLine = $commentEndToken['line'];
        $expectedLines = 0;

        if ($hasTags) {
            $firstTagPtr = array_shift($commentStartToken['comment_tags']);
            $firstTagToken = $this->tokens[$firstTagPtr];
            $toLine = $firstTagToken['line'];

            $expectedLines = 1;
        }

        $diffLines = $toLine - $descEndToken['line'] - 1;

        if ($diffLines === $expectedLines) {
            return;
        }

        if ($diffLines < $expectedLines && $hasTags) {
            $fixNoLine = $this->file->addFixableError(
                AbstractDocSniff::MESSAGE_NO_LINE_AFTER_DESCRIPTION,
                $descriptionEndPtr,
                AbstractDocSniff::CODE_NO_LINE_AFTER_DESCRIPTION
            );

            if ($fixNoLine) {
                $this->fixNoLineAfterDescription();
            }

            return;
        }

        $fixMuchLines = $this->file->addFixableError(
            AbstractDocSniff::MESSAGE_MUCH_LINES_AFTER_DESCRIPTION,
            $descriptionEndPtr,
            AbstractDocSniff::CODE_MUCH_LINES_AFTER_DESCRIPTION
        );

        if ($fixMuchLines) {
            $this->fixMuchLinesAfterDescription($descEndToken['line'] + 1, $toLine - 1);
        }
    }
792385
private function requireFile($path)
    {
        if (file_exists($path)) {
            $this->updateLog("debug", "File {$path} exists; requiring file");

            /** @noinspection PhpIncludeInspection */
            require $path;

            $this->updateLog("info", "Completed loading {$path}");

            return true;
        } else {
            $this->updateLog("debug", "File {$path} does not exist");

            return false;
        }
    }
336748
private function assertRelationshipNameAndDescription(string $name, array $description): bool
    {
        \assert(
            \is_string($name) === true && empty($name) === false,
            "Relationship names for type `" . $this->getType() . '` should be non-empty strings.'
        );
        \assert(
            \is_array($description) === true && empty($description) === false,
            "Relationship `$name` for type `" . $this->getType() . '` should be a non-empty array.'
        );

        return true;
    }
1197150
public function setDescription($description)
    {
        if ($description !== null && strcmp($description, "") !== 0) {
            $this->description = (string) $description;
        } else {
            $this->description = null;
        }
    }
1316323
public static function require (string $permission): bool {
		if (empty($permission)) {
			return true;
		}

		return self::$user->hasPermission($permission);
	}
1101019
protected function applyDescriptionUpdated(
        AbstractDescriptionUpdated $descriptionUpdated
    ) {
        $document = $this->loadDocumentFromRepository($descriptionUpdated);

        $offerLd = $document->getBody();
        if (empty($offerLd->description)) {
            $offerLd->description = new \stdClass();
        }

        $mainLanguage = isset($offerLd->mainLanguage) ? $offerLd->mainLanguage : 'nl';
        $offerLd->description->{$mainLanguage} = $descriptionUpdated->getDescription()->toNative();

        return $document->withBody($offerLd);
    }
500502
public function update(string $domain, string $tag, string $description)
    {
        Assert::stringNotEmpty($domain);
        Assert::stringNotEmpty($tag);

        $params = [
            'description' => $description,
        ];

        $response = $this->httpPut(sprintf('/v3/%s/tags/%s', $domain, $tag), $params);

        return $this->hydrateResponse($response, UpdateResponse::class);
    }
751445
public function update () : bool
	{
        $dbObject 	= Database::getInstance();
		$sqlQuery 	= "UPDATE ".static::$tableName." SET ".$this->generateQueryForUPdate();
		$sqlQuery  .= " WHERE id = ". $dbObject->escapeValue($this->id);
		$result 	= $dbObject->query($sqlQuery);
    	return ($result) ? TRUE : FALSE;
	}
529702
public function has_update() {
		$info = $this->remote_get_version();
		if ( ! isset( $info->version ) || ! $info->version ) {
			return false;
		} else {
			return version_compare( $this->version, $info->version, '<' );
		}
	}
889567
function step( $description )
    {
        if ( is_string( $description ) )
        {
            foreach (  $this->StepTable as $step )
            {
                if ( $step['class'] == $description )
                {
                    return $step;
                }
            }
        }
        else if ( is_int( $description ) )
        {
            if ( isset( $this->StepTable[$description] ) )
            {
                return $this->StepTable[$description];
            }
        }
        $retValue = null;
        return $retValue;
    }