Skip to content

Commit

Permalink
Enable prettier for php and reformat the entire application directory
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Nov 29, 2023
1 parent df1f111 commit c8a9e2c
Show file tree
Hide file tree
Showing 679 changed files with 16,004 additions and 14,523 deletions.
5 changes: 3 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.idea
application
.github
.run
build
docker
docs
node_modules
storage
system
tests
vendor
5 changes: 4 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"bracketSpacing": false,
"bracketSameLine": false,
"quoteProps": "preserve",
"trailingComma": "none"
"trailingComma": "none",
"trailingCommaPHP": false,
"phpVersion": "8.0",
"plugins": ["@prettier/plugin-php"]
}
2 changes: 1 addition & 1 deletion application/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

$config['version'] = '1.5.0-dev.4'; // This must be changed manually.

$config['url'] = Config::BASE_URL;
$config['url'] = Config::BASE_URL;

$config['debug'] = Config::DEBUG_MODE;

Expand Down
12 changes: 1 addition & 11 deletions application/config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

$autoload['packages'] = [];


/*
| -------------------------------------------------------------------
| Auto-load Libraries
Expand All @@ -55,7 +54,6 @@

$autoload['libraries'] = ['database', 'session'];


/*
| -------------------------------------------------------------------
| Auto-load Helper Files
Expand Down Expand Up @@ -89,7 +87,6 @@
'validation'
];


/*
| -------------------------------------------------------------------
| Auto-load Config files
Expand All @@ -103,12 +100,7 @@
|
*/

$autoload['config'] = [
'app',
'google',
'email'
];

$autoload['config'] = ['app', 'google', 'email'];

/*
| -------------------------------------------------------------------
Expand All @@ -125,7 +117,6 @@

$autoload['language'] = [];


/*
| -------------------------------------------------------------------
| Auto-load Models
Expand All @@ -138,6 +129,5 @@

$autoload['model'] = [];


/* End of file autoload.php */
/* Location: ./application/config/autoload.php */
47 changes: 18 additions & 29 deletions application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
*/

$protocol =
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|| (isset($_SERVER['SERVER_PORT']) && (int)$_SERVER['SERVER_PORT'] === 443)
|| (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
? 'https://' : 'http://';
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ||
(isset($_SERVER['SERVER_PORT']) && (int) $_SERVER['SERVER_PORT'] === 443) ||
(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
? 'https://'
: 'http://';

$domain = $_SERVER['HTTP_HOST'] ?? 'localhost';

$request_uri = dirname($_SERVER['SCRIPT_NAME']);

if ($request_uri === '.')
{
if ($request_uri === '.') {
$request_uri = '';
}

Expand Down Expand Up @@ -117,7 +117,7 @@
'sk' => 'slovak',
'es' => 'spanish',
'sv' => 'swedish',
'tr' => 'turkish',
'tr' => 'turkish'
];

$config['language_codes'] = $languages;
Expand Down Expand Up @@ -195,8 +195,7 @@
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
$config['enable_hooks'] = TRUE;

$config['enable_hooks'] = true;

/*
|--------------------------------------------------------------------------
Expand All @@ -212,7 +211,6 @@
*/
$config['subclass_prefix'] = 'EA_';


/*
|--------------------------------------------------------------------------
| Allowed URL Characters
Expand All @@ -232,7 +230,6 @@
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';


/*
|--------------------------------------------------------------------------
| Enable Query Strings
Expand All @@ -258,8 +255,8 @@
| use segment based URLs.
|
*/
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
$config['allow_get_array'] = true;
$config['enable_query_strings'] = false;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
Expand Down Expand Up @@ -352,9 +349,9 @@
$config['sess_cookie_name'] = 'ea_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = __DIR__ . '/../../storage/sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_ip'] = false;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
$config['sess_regenerate_destroy'] = false;

/*
|--------------------------------------------------------------------------
Expand All @@ -370,7 +367,7 @@
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = strpos($config['base_url'], 'https') !== FALSE;
$config['cookie_secure'] = strpos($config['base_url'], 'https') !== false;

/*
|--------------------------------------------------------------------------
Expand All @@ -384,16 +381,11 @@
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
*/
$config['csrf_protection'] = TRUE;
$config['csrf_protection'] = true;
$config['csrf_token_name'] = 'csrf_token';
$config['csrf_cookie_name'] = 'csrf_cookie';
$config['csrf_expire'] = 7200;
$config['csrf_exclude_uris'] = [
'api/v1/.*',
'booking/.*',
'booking_cancellation/.*',
'booking_confirmation/.*'
];
$config['csrf_exclude_uris'] = ['api/v1/.*', 'booking/.*', 'booking_cancellation/.*', 'booking_confirmation/.*'];

/*
|--------------------------------------------------------------------------
Expand All @@ -412,7 +404,7 @@
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = FALSE;
$config['compress_output'] = false;

/*
|--------------------------------------------------------------------------
Expand All @@ -427,7 +419,6 @@
*/
$config['time_reference'] = 'local';


/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
Expand All @@ -438,8 +429,7 @@
| in your view files. Options are TRUE or FALSE (boolean)
|
*/
$config['rewrite_short_tags'] = FALSE;

$config['rewrite_short_tags'] = false;

/*
|--------------------------------------------------------------------------
Expand All @@ -463,8 +453,7 @@
| will control the number of requests a client can sent to the app.
|
*/
$config['rate_limiting'] = TRUE;

$config['rate_limiting'] = true;

/* End of file config.php */
/* Location: ./application/config/config.php */
1 change: 0 additions & 1 deletion application/config/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
const FOPEN_WRITE_CREATE_STRICT = 'xb';
const FOPEN_READ_WRITE_CREATE_STRICT = 'x+b';


/*
|--------------------------------------------------------------------------
| Application Data
Expand Down
13 changes: 6 additions & 7 deletions application/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,23 @@
*/

$active_group = 'default';
$query_builder = TRUE;
$query_builder = true;

$db['default']['hostname'] = Config::DB_HOST;
$db['default']['username'] = Config::DB_USERNAME;
$db['default']['password'] = Config::DB_PASSWORD;
$db['default']['database'] = Config::DB_NAME;
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = 'ea_';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['pconnect'] = true;
$db['default']['db_debug'] = true;
$db['default']['cache_on'] = false;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_unicode_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

$db['default']['autoinit'] = true;
$db['default']['stricton'] = false;

/* End of file database.php */
/* Location: ./application/config/database.php */
1 change: 0 additions & 1 deletion application/config/google.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
$config['google_client_id'] = Config::GOOGLE_CLIENT_ID;

$config['google_client_secret'] = Config::GOOGLE_CLIENT_SECRET;

4 changes: 1 addition & 3 deletions application/config/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| whenever you intend to do a schema migration.
|
*/
$config['migration_enabled'] = TRUE;
$config['migration_enabled'] = true;

/*
|--------------------------------------------------------------------------
Expand All @@ -23,7 +23,6 @@
*/
$config['migration_version'] = 0;


/*
|--------------------------------------------------------------------------
| Migrations Path
Expand All @@ -36,6 +35,5 @@
*/
$config['migration_path'] = APPPATH . 'migrations/';


/* End of file migration.php */
/* Location: ./application/config/migration.php */
Loading

0 comments on commit c8a9e2c

Please sign in to comment.