@@ -181,6 +181,8 @@ class UsersController extends AppController
181181
182182 // Always show success to prevent email enumeration
183183 $this->Flash->success('If that email exists, a reset link has been sent.');
184+
185+ return $this->redirect(['action' => 'login']);
184186 }
185187 }
186188}
@@ -258,7 +260,7 @@ class PaymentService
258260// In src/Controller/OrdersController.php
259261class OrdersController extends AppController
260262{
261- public function checkout(PaymentService $payments)
263+ public function checkout(PaymentService $payments): void
262264 {
263265 $order = $this->Orders->get($this->request->getQuery('order_id'));
264266
@@ -300,7 +302,7 @@ namespace App\Service;
300302
301303interface StorageServiceInterface
302304{
303- public function put(string $path, $contents): bool;
305+ public function put(string $path, mixed $contents): bool;
304306 public function get(string $path): ?string;
305307 public function delete(string $path): bool;
306308 public function url(string $path): string;
@@ -312,7 +314,7 @@ class LocalStorageService implements StorageServiceInterface
312314 {
313315 }
314316
315- public function put(string $path, $contents): bool
317+ public function put(string $path, mixed $contents): bool
316318 {
317319 // Normalize path to prevent directory traversal
318320 $path = str_replace(['..', '\\'], ['', '/'], $path);
@@ -364,6 +366,8 @@ class DocumentsController extends AppController
364366
365367 $this->Documents->saveOrFail($document);
366368 $this->Flash->success('Document uploaded successfully');
369+
370+ return $this->redirect(['action' => 'index']);
367371 }
368372 }
369373 }
@@ -393,7 +397,7 @@ public function services(ContainerInterface $container): void
393397class UsersController extends AppController
394398{
395399 // The $users service will be created via the service container.
396- public function ssoCallback(UsersService $users)
400+ public function ssoCallback(UsersService $users): void
397401 {
398402 if ($this->request->is('post')) {
399403 // Use the UsersService to create/get the user from a
@@ -467,7 +471,7 @@ class SearchComponent extends Component
467471 parent::__construct($registry, $config);
468472 }
469473
470- public function something()
474+ public function something(): void
471475 {
472476 $valid = $this->users->check('all');
473477 }
@@ -669,7 +673,7 @@ use Cake\Core\ServiceProvider;
669673
670674class BillingServiceProvider extends ServiceProvider
671675{
672- protected $provides = [
676+ protected array $provides = [
673677 StripeService::class,
674678 'configKey',
675679 ];
@@ -713,12 +717,12 @@ use Cake\Core\ServiceProvider;
713717
714718class BillingServiceProvider extends ServiceProvider
715719{
716- protected $provides = [
720+ protected array $provides = [
717721 StripeService::class,
718722 'configKey',
719723 ];
720724
721- public function bootstrap($container)
725+ public function bootstrap(ContainerInterface $container): void
722726 {
723727 $container->addServiceProvider(new InvoicingServiceProvider());
724728 }
0 commit comments