Skip to content

Commit

Permalink
chore: add method annotations for facades
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Jan 1, 2025
1 parent da592c0 commit de2b6b4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 75 deletions.
75 changes: 0 additions & 75 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ parameters:
count: 1
path: src/Classes/OrderManager.php

-
message: "#^Call to an undefined static method Igniter\\\\Flame\\\\Geolite\\\\Facades\\\\Geocoder\\:\\:geocode\\(\\)\\.$#"
count: 1
path: src/Classes/OrderManager.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:customer\\(\\)\\.$#"
count: 1
Expand All @@ -310,31 +305,11 @@ parameters:
count: 3
path: src/Contracts/Buyable.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:content\\(\\)\\.$#"
count: 1
path: src/Extension.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:destroy\\(\\)\\.$#"
count: 1
path: src/Extension.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:restore\\(\\)\\.$#"
count: 1
path: src/Extension.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Models\\\\CartSettings\\:\\:get\\(\\)\\.$#"
count: 4
path: src/Extension.php

-
message: "#^Call to an undefined static method Igniter\\\\Flame\\\\Support\\\\Facades\\\\Igniter\\:\\:runningInAdmin\\(\\)\\.$#"
count: 1
path: src/Extension.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:getId\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -400,41 +375,11 @@ parameters:
count: 1
path: src/Http/Controllers/Categories.php

-
message: "#^Call to an undefined static method Igniter\\\\Admin\\\\Facades\\\\AdminMenu\\:\\:setContext\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Categories.php

-
message: "#^Call to an undefined static method Igniter\\\\Admin\\\\Facades\\\\AdminMenu\\:\\:setContext\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Ingredients.php

-
message: "#^Call to an undefined static method Igniter\\\\Admin\\\\Facades\\\\AdminMenu\\:\\:setContext\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Mealtimes.php

-
message: "#^Call to an undefined static method Igniter\\\\Admin\\\\Facades\\\\AdminMenu\\:\\:setContext\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/MenuOptions.php

-
message: "#^Call to an undefined static method Igniter\\\\Admin\\\\Facades\\\\AdminMenu\\:\\:setContext\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Menus.php

-
message: "#^Call to an undefined method Igniter\\\\Cart\\\\Http\\\\Controllers\\\\Orders\\:\\:formFindModelObject\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Orders.php

-
message: "#^Call to an undefined static method Igniter\\\\Admin\\\\Facades\\\\AdminMenu\\:\\:setContext\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Orders.php

-
message: "#^Call to an undefined static method Igniter\\\\Admin\\\\Models\\\\Status\\:\\:find\\(\\)\\.$#"
count: 1
Expand All @@ -445,21 +390,6 @@ parameters:
count: 1
path: src/Http/Controllers/Orders.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:content\\(\\)\\.$#"
count: 1
path: src/Http/Middleware/CartMiddleware.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:instance\\(\\)\\.$#"
count: 1
path: src/Http/Middleware/CartMiddleware.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:store\\(\\)\\.$#"
count: 1
path: src/Http/Middleware/CartMiddleware.php

-
message: "#^Call to an undefined static method Igniter\\\\Local\\\\Facades\\\\Location\\:\\:current\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -1170,11 +1100,6 @@ parameters:
count: 1
path: src/OrderTypes/Delivery.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:subtotal\\(\\)\\.$#"
count: 1
path: src/OrderTypes/Delivery.php

-
message: "#^Call to an undefined static method Igniter\\\\Local\\\\Facades\\\\Location\\:\\:coveredArea\\(\\)\\.$#"
count: 1
Expand Down
30 changes: 30 additions & 0 deletions src/Facades/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@

use Illuminate\Support\Facades\Facade;

/**
* @method static \Igniter\Cart\Cart instance(string|null $instance = null)
* @method static string currentInstance()
* @method static array|\Igniter\Cart\CartItem add(void $buyable, int $qty = 0, array $options = [], void $comment = null)
* @method static \Igniter\Cart\CartItem|bool update(string $rowId, mixed $qty)
* @method static void remove(string $rowId)
* @method static \Igniter\Cart\CartItem get(string $rowId)
* @method static void destroy(mixed $identifier = null)
* @method static \Igniter\Cart\CartContent content()
* @method static int count()
* @method static string total()
* @method static float subtotal()
* @method static \Igniter\Cart\CartContent search(\Closure $search)
* @method static void associate(string $rowId, mixed $model)
* @method static \Igniter\Cart\CartConditions conditions()
* @method static void conditionsWithoutApplied()
* @method static \Igniter\Cart\CartCondition getCondition(void $name)
* @method static bool removeCondition(void $name)
* @method static void clearConditions()
* @method static void condition(void $condition)
* @method static void loadConditions()
* @method static void loadCondition(\Igniter\Cart\CartCondition $condition)
* @method static void clearContent()
* @method static void store(mixed $identifier)
* @method static void restore(mixed $identifier)
* @method static void deleteStored(void $identifier)
* @method static void keepSession(\Closure $callback)
*
* @see \Igniter\Cart\Cart
*/
class Cart extends Facade
{
/**
Expand Down

0 comments on commit de2b6b4

Please sign in to comment.