Skip to content

Commit

Permalink
CHanges for phpstan ignore on same line
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire committed Sep 24, 2024
1 parent c4b753f commit 4db5041
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions modules/apigee_edge_teams/src/TeamPermissionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ protected function getModuleNames(): array {
$modules = [];
foreach (array_keys($this->moduleHandler->getModuleList()) as $module) {
// @todo getName() is deprecated for Drupal 10.3 & is removed from drupal:12.0. Use \Drupal::service('extension.list.module')->getName($module) instead. https://www.drupal.org/node/3310017
// @phpstan-ignore-next-line
$modules[$module] = $this->moduleHandler->getName($module);
$modules[$module] = $this->moduleHandler->getName($module); // @phpstan-ignore argument.type
}
asort($modules);
return $modules;
Expand Down
3 changes: 1 addition & 2 deletions src/Entity/ListBuilder/AppListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ protected function buildWarningRow(AppInterface $app, array &$rows) {
$link = Link::fromTextAndUrl($this->t('<span class="ui-icon-triangle-1-e ui-icon"></span><span class="text">Show details</span>'), $url);
$build['warning-toggle'] = $link->toRenderable();
// @todo renderPlain() is deprecated for Drupal 10.3 & is removed from drupal:12.0. Use \Drupal\Core\Render\RendererInterface::renderInIsolation() instead. https://www.drupal.org/node/3407994
// @phpstan-ignore-next-line
$rows[$info_row_css_id]['data']['status']['data'] = $this->renderer->renderPlain($build);
$rows[$info_row_css_id]['data']['status']['data'] = $this->renderer->renderPlain($build); // @phpstan-ignore argument.type
$row['data']['info'] = [
'colspan' => count($this->buildHeader()),
];
Expand Down
3 changes: 1 addition & 2 deletions src/OauthTokenFileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ public function saveToken(array $data): void {
$this->checkRequirements();
// Write the obfuscated token data to a private file.
// @todo class constant EXISTS_REPLACE is deprecated for Drupal 10.3 & is removed from drupal:12.0. Use \Drupal\Core\File\FileExists::Replace instead. https://www.drupal.org/node/3426517
// @phpstan-ignore-next-line
$this->fileSystem->saveData(base64_encode(Json::encode($data)), $this->tokenFilePath, FileSystemInterface::EXISTS_REPLACE);
$this->fileSystem->saveData(base64_encode(Json::encode($data)), $this->tokenFilePath, FileSystemInterface::EXISTS_REPLACE); // @phpstan-ignore argument.type
}
catch (FileException $e) {
$this->logger->critical('Error saving OAuth token file.');
Expand Down
3 changes: 1 addition & 2 deletions src/Plugin/KeyProvider/PrivateFileKeyProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ public function setKeyValue(KeyInterface $key, $key_value) {
try {
// Save the token data.
// @todo class constant EXISTS_REPLACE is deprecated for Drupal 10.3 & is removed from drupal:12.0. Use \Drupal\Core\File\FileExists::Replace instead. https://www.drupal.org/node/3426517
// @phpstan-ignore-next-line
return $this->getFileSystem()->saveData($key_value, $file_uri, FileSystemInterface::EXISTS_REPLACE);
return $this->getFileSystem()->saveData($key_value, $file_uri, FileSystemInterface::EXISTS_REPLACE); // @phpstan-ignore argument.type
}
catch (FileException $e) {
return FALSE;
Expand Down
3 changes: 1 addition & 2 deletions tests/src/Kernel/OauthTokenFileStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ public function testStaticCaching() {
\Drupal::service('file_system')->saveData(
base64_encode(Json::encode($stored_token)),
// @todo class constant EXISTS_REPLACE is deprecated for Drupal 10.3 & is removed from drupal:12.0. Use \Drupal\Core\File\FileExists::Replace instead. https://www.drupal.org/node/3426517
// @phpstan-ignore-next-line
$this->tokenFileUri(), FileSystemInterface::EXISTS_REPLACE);
$this->tokenFileUri(), FileSystemInterface::EXISTS_REPLACE); // @phpstan-ignore argument.type

// Make sure the cached version is still returned.
$this->assertSame($access_token, $storage->getAccessToken());
Expand Down

0 comments on commit 4db5041

Please sign in to comment.