Fix bin/publish: use correct .env path for rspade_system Fix bin/publish script: prevent grep exit code 1 from terminating script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
118 lines
3.3 KiB
PHP
Executable File
118 lines
3.3 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App;
|
|
|
|
/**
|
|
* Application-wide constants
|
|
*
|
|
* This file contains static resources and constants that are used throughout the application.
|
|
*
|
|
* Purpose:
|
|
* - Centralizes commonly used resources like state lists, MIME types, etc.
|
|
* - Provides a single source of truth for these constants
|
|
* - Makes maintenance easier - edit once, use everywhere
|
|
* - Improves consistency across the application
|
|
*
|
|
* Usage:
|
|
* - Include this file where constants are needed using: use App\Constants;
|
|
* - Access constants via the class constants (e.g., Constants::STATES)
|
|
*
|
|
* Guidelines:
|
|
* - Keep this file as a catchall for non-application-specific constants
|
|
* - Group related constants in meaningful arrays/classes
|
|
* - Add clear comments for each constant group
|
|
* - Use UPPERCASE for constant names
|
|
* - For long lists, maintain alphabetical order where appropriate
|
|
*
|
|
* Examples of appropriate constants:
|
|
* - US States and territories
|
|
* - Country codes
|
|
* - MIME types
|
|
* - Common date/time formats
|
|
* - Standard measurement units
|
|
* - Common regular expressions (email, phone, etc.)
|
|
*/
|
|
class Constants
|
|
{
|
|
// User ID for CLI operations
|
|
const CLI_USER = 'cli';
|
|
|
|
// System user email
|
|
const SYSTEM_USER_EMAIL = 'system@rspade.local';
|
|
|
|
// System user access level
|
|
const SYSTEM_USER_ACCESS_LEVEL = 90;
|
|
/**
|
|
* US States and territories with abbreviations
|
|
* Array of state abbreviations to full state names, in alphabetical order
|
|
*/
|
|
public const STATES = [
|
|
'AL' => 'Alabama',
|
|
'AK' => 'Alaska',
|
|
'AZ' => 'Arizona',
|
|
'AR' => 'Arkansas',
|
|
'CA' => 'California',
|
|
'CO' => 'Colorado',
|
|
'CT' => 'Connecticut',
|
|
'DE' => 'Delaware',
|
|
'DC' => 'District of Columbia',
|
|
'FL' => 'Florida',
|
|
'GA' => 'Georgia',
|
|
'HI' => 'Hawaii',
|
|
'ID' => 'Idaho',
|
|
'IL' => 'Illinois',
|
|
'IN' => 'Indiana',
|
|
'IA' => 'Iowa',
|
|
'KS' => 'Kansas',
|
|
'KY' => 'Kentucky',
|
|
'LA' => 'Louisiana',
|
|
'ME' => 'Maine',
|
|
'MD' => 'Maryland',
|
|
'MA' => 'Massachusetts',
|
|
'MI' => 'Michigan',
|
|
'MN' => 'Minnesota',
|
|
'MS' => 'Mississippi',
|
|
'MO' => 'Missouri',
|
|
'MT' => 'Montana',
|
|
'NE' => 'Nebraska',
|
|
'NV' => 'Nevada',
|
|
'NH' => 'New Hampshire',
|
|
'NJ' => 'New Jersey',
|
|
'NM' => 'New Mexico',
|
|
'NY' => 'New York',
|
|
'NC' => 'North Carolina',
|
|
'ND' => 'North Dakota',
|
|
'OH' => 'Ohio',
|
|
'OK' => 'Oklahoma',
|
|
'OR' => 'Oregon',
|
|
'PA' => 'Pennsylvania',
|
|
'RI' => 'Rhode Island',
|
|
'SC' => 'South Carolina',
|
|
'SD' => 'South Dakota',
|
|
'TN' => 'Tennessee',
|
|
'TX' => 'Texas',
|
|
'UT' => 'Utah',
|
|
'VT' => 'Vermont',
|
|
'VA' => 'Virginia',
|
|
'WA' => 'Washington',
|
|
'WV' => 'West Virginia',
|
|
'WI' => 'Wisconsin',
|
|
'WY' => 'Wyoming'
|
|
];
|
|
|
|
/**
|
|
* Common date formats
|
|
*/
|
|
public const DATE_FORMATS = [
|
|
'SHORT' => 'm/d/Y',
|
|
'MEDIUM' => 'M j, Y',
|
|
'LONG' => 'F j, Y',
|
|
'TIME' => 'g:i A',
|
|
'DATETIME' => 'M j, Y g:i A'
|
|
];
|
|
|
|
// Additional constants can be added here as needed:
|
|
// const MIME_TYPES = [...];
|
|
// const COUNTRY_CODES = [...];
|
|
// etc.
|
|
} |