From 7ba5f41f3be1fd707e0c7be706c56d9cb243d393 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 22 May 2024 10:44:04 +1200 Subject: [PATCH] DOC Update extension hook examples to be protected --- docs/en/05_datastores.md | 2 +- docs/en/08_backup-codes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/05_datastores.md b/docs/en/05_datastores.md index cf2b4ec..d35194d 100644 --- a/docs/en/05_datastores.md +++ b/docs/en/05_datastores.md @@ -37,7 +37,7 @@ use SilverStripe\MFA\Store\StoreInterface; // Apply extension to SilverStripe\MFA\Authenticator\LoginHandler class MyLoginHandlerExtension extends Extension { - public function onBeforeSaveRequestToStore(HTTPRequest $request, StoreInterface $store): void + protected function onBeforeSaveRequestToStore(HTTPRequest $request, StoreInterface $store): void { $request->offsetUnset('MySecretField'); } diff --git a/docs/en/08_backup-codes.md b/docs/en/08_backup-codes.md index e39c5de..5eedc7a 100644 --- a/docs/en/08_backup-codes.md +++ b/docs/en/08_backup-codes.md @@ -81,7 +81,7 @@ class BackupCodeGeneratorExtension extends Extension /** * Add some special characters into the character set for generating backup codes */ - public function updateCharacterSet(&$characterSet) + protected function updateCharacterSet(&$characterSet) { $characterSet = array_merge($characterSet, ['!', '@', '#', '$', '%', '^']); }