Skip to content

Commit

Permalink
modified: composer.json
Browse files Browse the repository at this point in the history
	modified:   src/Application.php
  • Loading branch information
juancristobalgd1 committed Dec 1, 2023
1 parent c654463 commit d5d0da0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
19 changes: 9 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@
"vlucas/phpdotenv": "^5.5",
"illuminate/database": "*",

"axm/http": "*",
"axm/views": "*",
"axm/exception": "*",
"axm/middlewares": "*",
"axm/session": "*",
"axm/console": "*",
"axm/helpers": "*",
"axm/fluent": "*"
"axm/http": "^1.0.18",
"axm/views": "^1.0.14",
"axm/middlewares": "^1.0.4",
"axm/session": "^1.0.5",
"axm/console": "^1.0.41",
"axm/helpers": "^1.0.6",
"axm/fluent": "^1.0.7"
},
"require-dev": {
"phpunit/phpunit": "^9.6"
Expand Down Expand Up @@ -64,7 +63,7 @@
},
"support": {
"forum": "http://forum.Axmphp.com/",
"source": "https://github.com/Axmphp/Axmv1",
"slack": "https://Axmchat.slack.com"
"source": "https://github.com/Axm-framework/framework",
"slack": "https://axm.slack.com"
}
}
10 changes: 4 additions & 6 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Axm;
use Locale;
use Axm\Container;
use Axm\Exception\AxmException;
use Exception;

/**
Expand Down Expand Up @@ -120,7 +119,6 @@ public function openRoutesUser(): void
*
* @param string $path The path to the configuration file.
* @param string $root An optional root directory for the path.
*
* @return mixed The result of the configuration file load operation.
*/
public function load(string $path, string $root = APP_PATH)
Expand Down Expand Up @@ -210,7 +208,7 @@ public function simpleKeyLogin(array $data): bool
return false;
} catch (\Throwable $th) {
// Handle errors and throw a more descriptive exception
throw new Exception("Error during login: " . $th->getMessage());
throw new Exception('Error during login: ' . $th->getMessage());
}
}

Expand All @@ -229,7 +227,7 @@ public function multipleKeyLogin(array $keys, array $values): bool

// Make sure the number of keys and values match
if (count($keys) !== count($values)) {
throw new \InvalidArgumentException("Number of keys and values must match.");
throw new \InvalidArgumentException('Number of keys and values must match.');
}

// Combine keys and values into an associative array
Expand Down Expand Up @@ -381,7 +379,7 @@ public function setTimeZone(string $timezone): void
*
* This method retrieves the user's preferred locale from the HTTP Accept-Language header.
* @return string The user's preferred locale or an empty string if not available.
* @throws AxmException If the "intl" extension is not enabled on the server.
* @throws Exception If the "intl" extension is not enabled on the server.
*/
public function getLocale()
{
Expand All @@ -390,7 +388,7 @@ public function getLocale()
}

if (!extension_loaded('intl')) {
throw new AxmException('The "intl" extension is not enabled on this server');
throw new Exception('The "intl" extension is not enabled on this server');
}

return Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
Expand Down

0 comments on commit d5d0da0

Please sign in to comment.