Skip to content

Commit 408ac3d

Browse files
committed
bugfix with function name
1 parent 8e272d1 commit 408ac3d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"homepage": "https://github.com/omaralalwi/laravel-api-helpers",
4242
"license": "MIT",
4343
"type": "library",
44-
"version": "1.0.2",
44+
"version": "1.0.3",
4545
"authors": [
4646
{
4747
"name": "omar alalwi",

src/helpers.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ function get_api_v()
3535
* Compares the version extracted from the request (via path or header)
3636
* to the provided version number.
3737
*
38-
* **Note:** This function calls `get_api_version()`, which should be updated to `get_api_v()` if intended.
38+
* **Note:** This function calls `get_api_v()`, which should be updated to `get_api_v()` if intended.
3939
*
4040
* @param int $version The version number to check against.
4141
* @return bool True if the current API version matches the specified version; otherwise, false.
4242
*/
4343
function is_api_v($version)
4444
{
45-
return get_api_version() === (int) $version;
45+
return get_api_v() === (int) $version;
4646
}
4747
}
4848

@@ -52,14 +52,14 @@ function is_api_v($version)
5252
*
5353
* Compares the API version from the request with the provided minimum version.
5454
*
55-
* **Note:** This function calls `get_api_version()`, which should be updated to `get_api_v()` if intended.
55+
* **Note:** This function calls `get_api_v()`, which should be updated to `get_api_v()` if intended.
5656
*
5757
* @param int $version The minimum version to check against.
5858
* @return bool True if the current API version is greater than or equal to the specified version; otherwise, false.
5959
*/
6060
function api_v_at_least($version)
6161
{
62-
$currentVersion = get_api_version();
62+
$currentVersion = get_api_v();
6363

6464
if ($currentVersion === null) {
6565
return false;

0 commit comments

Comments
 (0)