From 485bbc2774b25184d1c3c3cdfa18cdcde290a99c Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:09:11 +1200 Subject: [PATCH] MNT Ignore phpstan errors we can't fix. (#11326) --- src/Forms/HTMLEditor/TinyMCEConfig.php | 1 + src/ORM/DataObject.php | 1 + src/Security/PasswordValidator.php | 1 + 3 files changed, 3 insertions(+) diff --git a/src/Forms/HTMLEditor/TinyMCEConfig.php b/src/Forms/HTMLEditor/TinyMCEConfig.php index 26f408ff8..23eab0c44 100644 --- a/src/Forms/HTMLEditor/TinyMCEConfig.php +++ b/src/Forms/HTMLEditor/TinyMCEConfig.php @@ -731,6 +731,7 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider } if (isset($preset['i18n'])) { + /** @phpstan-ignore translation.key (we need the key to be dynamic here) */ $preset['text'] = _t( $preset['i18n'], isset($preset['text']) ? $preset['text'] : '' diff --git a/src/ORM/DataObject.php b/src/ORM/DataObject.php index e57fae5aa..b9cb0b57b 100644 --- a/src/ORM/DataObject.php +++ b/src/ORM/DataObject.php @@ -3891,6 +3891,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity } foreach ($types as $type => $attrs) { foreach ($attrs as $name => $spec) { + /** @phpstan-ignore translation.key (we need the key to be dynamic here) */ $autoLabels[$name] = _t( "{$ancestorClass}.{$type}_{$name}", FormField::name_to_label($name) diff --git a/src/Security/PasswordValidator.php b/src/Security/PasswordValidator.php index 179711877..62288201d 100644 --- a/src/Security/PasswordValidator.php +++ b/src/Security/PasswordValidator.php @@ -203,6 +203,7 @@ class PasswordValidator if (preg_match($tests[$name] ?? '', $password ?? '')) { continue; } + /** @phpstan-ignore translation.key (we need the key to be dynamic here) */ $missedTests[] = _t( __CLASS__ . '.STRENGTHTEST' . strtoupper($name ?? ''), $name,