reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
-31
View File
@@ -1,31 +0,0 @@
<?php
namespace App\Services;
class PhoneFormatterService
{
/**
* Normalize a phone number by stripping non-digits and formatting US numbers.
*/
public function formatPhoneNumber(string $phone): string
{
$digits = preg_replace('/\D+/', '', $phone);
if ($digits === null || $digits === '') {
return '';
}
if (strlen($digits) === 10) {
return sprintf('(%s) %s-%s', substr($digits, 0, 3), substr($digits, 3, 3), substr($digits, 6));
}
return $digits;
}
/**
* Determine if a phone string contains any digits.
*/
public function hasDigits(string $phone): bool
{
return preg_match('/\d/', $phone) === 1;
}
}