11<?php
2-
32declare (strict_types=1 );
43
54/**
1413
1514namespace CakeDC \Users \Controller \Component ;
1615
17- use Authentication \AuthenticationServiceInterface ;
1816use Authentication \Authenticator \ResultInterface ;
19- use Authentication \Identifier \IdentifierCollection ;
2017use Cake \Controller \Component ;
2118use Cake \Core \Configure ;
2219use Cake \Datasource \EntityInterface ;
@@ -214,7 +211,7 @@ protected function handlePasswordRehash($service, $user, \Cake\Http\ServerReques
214211 continue ;
215212 }
216213 /**
217- * @var IdentifierCollection $identifierCollection
214+ * @var \Authentication\Identifier\ IdentifierCollection $identifierCollection
218215 */
219216 $ identifierCollection = $ service ->authenticators ()->get ($ authenticatorName )->getIdentifier ();
220217 if (!$ identifierCollection ->has ($ identifierName )) {
@@ -230,6 +227,12 @@ protected function handlePasswordRehash($service, $user, \Cake\Http\ServerReques
230227 }
231228 }
232229
230+ /**
231+ * @param mixed $checker
232+ * @param \Cake\Http\ServerRequest $request
233+ * @param \Cake\Datasource\EntityInterface $user
234+ * @return void
235+ */
233236 protected function saveRehashedPassword ($ checker , ServerRequest $ request , EntityInterface $ user ): void
234237 {
235238 if (!$ checker || method_exists ($ checker , 'needsPasswordRehash ' ) && !$ checker ->needsPasswordRehash ()) {
@@ -241,6 +244,7 @@ protected function saveRehashedPassword($checker, ServerRequest $request, Entity
241244 $ user ->setDirty ('modified ' );
242245 if (!method_exists ($ this ->getController (), 'getUsersTable ' )) {
243246 Log::warning ("Error saving user id $ user ->id password after rehashing: getUsersTable method not found " );
247+
244248 return ;
245249 }
246250 if (!$ this ->getController ()->getUsersTable ()->save ($ user )) {
0 commit comments