WIP - phpstan and phpcs - tests failing currently

This commit is contained in:
2026-01-24 01:20:17 -08:00
parent 31650e55c2
commit 37b7bca3be
17 changed files with 888 additions and 822 deletions

View File

@@ -3,59 +3,59 @@ declare(strict_types=1);
use Migrations\AbstractMigration;
class CreateContactUsFormSubmissions extends AbstractMigration
{
/**
class CreateContactUsFormSubmissions extends AbstractMigration {
/**
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
* @return void
*/
public function change(): void
{
$table = $this->table('contact_us_form_submissions', ['id' => false, 'primary_key' => ['id']]);
public function change(): void {
$table = $this->table('contact_us_form_submissions', ['id' => false, 'primary_key' => ['id']]);
$table->addColumn('id', 'uuid', [
'default' => null,
'null' => false,
]);
$table->addColumn('submitted_at', 'datetime', [
'default' => null,
'null' => false,
]);
$table->addColumn('client_ip', 'string', [
'default' => null,
'limit' => 45,
'null' => true,
]);
$table->addColumn('name', 'string', [
'default' => null,
'limit' => 255,
'null' => false,
]);
$table->addColumn('email', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
]);
$table->addColumn('subject', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
]);
$table->addColumn('message', 'text', [
'default' => null,
'null' => false,
]);
$table->addColumn('confirm_email_sent', 'datetime', [
'default' => null,
'null' => true,
]);
$table->addColumn('backend_email_sent', 'datetime', [
'default' => null,
'null' => true,
]);
$table->create();
}
$table->addColumn('id', 'uuid', [
'default' => null,
'null' => false,
]);
$table->addColumn('submitted_at', 'datetime', [
'default' => null,
'null' => false,
]);
$table->addColumn('client_ip', 'string', [
'default' => null,
'limit' => 45,
'null' => true,
]);
$table->addColumn('name', 'string', [
'default' => null,
'limit' => 255,
'null' => false,
]);
$table->addColumn('email', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
]);
$table->addColumn('subject', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
]);
$table->addColumn('message', 'text', [
'default' => null,
'null' => false,
]);
$table->addColumn('confirm_email_sent', 'datetime', [
'default' => null,
'null' => true,
]);
$table->addColumn('backend_email_sent', 'datetime', [
'default' => null,
'null' => true,
]);
$table->create();
}
}

View File

@@ -3,28 +3,28 @@
return [
'ContactUs' => [
'fields' => [
'subject' => true,
'email' => true,
'captcha' => true,
],
'clientIpHeader' => '',
'email' => [
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
'confirmation' => true, // true or false
'backend' => [ // array with enabled and the to/cc/bcc/ fields as strings or arrays
'enabled' => true,
'to' => 'bshipley@hipowered.dev',
'cc' => '', // email string or array of emails
'bcc' => '', // email string or array of emails
],
],
'addIdToRedirect' => true,
'redirectUrl' => [
'prefix' => 'Admin',
'plugin' => 'CakeContactUs',
'controller' => 'ContactUsFormSubmissions',
'action' => 'view',
],
'fields' => [
'subject' => true,
'email' => true,
'captcha' => true,
],
'clientIpHeader' => '',
'email' => [
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
'confirmation' => true, // true or false
'backend' => [ // array with enabled and the to/cc/bcc/ fields as strings or arrays
'enabled' => true,
'to' => 'bshipley@hipowered.dev',
'cc' => '', // email string or array of emails
'bcc' => '', // email string or array of emails
],
],
'addIdToRedirect' => true,
'redirectUrl' => [
'prefix' => 'Admin',
'plugin' => 'CakeContactUs',
'controller' => 'ContactUsFormSubmissions',
'action' => 'view',
],
],
];