Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
  • Loading branch information
NaysKutzu committed Sep 16, 2024
1 parent 67dd9bb commit d0f838d
Show file tree
Hide file tree
Showing 95 changed files with 304 additions and 101 deletions.
17 changes: 17 additions & 0 deletions .github/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
(c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
(c) NaysKutzu <nayskutzu.xyz> - All rights reserved
(c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
You should have received a copy of the MIT License
along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down Expand Up @@ -70,6 +71,22 @@
],
],
'header_comment' => ['header' => $header],
'phpdoc_order' => true,
'phpdoc_summary' => true,
'phpdoc_to_comment' => false,
'phpdoc_no_empty_return' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_no_package' => true,
'phpdoc_separation' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'none',
],
'phpdoc_var_annotation_correct_order' => true,
'return_assignment' => true,
'single_line_throw' => false,
'single_line_comment_style' => false,
'random_api_migration' => true,
'ternary_to_null_coalescing' => true,
'yoda_style' => [
Expand Down
1 change: 1 addition & 0 deletions app/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Api/Apis/Admin/Logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Api/Apis/ApiBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Api/Apis/System/Logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
2 changes: 1 addition & 1 deletion app/Api/Apis/System/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand All @@ -16,7 +17,6 @@
use MythicalSystemsFramework\Api\Api;
use MythicalSystemsFramework\Api\Apis\ApiBuilder;


class Translation extends Api implements ApiBuilder
{
public string $route = '/system/translation';
Expand Down
1 change: 1 addition & 0 deletions app/Api/Apis/User/InfoAlreadyExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Api/Apis/User/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Api/Apis/User/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Backup/Backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Backup/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Backup/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
6 changes: 3 additions & 3 deletions app/Cli/Colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down Expand Up @@ -123,11 +124,10 @@ public static function NewLine(): string
public static function translateColorsCode(string $message): string
{
$pattern = '/&([0-9a-fklmnor])/i';
$message = preg_replace_callback($pattern, function ($matches) {

return preg_replace_callback($pattern, function ($matches) {
return self::getColorCode($matches[1]);
}, $message);

return $message;
}

private static function getColorCode(string $colorCode): string
Expand Down
3 changes: 1 addition & 2 deletions app/Cli/CommandBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand All @@ -20,8 +21,6 @@ interface CommandBuilder
*
* @param bool $isFrameworkCommand Is it a framework command?
* @param array $args the arguments passed to the command
*
* @return void it should return nothing as it is a void function
*/
public static function execute(bool $isFrameworkCommand, array $args): void;
}
1 change: 1 addition & 0 deletions app/Cli/Commands/Backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Down.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Rebuild.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Up.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Commands/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Cli/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/CloudFlare/CloudFlare.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
2 changes: 1 addition & 1 deletion app/CloudFlare/TurnStile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand All @@ -26,7 +27,6 @@ public static function isEnabled(): bool
if (setting::getSetting('cloudflare_turnstile', 'enabled') == 'true') {
return true;
}

return false;

} catch (\Exception $e) {
Expand Down
9 changes: 5 additions & 4 deletions app/Database/MySQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand All @@ -29,9 +30,9 @@ class MySQL
/**
* Connects to the database server using PDO.
*
* @return \PDO the PDO object representing the database connection
*
* @throws \Exception if the connection to the database fails
*
* @return \PDO the PDO object representing the database connection
*/
public function connectPDO(): \PDO
{
Expand Down Expand Up @@ -94,9 +95,9 @@ public static function closeConnection(): void
* @param string $password The password
* @param string $database The database name
*
* @return bool true if the connection is successful, false otherwise
*
* @throws \Exception If the connection to the database fails. *
*
* @return bool true if the connection is successful, false otherwise
*/
public function tryConnection(string $host, string|int $port, string $username, string $password, string $database): bool
{
Expand Down
1 change: 1 addition & 0 deletions app/Database/MySQLCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Encryption/Types.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Encryption/XChaCha20.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
1 change: 1 addition & 0 deletions app/Google/TwoFactorAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down
3 changes: 1 addition & 2 deletions app/Kernel/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
*
* You should have received a copy of the MIT License
* along with this program. If not, see <https://opensource.org/licenses/MIT>.
Expand Down Expand Up @@ -156,8 +157,6 @@ public static function display_info($input, $collapse = false): void
* @param string $error_full_message The full error message
* @param int $error_database_id The error database id
* @param string $error_file_path The error file path
*
* @return void IT will die
*/
public static function throw_error($renderer, $error_text, $error_full_message, $error_database_id, $error_file_path): void
{
Expand Down
Loading

0 comments on commit d0f838d

Please sign in to comment.