Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -12,9 +12,6 @@ final class Time
|
|||
* for named timezones in MySQL.
|
||||
*
|
||||
* Returns the timezone as a string like +08:00 or -05:00 depending on the app timezone.
|
||||
*
|
||||
* @param string $timezone
|
||||
* @return string
|
||||
*/
|
||||
public static function getMySQLTimezoneOffset(string $timezone): string
|
||||
{
|
||||
|
|
|
@ -13,9 +13,6 @@ class Utilities
|
|||
/**
|
||||
* Generates a random string and injects special characters into it, in addition to
|
||||
* the randomness of the alpha-numeric default response.
|
||||
*
|
||||
* @param int $length
|
||||
* @return string
|
||||
*/
|
||||
public static function randomStringWithSpecialCharacters(int $length = 16): string
|
||||
{
|
||||
|
@ -23,7 +20,7 @@ class Utilities
|
|||
// Given a random string of characters, randomly loop through the characters and replace some
|
||||
// with special characters to avoid issues with MySQL password requirements on some servers.
|
||||
try {
|
||||
for ($i = 0; $i < random_int(2, 6); $i++) {
|
||||
for ($i = 0; $i < random_int(2, 6); ++$i) {
|
||||
$character = ['!', '@', '=', '.', '+', '^'][random_int(0, 5)];
|
||||
|
||||
$string = substr_replace($string, $character, random_int(0, $length - 1), 1);
|
||||
|
@ -39,11 +36,6 @@ class Utilities
|
|||
/**
|
||||
* Converts schedule cron data into a carbon object.
|
||||
*
|
||||
* @param string $minute
|
||||
* @param string $hour
|
||||
* @param string $dayOfMonth
|
||||
* @param string $month
|
||||
* @param string $dayOfWeek
|
||||
* @return \Carbon\Carbon
|
||||
*/
|
||||
public static function getScheduleNextRunDate(string $minute, string $hour, string $dayOfMonth, string $month, string $dayOfWeek)
|
||||
|
@ -54,8 +46,8 @@ class Utilities
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function checked(string $name, $default)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue