Skip to content

Commit

Permalink
Add extension scanner ignore line
Browse files Browse the repository at this point in the history
  • Loading branch information
garbast committed May 22, 2024
1 parent 38d4f3d commit 7dcb400
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Controller/FeuserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ protected function getValidatorByConfiguration(

/** @var ValidatorInterface $validator */
$validator = GeneralUtility::makeInstance($validatorObjectName);
// @extensionScannerIgnoreLine
$validator->setOptions($validateAnnotation->options);

if ($validator instanceof SetRequestInterface) {
Expand Down Expand Up @@ -466,6 +467,7 @@ protected function autoLogin(FrontendUserInterface $user, int $redirectPageId):

// if redirect is empty set it to current page
if ($redirectPageId == 0) {
// @extensionScannerIgnoreLine
$redirectPageId = $this->getTypoScriptFrontendController()->id;
}

Expand Down
1 change: 1 addition & 0 deletions Classes/Services/AutoLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function getUser(): ?array
$registry->remove('sf-register', $hmac);

$dbUserSetup = [...$this->db_user, 'username_column' => 'uid', 'enable_clause' => ''];
// @extensionScannerIgnoreLine
$user = $this->fetchUserRecord($userId, '', $dbUserSetup);

if (!empty($user)) {
Expand Down
2 changes: 2 additions & 0 deletions Classes/Services/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ protected function getUploadedFileInfo(): ?UploadedFile
if ($fileData->getClientFilename() !== $filename) {
$fileData = new UploadedFile(
$fileData->getStream(),
// @extensionScannerIgnoreLine
$fileData->getSize(),
$fileData->getError(),
$filename,
Expand All @@ -218,6 +219,7 @@ public function isValid(): bool
if ($fileData instanceof UploadedFile) {
$fileExtension = pathinfo($fileData->getClientFilename(), PATHINFO_EXTENSION);

// @extensionScannerIgnoreLine
$result = $this->isAllowedFilesize($fileData->getSize() ?? 0);
$result = $result && $this->isAllowedFileExtension($fileExtension);
} else {
Expand Down
1 change: 1 addition & 0 deletions Classes/ViewHelpers/Form/AbstractSelectViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public function render(): string
$name .= '[]';
}
$this->tag->addAttribute('name', $name);
// @extensionScannerIgnoreLine
$options = $this->getOptions();

$viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
Expand Down
1 change: 1 addition & 0 deletions Tests/Functional/AbstractTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public function initializeTypoScriptFrontendController(): void
$controller->initializePageRenderer($request);
$controller->initializeLanguageService($request);
$controller->set_no_cache('testing');
// @extensionScannerIgnoreLine
$controller->id = $pageInformation->getId();
$controller->page = $pageInformation->getPageRecord();
$controller->contentPid = $pageInformation->getContentFromPid();
Expand Down
1 change: 1 addition & 0 deletions Tests/Unit/Validation/Validator/UniqueValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function isValidReturnsFalseIfCountOfValueInFieldReturnsZeroForLocalAndHi
->setConstructorArgs([$repositoryMock])
->onlyMethods(['translateErrorMessage'])
->getMock();
// @extensionScannerIgnoreLine
$subject->setOptions(['global' => 1]);
$subject->setPropertyName($fieldName);

Expand Down

0 comments on commit 7dcb400

Please sign in to comment.