Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Laravel Pint #1253

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/laravel-pint-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
preset: laravel
verboseMode: true
testMode: true
pintVersion: 1.10.5
pintVersion: 1.13.1
onlyDirty: true
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"spatie/laravel-permission": "^5.10"
},
"require-dev": {
"laravel/pint": "^1.1",
"laravel/pint": "1.13.1",
"mockery/mockery": "^1.4.4",
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class ActivityLogFeed extends Component
{
use WithPagination, Notifies;
use Notifies, WithPagination;

/**
* The log subject to get activity for.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
class PasswordReset extends Component
{
use AuthorizesRequests;
use PerformsRedirects;
use Notifies;
use PerformsRedirects;

/**
* The staff members email address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

class BrandShow extends Component
{
use HasImages;
use HasSlots;
use HasUrls;
use Notifies;
use HasImages;
use WithAttributes;
use WithFileUploads;
use HasUrls;
use WithLanguages;
use WithAttributes;

/**
* The current brand we're showing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class CollectionGroupShow extends Component
{
use Notifies, MapsCollectionTree;
use MapsCollectionTree, Notifies;

/**
* The current collection group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

class CollectionShow extends Component
{
use Notifies;
use HasAvailability;
use WithAttributes;
use HasImages;
use WithFileUploads;
use HasUrls;
use Notifies;
use WithAttributes;
use WithFileUploads;
use WithLanguages;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class CollectionTree extends Component
{
use Notifies, MapsCollectionTree;
use MapsCollectionTree, Notifies;

/**
* The nodes for the tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class CustomerShow extends Component
use HasSlots;
use Notifies;
use WithAttributes;
use WithPagination;
use WithCountries;
use WithLanguages;
use WithPagination;

/**
* The current customer in view.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

abstract class AbstractDiscount extends Component
{
use WithLanguages;
use Notifies;
use HasAvailability;
use Notifies;
use WithLanguages;

/**
* The instance of the discount.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class OrderShow extends Component
{
use Notifies, WithCountries, HasSlots;
use HasSlots, Notifies, WithCountries;

/**
* The current order in view.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

class OptionValueCreateModal extends Component
{
use WithLanguages;
use Notifies;
use WithLanguages;

/**
* The parent product option for this new value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@

abstract class AbstractProduct extends Component
{
use Notifies;
use WithFileUploads;
use HasImages;
use CanExtendValidation;
use HasAvailability;
use HasDimensions;
use HasImages;
use HasPrices;
use HasSlots;
use HasTags;
use HasUrls;
use Notifies;
use SearchesProducts;
use WithAttributes;
use WithFileUploads;
use WithLanguages;
use HasPrices;
use HasDimensions;
use HasUrls;
use HasTags;
use HasSlots;
use CanExtendValidation;

/**
* The current product we are editing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
abstract class AbstractProductType extends Component
{
use Notifies;
use WithPagination;
use WithLanguages;
use WithPagination;

/**
* The current view of attributes we're assigning.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@

class VariantShow extends Component
{
use WithFileUploads;
use Notifies;
use HasPrices;
use WithLanguages;
use WithAttributes;
use CanExtendValidation;
use HasDimensions;
use HasSlots;
use HasImages;
use CanExtendValidation;
use HasPrices;
use HasSlots;
use Notifies;
use WithAttributes;
use WithFileUploads;
use WithLanguages;

/**
* Instance of the parent product.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

class AttributeEdit extends Component
{
use WithLanguages;
use Notifies;
use WithLanguages;

/**
* The attribute group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

class AttributeGroupEdit extends Component
{
use WithLanguages;
use Notifies;
use WithLanguages;

/**
* The type of attributable this is.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

class OptionEdit extends Component
{
use WithLanguages;
use Notifies;
use WithLanguages;

/**
* The option to edit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

class OptionValueEdit extends Component
{
use WithLanguages;
use Notifies;
use WithLanguages;

/**
* The option instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

abstract class AbstractTaxZone extends Component
{
use WithPagination, Notifies;
use Notifies, WithPagination;

/**
* The instance of the Tax Zone.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class TaxClassesIndex extends Component
{
use WithPagination, Notifies;
use Notifies, WithPagination;

/**
* The TaxClass to edit.
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/src/Http/Livewire/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function getTopSellingProductsProperty()
now()->parse($this->to),
])->join($variantsTable, function ($join) use ($variantsTable, $orderLineTable) {
$join->on("{$variantsTable}.id", '=', "{$orderLineTable}.purchasable_id")
->where('purchasable_type', '=', ProductVariant::class);
->where('purchasable_type', '=', ProductVariant::class);
})->groupBy('purchasable_type', 'purchasable_id')
->orderBy('count', 'desc')
->take(2)->get();
Expand Down
1 change: 0 additions & 1 deletion packages/admin/src/Menu/MenuRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function __construct()
* then a new one will be added to the slots property and returned.
*
* @param string $handle
* @return \Lunar\Hub\Menu\MenuSlot
*/
public function slot($handle): MenuSlot
{
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/src/Models/Staff.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
class Staff extends Authenticatable
{
use HasFactory;
use HasRoles;
use Notifiable;
use SoftDeletes;
use HasRoles;

/**
* Return a new factory instance for the model.
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/tests/Stubs/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
class User extends Authenticatable
{
use HasFactory;
use Notifiable;
use LunarUser;
use Notifiable;

/**
* The attributes that are mass assignable.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
},
"require-dev": {
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "1.13.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Lunar\Base\Migration;
use Lunar\Facades\DB;

class AddAttributesToBrandsTable extends Migration
{
Expand Down
6 changes: 0 additions & 6 deletions packages/core/src/Base/TaxDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ interface TaxDriver
{
/**
* Set the shipping address.
*
* @param \Lunar\Base\Addressable|null $address
*/
public function setShippingAddress(Addressable $address = null): self;

Expand All @@ -22,15 +20,11 @@ public function setCurrency(Currency $currency): self;

/**
* Set the billing address.
*
* @param \Lunar\Base\Addressable|null $address
*/
public function setBillingAddress(Addressable $address = null): self;

/**
* Set the purchasable item.
*
* @param \Lunar\Base\Purchasable $purchasable
*/
public function setPurchasable(Purchasable $purchasable): self;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/DiscountTypes/AmountOff.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private function applyFixedValue(array $values, Cart $cart): Cart
);

if (! $affectedLines->first(function ($breakdownLine) use ($line) {
return $breakdownLine->line == $line;
return $breakdownLine->line == $line;
})) {
$affectedLines->push(new DiscountBreakdownLine(
line: $line,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/FieldTypes/TranslatedText.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function setValue($value)
$item = new Text($item);
$value[$key] = $item;
}
if ($item && (Text::class !== get_class($item))) {
if ($item && (get_class($item) !== Text::class)) {
throw new FieldTypeException(self::class.' only supports '.Text::class.' field types.');
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Models/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
class Attribute extends BaseModel
{
use HasFactory;
use HasTranslations;
use HasMacros;
use HasTranslations;

public static function boot()
{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Models/AttributeGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
class AttributeGroup extends BaseModel
{
use HasFactory;
use HasTranslations;
use HasMacros;
use HasTranslations;

/**
* Return a new factory instance for the model.
Expand Down
11 changes: 5 additions & 6 deletions packages/core/src/Models/Brand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Lunar\Base\Traits\LogsActivity;
use Lunar\Base\Traits\Searchable;
use Lunar\Database\Factories\BrandFactory;
use Lunar\FieldTypes\TranslatedText;
use Spatie\MediaLibrary\HasMedia as SpatieHasMedia;

/**
Expand All @@ -26,14 +25,14 @@
*/
class Brand extends BaseModel implements SpatieHasMedia
{
use HasFactory,
use HasAttributes,
HasFactory,
HasMacros,
HasMedia,
HasTranslations,
HasUrls,
Searchable,
LogsActivity,
HasMacros,
HasAttributes,
HasTranslations;
Searchable;

/**
* {@inheritDoc}
Expand Down
Loading
Loading