Audit items #17 and #21. #17 — DayOfWeekSignal and StickinessSignal each had their own isSqlite ternary picking between SQLite (strftime/julianday) and MySQL (DAYOFWEEK/DATEDIFF) date expressions. Centralised in App\Services\Prediction\Signals\DbDialect. #21 — ProfileValidationRules was a trait with one consumer (CreateNewUser); inlined the rules into the action and deleted the trait. Also dropped PasswordValidationRules::currentPasswordRules() which was unused. PasswordValidationRules trait stays (two consumers). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
417 B
PHP
20 lines
417 B
PHP
<?php
|
|
|
|
namespace App\Concerns;
|
|
|
|
use Illuminate\Contracts\Validation\Rule;
|
|
use Illuminate\Validation\Rules\Password;
|
|
|
|
trait PasswordValidationRules
|
|
{
|
|
/**
|
|
* Get the validation rules used to validate passwords.
|
|
*
|
|
* @return array<int, Rule|array<mixed>|string>
|
|
*/
|
|
protected function passwordRules(): array
|
|
{
|
|
return ['required', 'string', Password::default(), 'confirmed'];
|
|
}
|
|
}
|