parent
7b612ecc67
commit
8e3c43bd19
|
|
@ -13,12 +13,12 @@ namespace Database\Factories;
|
|||
|
|
||||
*/
|
||||
|
||||
class UserFactory extends \Illuminate\Database\Eloquent\Factories\Factory
|
||||
{
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,15 +6,13 @@ use Illuminate\Http\Resources\Json\JsonResource;
|
|||
|
||||
class Attribute extends JsonResource
|
||||
{
|
||||
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
|
|
@ -27,5 +25,4 @@ class Attribute extends JsonResource
|
|||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,15 +6,13 @@ use Illuminate\Http\Resources\Json\JsonResource;
|
|||
|
||||
class AttributeOption extends JsonResource
|
||||
{
|
||||
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
|
|
@ -23,5 +21,4 @@ class AttributeOption extends JsonResource
|
|||
'swatch_value' => $this->swatch_value,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra
|
|||
return url('cache/small/' . $this->swatch_value);
|
||||
}
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider;
|
|||
|
||||
class AttributeServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
|
|
@ -16,5 +15,4 @@ class AttributeServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider;
|
|||
|
||||
class BookingProductServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
|
|
@ -38,5 +37,4 @@ class BookingProductServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->mergeConfigFrom(dirname(__DIR__) . '/Config/product_types.php', 'product_types');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -14,7 +14,6 @@ use Webkul\Category\Contracts\CategoryTranslation as CategoryTranslationContract
|
|||
*/
|
||||
class CategoryTranslation extends Model implements CategoryTranslationContract
|
||||
{
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
|
|
@ -26,5 +25,4 @@ class CategoryTranslation extends Model implements CategoryTranslationContract
|
|||
'meta_keywords',
|
||||
'locale_id',
|
||||
];
|
||||
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ use Webkul\Checkout\Facades\Cart;
|
|||
|
||||
class CheckoutServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
include __DIR__ . '/../Http/helpers.php';
|
||||
|
|
@ -49,5 +48,4 @@ class CheckoutServiceProvider extends ServiceProvider
|
|||
|
||||
$this->app->bind('cart', 'Webkul\Checkout\Cart');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ class Core
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns currenct channel models.
|
||||
* Returns current channel models.
|
||||
*
|
||||
* @return \Webkul\Core\Contracts\Channel
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ use Webkul\Product\Models\ProductDownloadableLinkTranslation;
|
|||
*/
|
||||
class Laravel5Helper extends Laravel
|
||||
{
|
||||
|
||||
public const SIMPLE_PRODUCT = 1;
|
||||
|
||||
public const VIRTUAL_PRODUCT = 2;
|
||||
|
|
@ -451,5 +450,4 @@ class Laravel5Helper extends Laravel
|
|||
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
|
@ -12,7 +10,6 @@ use Webkul\Core\Contracts\Address as AddressContract;
|
|||
|
||||
/**
|
||||
* Class Address
|
||||
*
|
||||
* @package Webkul\Core\Models
|
||||
*
|
||||
* @property string $address_type
|
||||
|
|
@ -41,7 +38,6 @@ use Webkul\Core\Contracts\Address as AddressContract;
|
|||
*/
|
||||
abstract class Address extends Model implements AddressContract
|
||||
{
|
||||
|
||||
protected $table = 'addresses';
|
||||
|
||||
protected $guarded = [
|
||||
|
|
@ -92,5 +88,4 @@ abstract class Address extends Model implements AddressContract
|
|||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use Konekt\Concord\BaseModuleServiceProvider;
|
|||
|
||||
class CoreModuleServiceProvider extends BaseModuleServiceProvider
|
||||
{
|
||||
public function boot()
|
||||
public function boot(): void
|
||||
{
|
||||
if ($this->areMigrationsEnabled()) {
|
||||
$this->registerMigrations();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ use Webkul\Theme\ViewRenderEventManager;
|
|||
|
||||
class CoreServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
|
|
@ -127,5 +126,4 @@ class CoreServiceProvider extends ServiceProvider
|
|||
return new BladeCompiler($app['files'], $app['config']['view.compiled']);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Webkul\Customer\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Webkul\Customer\Database\Factories\CustomerGroupFactory;
|
||||
use Webkul\Customer\Contracts\CustomerGroup as CustomerGroupContract;
|
||||
|
|
@ -22,7 +23,7 @@ class CustomerGroup extends Model implements CustomerGroupContract
|
|||
/**
|
||||
* Get the customers for this group.
|
||||
*/
|
||||
public function customers(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function customers(): HasMany
|
||||
{
|
||||
return $this->hasMany(CustomerProxy::modelClass());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
|
|||
|
||||
class CustomerServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap application services.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function boot(Router $router)
|
||||
public function boot(Router $router): void
|
||||
{
|
||||
$router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
|
||||
|
||||
|
|
@ -54,5 +54,4 @@ class CustomerServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->mergeConfigFrom(dirname(__DIR__) . '/Config/system.php', 'core');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider;
|
|||
|
||||
class InventoryServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
|
|
@ -25,5 +24,4 @@ class InventoryServiceProvider extends ServiceProvider
|
|||
public function register(): void
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Category\Database\Seeders;
|
||||
namespace Webkul\Product\Database\Seeders;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ProductTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
//dd('running');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ use Webkul\Product\ProductVideo;
|
|||
|
||||
class ProductServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
|
|
@ -97,5 +96,4 @@ class ProductServiceProvider extends ServiceProvider
|
|||
return app()->make(ProductVideo::class);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,10 @@ use Webkul\Checkout\Models\CartProxy;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\Sales\Contracts\Order as OrderContract;
|
||||
use Webkul\Sales\Database\Factories\OrderFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class Order extends Model implements OrderContract
|
||||
|
|
@ -83,7 +87,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the associated cart that was used to create this order.
|
||||
*/
|
||||
public function cart(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
public function cart(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CartProxy::modelClass());
|
||||
}
|
||||
|
|
@ -91,7 +95,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the order items record associated with the order.
|
||||
*/
|
||||
public function items(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function items(): HasMany
|
||||
{
|
||||
return $this->hasMany(OrderItemProxy::modelClass())
|
||||
->whereNull('parent_id');
|
||||
|
|
@ -100,7 +104,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the comments record associated with the order.
|
||||
*/
|
||||
public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function comments(): HasMany
|
||||
{
|
||||
return $this->hasMany(OrderCommentProxy::modelClass());
|
||||
}
|
||||
|
|
@ -108,7 +112,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the order items record associated with the order.
|
||||
*/
|
||||
public function all_items(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function all_items(): HasMany
|
||||
{
|
||||
return $this->hasMany(OrderItemProxy::modelClass());
|
||||
}
|
||||
|
|
@ -116,7 +120,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the order shipments record associated with the order.
|
||||
*/
|
||||
public function shipments(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function shipments(): HasMany
|
||||
{
|
||||
return $this->hasMany(ShipmentProxy::modelClass());
|
||||
}
|
||||
|
|
@ -124,7 +128,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the order invoices record associated with the order.
|
||||
*/
|
||||
public function invoices(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function invoices(): HasMany
|
||||
{
|
||||
return $this->hasMany(InvoiceProxy::modelClass());
|
||||
}
|
||||
|
|
@ -132,7 +136,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the order refunds record associated with the order.
|
||||
*/
|
||||
public function refunds(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function refunds(): HasMany
|
||||
{
|
||||
return $this->hasMany(RefundProxy::modelClass());
|
||||
}
|
||||
|
|
@ -140,7 +144,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the order transactions record associated with the order.
|
||||
*/
|
||||
public function transactions(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function transactions(): HasMany
|
||||
{
|
||||
return $this->hasMany(OrderTransactionProxy::modelClass());
|
||||
}
|
||||
|
|
@ -148,7 +152,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the customer record associated with the order.
|
||||
*/
|
||||
public function customer(): \Illuminate\Database\Eloquent\Relations\MorphTo
|
||||
public function customer(): MorphTo
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
|
@ -156,7 +160,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the addresses for the order.
|
||||
*/
|
||||
public function addresses(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function addresses(): HasMany
|
||||
{
|
||||
return $this->hasMany(OrderAddressProxy::modelClass());
|
||||
}
|
||||
|
|
@ -164,7 +168,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the payment for the order.
|
||||
*/
|
||||
public function payment(): \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
public function payment(): HasOne
|
||||
{
|
||||
return $this->hasOne(OrderPaymentProxy::modelClass());
|
||||
}
|
||||
|
|
@ -172,7 +176,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the billing address for the order.
|
||||
*/
|
||||
public function billing_address(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function billing_address(): HasMany
|
||||
{
|
||||
return $this->addresses()
|
||||
->where('address_type', OrderAddress::ADDRESS_TYPE_BILLING);
|
||||
|
|
@ -190,7 +194,7 @@ class Order extends Model implements OrderContract
|
|||
/**
|
||||
* Get the shipping address for the order.
|
||||
*/
|
||||
public function shipping_address(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function shipping_address(): HasMany
|
||||
{
|
||||
return $this->addresses()
|
||||
->where('address_type', OrderAddress::ADDRESS_TYPE_SHIPPING);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider;
|
|||
|
||||
class SalesServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||
|
|
@ -21,5 +20,4 @@ class SalesServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->mergeConfigFrom(dirname(__DIR__) . '/Config/system.php', 'core');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -25,7 +25,6 @@ use Cart;
|
|||
|
||||
class cartRuleWithCoupon
|
||||
{
|
||||
|
||||
public $cartRule;
|
||||
|
||||
public $coupon;
|
||||
|
|
@ -35,12 +34,10 @@ class cartRuleWithCoupon
|
|||
$this->cartRule = $cartRule;
|
||||
$this->coupon = $coupon;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class expectedCartItem implements Arrayable
|
||||
{
|
||||
|
||||
public const ITEM_DISCOUNT_AMOUNT_PRECISION = 4;
|
||||
|
||||
public const ITEM_TAX_AMOUNT_PRECISION = 4;
|
||||
|
|
@ -130,12 +127,10 @@ class expectedCartItem implements Arrayable
|
|||
'applied_cart_rule_ids' => $this->applied_cart_rule_ids,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class expectedCart
|
||||
{
|
||||
|
||||
public const CART_TOTAL_PRECISION = 2;
|
||||
|
||||
public $customer_id;
|
||||
|
|
@ -195,12 +190,10 @@ class expectedCart
|
|||
{
|
||||
return (array)$this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class expectedOrder implements Arrayable
|
||||
{
|
||||
|
||||
public $status;
|
||||
|
||||
public $customer_email;
|
||||
|
|
@ -298,12 +291,10 @@ class expectedOrder implements Arrayable
|
|||
'shipping_discount_amount' => $this->shipping_discount_amount,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CartRuleCest
|
||||
{
|
||||
|
||||
private $products;
|
||||
|
||||
private $sessionToken;
|
||||
|
|
@ -1251,6 +1242,4 @@ class CartRuleCest
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue