refactor: add declare(strict_types=1) to all PHP files #5

Open
opened 2026-02-20 02:34:52 +00:00 by Clotho · 0 comments
Member

Issue

20+ PHP files are missing declare(strict_types=1); declaration, violating project conventions.

Files Affected

Form Components (7 files):

  • src/Forms/View/Components/Button.php
  • src/Forms/View/Components/FormGroup.php
  • src/Forms/View/Components/Select.php
  • src/Forms/View/Components/Input.php
  • src/Forms/View/Components/Checkbox.php
  • src/Forms/View/Components/Toggle.php
  • src/Forms/View/Components/Textarea.php

Modal Components (13+ files):

  • src/Website/Hub/View/Modal/Admin/PlatformUser.php
  • src/Website/Hub/View/Modal/Admin/Console.php
  • src/Website/Hub/View/Modal/Admin/AIServices.php
  • src/Website/Hub/View/Modal/Admin/ContentEditor.php
  • src/Website/Hub/View/Modal/Admin/UsageDashboard.php
  • src/Website/Hub/View/Modal/Admin/Profile.php
  • src/Website/Hub/View/Modal/Admin/BoostPurchase.php
  • src/Website/Hub/View/Modal/Admin/Analytics.php
  • And others in src/Website/Hub/View/Modal/Admin/

Migrations:

  • src/Mod/Hub/Migrations/2026_01_11_000001_create_honeypot_hits_table.php
  • Other migration files

Required Change

Add as first line after opening PHP tag:

declare(strict_types=1);

Convention Reference

From CLAUDE.md:

Strict types - declare(strict_types=1); in every PHP file

Priority

Critical - Affects type safety across entire codebase.

Discovered by

Automatic codebase scan (issue #3)

## Issue 20+ PHP files are missing `declare(strict_types=1);` declaration, violating project conventions. ## Files Affected **Form Components (7 files):** - `src/Forms/View/Components/Button.php` - `src/Forms/View/Components/FormGroup.php` - `src/Forms/View/Components/Select.php` - `src/Forms/View/Components/Input.php` - `src/Forms/View/Components/Checkbox.php` - `src/Forms/View/Components/Toggle.php` - `src/Forms/View/Components/Textarea.php` **Modal Components (13+ files):** - `src/Website/Hub/View/Modal/Admin/PlatformUser.php` - `src/Website/Hub/View/Modal/Admin/Console.php` - `src/Website/Hub/View/Modal/Admin/AIServices.php` - `src/Website/Hub/View/Modal/Admin/ContentEditor.php` - `src/Website/Hub/View/Modal/Admin/UsageDashboard.php` - `src/Website/Hub/View/Modal/Admin/Profile.php` - `src/Website/Hub/View/Modal/Admin/BoostPurchase.php` - `src/Website/Hub/View/Modal/Admin/Analytics.php` - And others in `src/Website/Hub/View/Modal/Admin/` **Migrations:** - `src/Mod/Hub/Migrations/2026_01_11_000001_create_honeypot_hits_table.php` - Other migration files ## Required Change Add as first line after opening PHP tag: ```php declare(strict_types=1); ``` ## Convention Reference From CLAUDE.md: > **Strict types** - `declare(strict_types=1);` in every PHP file ## Priority **Critical** - Affects type safety across entire codebase. ## Discovered by Automatic codebase scan (issue #3)
Clotho added the
discovery
label 2026-02-20 02:34:52 +00:00
Charon added
PHP
refactor
P2
and removed
discovery
labels 2026-02-20 12:16:56 +00:00
Clotho was assigned by Charon 2026-02-20 12:20:55 +00:00
Charon added the
agent-ready
label 2026-02-21 01:30:25 +00:00
Sign in to join this conversation.
No description provided.