Skip to content

Commit

Permalink
Update FUNDING.yml (#218)
Browse files Browse the repository at this point in the history
* Update FUNDING.yml

* fix code formatting

---------

Co-authored-by: mckenziearts <[email protected]>
  • Loading branch information
mckenziearts and mckenziearts authored Aug 22, 2023
1 parent b8c8927 commit 7aa868a
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

open_collective: shopperlabs
github: mckenziearts
4 changes: 2 additions & 2 deletions src/Contracts/ReviewRateable.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public function sumRating();

public function ratingPercent(int $max = 5): float;

public function rating(array $data, Model $author, ?Model $parent = null);
public function rating(array $data, Model $author, Model $parent = null);

public function updateRating(int $id, array $data, ?Model $parent = null);
public function updateRating(int $id, array $data, Model $parent = null);

public function getAllRatings(int $id, string $sort = 'desc');

Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function shopper_currency(): string
/**
* Return money format.
*/
function shopper_money_format($amount, ?string $currency = null): string
function shopper_money_format($amount, string $currency = null): string
{
$money = new Money($amount, new Currency($currency ?? shopper_currency()));
$currencies = new ISOCurrencies();
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct()
$this->middleware('guest');
}

public function showResetForm(Request $request, ?string $token = null): View
public function showResetForm(Request $request, string $token = null): View
{
return view('shopper::auth.passwords.reset-password')->with(
['token' => $token, 'email' => $request->email]
Expand Down
42 changes: 21 additions & 21 deletions src/Http/Livewire/Orders/Browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ class Browse extends Component
{
public function render(): View
{
// $order = Order::query()->create([
// 'number' => generate_number(),
// 'price_amount' => 28600,
// 'currency' => shopper_currency(),
// 'shipping_total' => 50,
// 'shipping_method' => 'Vero Shop',
// 'shipping_address_id' => 1,
// 'payment_method_id' => 1,
// 'user_id' => 2,
// ]);
//
// $product = Product::find(3);
// OrderItem::query()->create([
// 'name' => $product->name,
// 'sku' => $product->sku,
// 'quantity' => 2,
// 'unit_price_amount' => $product->price_amount,
// 'order_id' => $order->id,
// 'product_id' => $product->id,
// 'product_type' => config('shopper.system.models.product'),
// ]);
// $order = Order::query()->create([
// 'number' => generate_number(),
// 'price_amount' => 28600,
// 'currency' => shopper_currency(),
// 'shipping_total' => 50,
// 'shipping_method' => 'Vero Shop',
// 'shipping_address_id' => 1,
// 'payment_method_id' => 1,
// 'user_id' => 2,
// ]);
//
// $product = Product::find(3);
// OrderItem::query()->create([
// 'name' => $product->name,
// 'sku' => $product->sku,
// 'quantity' => 2,
// 'unit_price_amount' => $product->price_amount,
// 'order_id' => $order->id,
// 'product_id' => $product->id,
// 'product_type' => config('shopper.system.models.product'),
// ]);

return view('shopper::livewire.orders.browse', [
'total' => Order::query()->count(),
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Livewire/Settings/Integrations/Browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function mount(): void
/**
* Confirmation modal.
*/
public function confirmationEnable(string $provider, ?string $message = null): void
public function confirmationEnable(string $provider, string $message = null): void
{
$this->currentProvider = $provider;
$this->confirmModalActivation = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Shop/Product/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Shopper\Framework\Models\Shop\Product;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Shopper\Framework\Models\Traits\HasSlug;
use Illuminate\Database\Eloquent\Builder;

class Attribute extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Shop/Product/Brand.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function registerMediaCollections(): void
->acceptsMimeTypes(['image/jpg', 'image/jpeg', 'image/png']);
}

public function registerMediaConversions(?Media $media = null): void
public function registerMediaConversions(Media $media = null): void
{
$this->addMediaConversion('thumb200x200')
->fit(Manipulations::FIT_CROP, 200, 200);
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Shop/Product/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function registerMediaCollections(): void
->acceptsMimeTypes(['image/jpg', 'image/jpeg', 'image/png']);
}

public function registerMediaConversions(?Media $media = null): void
public function registerMediaConversions(Media $media = null): void
{
$this->addMediaConversion('thumb200x200')
->fit(Manipulations::FIT_CROP, 200, 200);
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Shop/Product/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function registerMediaCollections(): void
->acceptsMimeTypes(['image/jpg', 'image/jpeg', 'image/png']);
}

public function registerMediaConversions(?Media $media = null): void
public function registerMediaConversions(Media $media = null): void
{
$this->addMediaConversion('thumb200x200')
->fit(Manipulations::FIT_CROP, 200, 200);
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Shop/Product/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function registerMediaCollections(): void
->useFallbackUrl(url(shopper_prefix() . '/images/product_placeholder.jpg'));
}

public function registerMediaConversions(?Media $media = null): void
public function registerMediaConversions(Media $media = null): void
{
$this->addMediaConversion('thumb200x200')
->fit(Manipulations::FIT_CROP, 200, 200);
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Traits/HasSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function generateUniqueSlug(string $value): string
return $slug;
}

private function slugExists(string $slug, ?int $ignoreId = null): bool
private function slugExists(string $slug, int $ignoreId = null): bool
{
$query = $this->where('slug', $slug);

Expand Down
6 changes: 3 additions & 3 deletions src/Models/Traits/HasStock.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function getStockAttribute(): int
return $this->stock();
}

public function stock(?DateTimeInterface $date = null): int
public function stock(DateTimeInterface $date = null): int
{
$date = $date ? $date : Carbon::now();

Expand All @@ -30,7 +30,7 @@ public function stock(?DateTimeInterface $date = null): int
->sum('quantity');
}

public function stockInventory(int $inventoryId, ?string $date = null): int
public function stockInventory(int $inventoryId, string $date = null): int
{
$date = $date ?: Carbon::now();

Expand Down Expand Up @@ -59,7 +59,7 @@ public function mutateStock(int $inventoryId, int $quantity = 1, array $argument
return $this->createStockMutation($quantity, $inventoryId, $arguments);
}

public function clearStock(?int $inventoryId = null, ?int $newQuantity = null, array $arguments = []): bool
public function clearStock(int $inventoryId = null, int $newQuantity = null, array $arguments = []): bool
{
$this->inventoryHistories()->delete();

Expand Down
4 changes: 2 additions & 2 deletions src/Models/Traits/ReviewRateable.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ public function ratingPercent(int $max = 5): float
return round($quantity * $max > 0 ? ((int) $total * 100) / $quantity : 0, 1);
}

public function rating(array $data, Model $author, ?Model $parent = null): Review
public function rating(array $data, Model $author, Model $parent = null): Review
{
return (new Review())->createRating($this, $data, $author);
}

public function updateRating($id, $data, ?Model $parent = null): Review
public function updateRating($id, $data, Model $parent = null): Review
{
return (new Review())->updateRating($id, $data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/User/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function groups(): array
/**
* Generate permissions for the group name.
*/
public static function generate(string $item, ?string $group = null): void
public static function generate(string $item, string $group = null): void
{
self::query()->firstOrCreate([
'name' => 'browse_' . $item,
Expand Down

0 comments on commit 7aa868a

Please sign in to comment.