Merge branch 'master' into datagrid-plus-changes

This commit is contained in:
Devansh 2022-04-01 21:05:19 +05:30
commit ff1827dc89
143 changed files with 483 additions and 2925 deletions

View File

@ -23,23 +23,14 @@ class AddressDataGrid extends DataGrid
*/
protected $sortOrder = 'desc';
/**
* Customer repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerRepository
*/
protected $customerRepository;
/**
* Create a new datagrid instance.
*
* @param \Webkul\Customer\Repositories\CustomerRepository $customerRepository
* @return void
*/
public function __construct(CustomerRepository $customerRepository)
public function __construct(protected CustomerRepository $customerRepository)
{
$this->customerRepository = $customerRepository;
parent::__construct();
}

View File

@ -22,28 +22,17 @@ class ChannelDataGrid extends DataGrid
*/
protected $locale;
/**
* ChannelRepository $channelRepository
*
* @var \Webkul\Core\Repositories\ChannelRepository
*/
protected $channelRepository;
/**
* Create a new datagrid instance.
*
* @param \Webkul\Core\Repositories\ChannelRepository $channelRepository
* @return void
*/
public function __construct(
ChannelRepository $channelRepository
)
public function __construct(protected ChannelRepository $channelRepository)
{
parent::__construct();
$this->locale = core()->getRequestedLocaleCode();
$this->channelRepository = $channelRepository;
}
public function prepareQueryBuilder()

View File

@ -8,22 +8,14 @@ use Maatwebsite\Excel\Concerns\ShouldAutoSize;
class DataGridExport implements FromView, ShouldAutoSize
{
/**
* DataGrid instance
*
* @var mixed
*/
protected $gridData = [];
/**
* Create a new instance.
*
* @param mixed DataGrid
* @return void
*/
public function __construct($gridData)
public function __construct(protected $gridData = [])
{
$this->gridData = $gridData;
}
/**

View File

@ -16,13 +16,6 @@ class ConfigurationController extends Controller
*/
protected $_config;
/**
* Core config repository instance.
*
* @var \Webkul\Core\Repositories\CoreConfigRepository
*/
protected $coreConfigRepository;
/**
* Tree instance.
*
@ -36,10 +29,8 @@ class ConfigurationController extends Controller
* @param \Webkul\Core\Repositories\CoreConfigRepository $coreConfigRepository
* @return void
*/
public function __construct(CoreConfigRepository $coreConfigRepository)
public function __construct(protected CoreConfigRepository $coreConfigRepository)
{
$this->coreConfigRepository = $coreConfigRepository;
$this->_config = request('_config');
$this->prepareConfigTree();

View File

@ -17,20 +17,6 @@ class AddressController extends Controller
*/
protected $_config;
/**
* CustomerRepository object
*
* @var \Webkul\Customer\Repositories\CustomerRepository
*/
protected $customerRepository;
/**
* CustomerAddressRepository object
*
* @var \Webkul\Customer\Repositories\CustomerAddressRepository
*/
protected $customerAddressRepository;
/**
* Create a new controller instance.
*
@ -39,13 +25,10 @@ class AddressController extends Controller
* @return void
*/
public function __construct(
CustomerRepository $customerRepository,
CustomerAddressRepository $customerAddressRepository
) {
$this->customerRepository = $customerRepository;
$this->customerAddressRepository = $customerAddressRepository;
protected CustomerRepository $customerRepository,
protected CustomerAddressRepository $customerAddressRepository
)
{
$this->_config = request('_config');
}

View File

@ -22,34 +22,6 @@ class CustomerController extends Controller
*/
protected $_config;
/**
* Customer repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerRepository
*/
protected $customerRepository;
/**
* Customer address repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerAddressRepository
*/
protected $customerAddressRepository;
/**
* Customer group repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerGroupRepository
*/
protected $customerGroupRepository;
/**
* Channel repository instance.
*
* @var \Webkul\Core\Repositories\ChannelRepository
*/
protected $channelRepository;
/**
* Create a new controller instance.
*
@ -59,20 +31,13 @@ class CustomerController extends Controller
* @param \Webkul\Core\Repositories\ChannelRepository $channelRepository
*/
public function __construct(
CustomerRepository $customerRepository,
CustomerAddressRepository $customerAddressRepository,
CustomerGroupRepository $customerGroupRepository,
ChannelRepository $channelRepository
) {
protected CustomerRepository $customerRepository,
protected CustomerAddressRepository $customerAddressRepository,
protected CustomerGroupRepository $customerGroupRepository,
protected ChannelRepository $channelRepository
)
{
$this->_config = request('_config');
$this->customerRepository = $customerRepository;
$this->customerAddressRepository = $customerAddressRepository;
$this->customerGroupRepository = $customerGroupRepository;
$this->channelRepository = $channelRepository;
}
/**

View File

@ -15,24 +15,15 @@ class CustomerGroupController extends Controller
*/
protected $_config;
/**
* Customer group repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerGroupRepository
*/
protected $customerGroupRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Customer\Repositories\CustomerGroupRepository $customerGroupRepository;
* @return void
*/
public function __construct(CustomerGroupRepository $customerGroupRepository)
public function __construct(protected CustomerGroupRepository $customerGroupRepository)
{
$this->_config = request('_config');
$this->customerGroupRepository = $customerGroupRepository;
}
/**

View File

@ -19,41 +19,6 @@ class DashboardController extends Controller
*/
protected $_config;
/**
* Order repository instance.
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* Order item repository instance.
*
* @var \Webkul\Sales\Repositories\OrderItemRepository
*/
protected $orderItemRepository;
/**
* Invoice repository instance.
*
* @var \Webkul\Sales\Repositories\InvoiceRepository
*/
protected $invoiceRepository;
/**
* Customer repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerRepository
*/
protected $customerRepository;
/**
* Product inventory repository instance.
*
* @var \Webkul\Product\Repositories\ProductInventoryRepository
*/
protected $productInventoryRepository;
/**
* Start date.
*
@ -92,23 +57,14 @@ class DashboardController extends Controller
* @return void
*/
public function __construct(
OrderRepository $orderRepository,
OrderItemRepository $orderItemRepository,
InvoiceRepository $invoiceRepository,
CustomerRepository $customerRepository,
ProductInventoryRepository $productInventoryRepository
) {
protected OrderRepository $orderRepository,
protected OrderItemRepository $orderItemRepository,
protected InvoiceRepository $invoiceRepository,
protected CustomerRepository $customerRepository,
protected ProductInventoryRepository $productInventoryRepository
)
{
$this->_config = request('_config');
$this->orderRepository = $orderRepository;
$this->orderItemRepository = $orderItemRepository;
$this->invoiceRepository = $invoiceRepository;
$this->customerRepository = $customerRepository;
$this->productInventoryRepository = $productInventoryRepository;
}
/**

View File

@ -22,20 +22,6 @@ class InvoiceController extends Controller
*/
protected $_config;
/**
* Order repository instance.
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* Invoice repository instance.
*
* @var \Webkul\Sales\Repositories\InvoiceRepository
*/
protected $invoiceRepository;
/**
* Create a new controller instance.
*
@ -44,14 +30,11 @@ class InvoiceController extends Controller
* @return void
*/
public function __construct(
OrderRepository $orderRepository,
InvoiceRepository $invoiceRepository
) {
protected OrderRepository $orderRepository,
protected InvoiceRepository $invoiceRepository
)
{
$this->_config = request('_config');
$this->orderRepository = $orderRepository;
$this->invoiceRepository = $invoiceRepository;
}
/**

View File

@ -17,20 +17,6 @@ class OrderController extends Controller
*/
protected $_config;
/**
* OrderRepository object
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* OrderCommentRepository object
*
* @var \Webkul\Sales\Repositories\OrderCommentRepository
*/
protected $orderCommentRepository;
/**
* Create a new controller instance.
*
@ -39,15 +25,11 @@ class OrderController extends Controller
* @return void
*/
public function __construct(
OrderRepository $orderRepository,
OrderCommentRepository $orderCommentRepository
protected OrderRepository $orderRepository,
protected OrderCommentRepository $orderCommentRepository
)
{
$this->_config = request('_config');
$this->orderRepository = $orderRepository;
$this->orderCommentRepository = $orderCommentRepository;
}
/**

View File

@ -17,27 +17,6 @@ class RefundController extends Controller
*/
protected $_config;
/**
* Order repository instance.
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* Order item repository instance.
*
* @var \Webkul\Sales\Repositories\OrderItemRepository
*/
protected $orderItemRepository;
/**
* Refund repository instance.
*
* @var \Webkul\Sales\Repositories\RefundRepository
*/
protected $refundRepository;
/**
* Create a new controller instance.
*
@ -47,17 +26,12 @@ class RefundController extends Controller
* @return void
*/
public function __construct(
OrderRepository $orderRepository,
OrderItemRepository $orderItemRepository,
RefundRepository $refundRepository
) {
protected OrderRepository $orderRepository,
protected OrderItemRepository $orderItemRepository,
protected RefundRepository $refundRepository
)
{
$this->_config = request('_config');
$this->orderRepository = $orderRepository;
$this->orderItemRepository = $orderItemRepository;
$this->refundRepository = $refundRepository;
}
/**

View File

@ -17,27 +17,6 @@ class ShipmentController extends Controller
*/
protected $_config;
/**
* Order repository instance.
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* Order item repository instance.
*
* @var \Webkul\Sales\Repositories\OrderItemRepository
*/
protected $orderItemRepository;
/**
* Shipment repository instance.
*
* @var \Webkul\Sales\Repositories\ShipmentRepository
*/
protected $shipmentRepository;
/**
* Create a new controller instance.
*
@ -47,17 +26,12 @@ class ShipmentController extends Controller
* @return void
*/
public function __construct(
ShipmentRepository $shipmentRepository,
OrderRepository $orderRepository,
OrderItemRepository $orderItemRepository
) {
protected ShipmentRepository $shipmentRepository,
protected OrderRepository $orderRepository,
protected OrderItemRepository $orderItemRepository
)
{
$this->_config = request('_config');
$this->orderRepository = $orderRepository;
$this->orderItemRepository = $orderItemRepository;
$this->shipmentRepository = $shipmentRepository;
}
/**

View File

@ -19,27 +19,6 @@ class TransactionController extends Controller
*/
protected $_config;
/**
* Order repository instance.
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* Order transaction repository instance.
*
* @var \Webkul\Sales\Repositories\OrderTransactionRepository
*/
protected $orderTransactionRepository;
/**
* Invoice repository instance.
*
* @var \Webkul\Sales\Repositories\InvoiceRepository
*/
protected $invoiceRepository;
/**
* Create a new controller instance.
*
@ -49,16 +28,12 @@ class TransactionController extends Controller
* @return void
*/
public function __construct(
OrderRepository $orderRepository,
OrderTransactionRepository $orderTransactionRepository,
InvoiceRepository $invoiceRepository) {
protected OrderRepository $orderRepository,
protected OrderTransactionRepository $orderTransactionRepository,
protected InvoiceRepository $invoiceRepository
)
{
$this->_config = request('_config');
$this->orderRepository = $orderRepository;
$this->orderTransactionRepository = $orderTransactionRepository;
$this->invoiceRepository = $invoiceRepository;
}
/**

View File

@ -7,21 +7,13 @@ use Webkul\Core\Repositories\LocaleRepository;
class Locale
{
/**
* Locale repository.
*
* @var LocaleRepository
*/
protected $locale;
/**
* Create a new middleware instance.
*
* @param \Webkul\Core\Repositories\LocaleRepository $locale
* @param \Webkul\Core\Repositories\LocaleRepository $localeRepository
*/
public function __construct(LocaleRepository $locale)
public function __construct(protected LocaleRepository $localeRepository)
{
$this->locale = $locale;
}
/**
@ -36,7 +28,7 @@ class Locale
$locale = request()->get('admin_locale');
if ($locale) {
if ($this->locale->findOneByField('code', $locale)) {
if ($this->localeRepository->findOneByField('code', $locale)) {
app()->setLocale($locale);
session()->put('admin_locale', $locale);

View File

@ -10,18 +10,12 @@ class CancelOrderAdminNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* @var \Webkul\Sales\Contracts\Order
*/
public $order;
/**
* @param \Webkul\Sales\Contracts\Order $order
* @return void
*/
public function __construct($order)
public function __construct(public $order)
{
$this->order = $order;
}
public function build()

View File

@ -11,18 +11,12 @@ class CancelOrderNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* @var \Webkul\Sales\Contracts\Order
*/
public $order;
/**
* @param \Webkul\Sales\Contracts\Order $order
* @return void
*/
public function __construct($order)
public function __construct(public $order)
{
$this->order = $order;
}
public function build()

View File

@ -10,20 +10,6 @@ class DuplicateInvoiceNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The invoice instance.
*
* @var \Webkul\Customer\Contracts\Invoice
*/
public $invoice;
/**
* Customer email.
*
* @var string
*/
public $customerEmail;
/**
* Create a new message instance.
*
@ -31,12 +17,11 @@ class DuplicateInvoiceNotification extends Mailable
* @param string $customerEmail
* @return void
*/
public function __construct($invoice, $customerEmail)
{
$this->invoice = $invoice;
$this->customerEmail = $customerEmail;
}
public function __construct(
public $invoice,
public $customerEmail
)
{}
/**
* Build the message.

View File

@ -11,20 +11,6 @@ class InvoiceOverdueReminder extends Mailable
{
use Queueable, SerializesModels;
/**
* The customer instance.
*
* @var \Webkul\Customer\Contracts\Customer
*/
public $customer;
/**
* The invoice instance.
*
* @var \Webkul\Sales\Contracts\Invoice
*/
public $invoice;
/**
* Create a new message instance.
*
@ -32,14 +18,10 @@ class InvoiceOverdueReminder extends Mailable
* @param \Webkul\Sales\Contracts\Invoice $invoice
*/
public function __construct(
$customer,
$invoice
public $customer,
public $invoice
)
{
$this->customer = $customer;
$this->invoice = $invoice;
}
{}
/**
* Build the message.

View File

@ -11,22 +11,14 @@ class NewAdminNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The order instance.
*
* @var \Webkul\Sales\Contracts\Order
*/
public $order;
/**
* Create a new message instance.
*
* @param \Webkul\Sales\Contracts\Order $order
* @return void
*/
public function __construct($order)
public function __construct(public $order)
{
$this->order = $order;
}
/**

View File

@ -11,20 +11,6 @@ class NewCustomerNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The customer instance.
*
* @var \Webkul\Customer\Contracts\Customer
*/
public $customer;
/**
* The password instance.
*
* @var string
*/
public $password;
/**
* Create a new message instance.
*
@ -33,13 +19,10 @@ class NewCustomerNotification extends Mailable
* @return void
*/
public function __construct(
$customer,
$password
public $customer,
public $password
)
{
$this->customer = $customer;
$this->password = $password;
}
/**

View File

@ -11,22 +11,14 @@ class NewInventorySourceNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The shipment instance.
*
* @var \Webkul\Customer\Contracts\Shipment
*/
public $shipment;
/**
* Create a new message instance.
*
* @param \Webkul\Customer\Contracts\Shipment $shipment
* @return void
*/
public function __construct($shipment)
public function __construct(public $shipment)
{
$this->shipment = $shipment;
}
/**

View File

@ -11,22 +11,14 @@ class NewInvoiceNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The invoice instance.
*
* @param \Webkul\Customer\Contracts\Invoice $invoice
*/
public $invoice;
/**
* Create a new message instance.
*
* @param \Webkul\Customer\Contracts\Invoice $invoice
* @return void
*/
public function __construct($invoice)
public function __construct(public $invoice)
{
$this->invoice = $invoice;
}
/**

View File

@ -11,22 +11,14 @@ class NewOrderNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The order instance.
*
* @var \Webkul\Sales\Contracts\Order $order
*/
public $order;
/**
* Create a new message instance.
*
* @param \Webkul\Sales\Contracts\Order $order
* @return void
*/
public function __construct($order)
public function __construct(public $order)
{
$this->order = $order;
}
/**

View File

@ -11,22 +11,14 @@ class NewRefundNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The refund instance.
*
* @var \Webkul\Sales\Contracts\Refund
*/
public $refund;
/**
* Create a new message instance.
*
* @param \Webkul\Sales\Contracts\Refund $refund
* @return void
*/
public function __construct($refund)
public function __construct(public $refund)
{
$this->refund = $refund;
}
/**

View File

@ -11,22 +11,14 @@ class NewShipmentNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The shipment instance.
*
* @var \Webkul\Sales\Contracts\Shipment
*/
public $shipment;
/**
* Create a new message instance.
*
* @param \Webkul\Sales\Contracts\Shipment $shipment
* @return void
*/
public function __construct($shipment)
public function __construct(public $shipment)
{
$this->shipment = $shipment;
}
/**

View File

@ -11,22 +11,14 @@ class OrderCommentNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The order comment instance.
*
* @var \Webkul\Sales\Contracts\OrderComment $comment
*/
public $comment;
/**
* Create a new message instance.
*
* @param \Webkul\Sales\Contracts\OrderComment $comment
* @return void
*/
public function __construct($comment)
public function __construct(public $comment)
{
$this->comment = $comment;
}
/**

View File

@ -25,31 +25,17 @@ class ProductCategoryUniqueSlug implements Rule
*/
protected $isSlugReserved = false;
/**
* Table name.
*
* @var string
*/
protected $tableName;
/**
* Table id.
*
* @var string
*/
protected $id;
/**
* Constructor.
*
* @param string $tableName
* @param string $id
*/
public function __construct($tableName = null, $id = null)
public function __construct(
protected $tableName = null,
protected $id = null
)
{
$this->tableName = $tableName;
$this->id = $id;
}
/**

View File

@ -14,23 +14,14 @@ class AttributeController extends Controller
*/
protected $_config;
/**
* Attribute repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Attribute\Repositories\AttributeRepository $attributeRepository
* @return void
*/
public function __construct(AttributeRepository $attributeRepository)
public function __construct(protected AttributeRepository $attributeRepository)
{
$this->attributeRepository = $attributeRepository;
$this->_config = request('_config');
}

View File

@ -15,20 +15,6 @@ class AttributeFamilyController extends Controller
*/
protected $_config;
/**
* Attribute family repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeFamilyRepository
*/
protected $attributeFamilyRepository;
/**
* Attribute repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* Create a new controller instance.
*
@ -37,13 +23,10 @@ class AttributeFamilyController extends Controller
* @return void
*/
public function __construct(
AttributeFamilyRepository $attributeFamilyRepository,
AttributeRepository $attributeRepository
) {
$this->attributeFamilyRepository = $attributeFamilyRepository;
$this->attributeRepository = $attributeRepository;
protected AttributeFamilyRepository $attributeFamilyRepository,
protected AttributeRepository $attributeRepository
)
{
$this->_config = request('_config');
}

View File

@ -11,20 +11,6 @@ use Illuminate\Support\Str;
class AttributeFamilyRepository extends Repository
{
/**
* AttributeRepository object
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* AttributeGroupRepository object
*
* @var \Webkul\Attribute\Repositories\AttributeGroupRepository
*/
protected $attributeGroupRepository;
/**
* Create a new controller instance.
*
@ -33,15 +19,11 @@ class AttributeFamilyRepository extends Repository
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
AttributeGroupRepository $attributeGroupRepository,
protected AttributeRepository $attributeRepository,
protected AttributeGroupRepository $attributeGroupRepository,
App $app
)
{
$this->attributeRepository = $attributeRepository;
$this->attributeGroupRepository = $attributeGroupRepository;
parent::__construct($app);
}

View File

@ -9,13 +9,6 @@ use Webkul\Core\Eloquent\Repository;
class AttributeRepository extends Repository
{
/**
* Attribute option repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeOptionRepository
*/
protected $attributeOptionRepository;
/**
* Create a new repository instance.
*
@ -23,11 +16,10 @@ class AttributeRepository extends Repository
* @return void
*/
public function __construct(
AttributeOptionRepository $attributeOptionRepository,
protected AttributeOptionRepository $attributeOptionRepository,
App $app
) {
$this->attributeOptionRepository = $attributeOptionRepository;
)
{
parent::__construct($app);
}

View File

@ -18,25 +18,11 @@ use Webkul\Checkout\Models\CartItem;
class Booking
{
/**
* BookingProductRepository
*
* @return \Webkul\BookingProduct\Repositories\BookingProductRepository
*/
protected $bookingProductRepository;
/**
* @return array
*/
protected $typeRepositories = [];
/**
* BookingRepository
*
* @return \Webkul\BookingProduct\Repositories\BookingRepository
*/
protected $bookingRepository;
/**
* @return array
*/
@ -66,17 +52,15 @@ class Booking
* @return void
*/
public function __construct(
BookingProductRepository $bookingProductRepository,
protected BookingProductRepository $bookingProductRepository,
protected BookingRepository $bookingRepository,
BookingProductDefaultSlotRepository $bookingProductDefaultSlotRepository,
BookingProductAppointmentSlotRepository $bookingProductAppointmentSlotRepository,
BookingProductEventTicketRepository $bookingProductEventTicketRepository,
BookingProductRentalSlotRepository $bookingProductRentalSlotRepository,
BookingProductTableSlotRepository $bookingProductTableSlotRepository,
BookingRepository $bookingRepository
)
{
$this->bookingProductRepository = $bookingProductRepository;
$this->typeRepositories['default'] = $bookingProductDefaultSlotRepository;
$this->typeRepositories['appointment'] = $bookingProductAppointmentSlotRepository;
@ -86,8 +70,6 @@ class Booking
$this->typeRepositories['rental'] = $bookingProductRentalSlotRepository;
$this->typeRepositories['table'] = $bookingProductTableSlotRepository;
$this->bookingRepository = $bookingRepository;
}
/**

View File

@ -16,22 +16,13 @@ class BookingController extends Controller
*/
protected $_config;
/**
* BookingRepository object
*
* @var \Webkul\BookingProduct\Repositories\BookingRepository
*/
protected $bookingRepository;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct(BookingRepository $bookingRepository)
public function __construct(protected BookingRepository $bookingRepository)
{
$this->bookingRepository = $bookingRepository;
$this->_config = request('_config');
}

View File

@ -29,7 +29,7 @@ class BookingProductController extends Controller
* @return void
*/
public function __construct(
BookingProductRepository $bookingProductRepository,
protected BookingProductRepository $bookingProductRepository,
DefaultSlotHelper $defaultSlotHelper,
AppointmentSlotHelper $appointmentSlotHelper,
RentalSlotHelper $rentalSlotHelper,

View File

@ -6,22 +6,14 @@ use Webkul\BookingProduct\Repositories\BookingRepository;
class Order
{
/**
* BookingRepository Object
*
* @var \Webkul\BookingProduct\Repositories\BookingRepository
*/
protected $bookingRepository;
/**
* Create a new listener instance.
*
* @param \Webkul\Booking\Repositories\BookingRepository $bookingRepository
* @return void
*/
public function __construct(BookingRepository $bookingRepository)
public function __construct(protected BookingRepository $bookingRepository)
{
$this->bookingRepository = $bookingRepository;
}
/**

View File

@ -18,21 +18,11 @@ use Webkul\Product\Type\Virtual;
class Booking extends Virtual
{
/**
* BookingProductRepository instance
/** @var bool
*
* @var \Webkul\BookingProduct\Repositories\BookingProductRepository
*/
protected $bookingProductRepository;
/**
* Booking helper instance
* do not allow booking products to be copied, it would be too complicated.
*
* @var \Webkul\BookingProduct\Helpers\Booking
*/
protected $bookingHelper;
/** @var bool do not allow booking products to be copied, it would be too complicated. */
protected $canBeCopied = false;
/**
@ -66,9 +56,9 @@ class Booking extends Virtual
ProductAttributeValueRepository $attributeValueRepository,
ProductInventoryRepository $productInventoryRepository,
ProductImageRepository $productImageRepository,
BookingProductRepository $bookingProductRepository,
BookingHelper $bookingHelper,
ProductVideoRepository $productVideoRepository
ProductVideoRepository $productVideoRepository,
protected BookingProductRepository $bookingProductRepository,
protected BookingHelper $bookingHelper
)
{
parent::__construct(
@ -79,10 +69,6 @@ class Booking extends Virtual
$productImageRepository,
$productVideoRepository
);
$this->bookingProductRepository = $bookingProductRepository;
$this->bookingHelper = $bookingHelper;
}
/**

View File

@ -15,23 +15,14 @@ class PageController extends Controller
*/
protected $_config;
/**
* To hold the CMS repository instance.
*
* @var \Webkul\CMS\Repositories\CmsRepository
*/
protected $cmsRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\CMS\Repositories\CmsRepository $cmsRepository
* @return void
*/
public function __construct(CmsRepository $cmsRepository)
public function __construct(protected CmsRepository $cmsRepository)
{
$this->cmsRepository = $cmsRepository;
$this->_config = request('_config');
}

View File

@ -7,22 +7,14 @@ use Webkul\CMS\Repositories\CmsRepository;
class PagePresenterController extends Controller
{
/**
* CmsRepository object
*
* @var \Webkul\CMS\Repositories\CmsRepository
*/
protected $cmsRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\CMS\Repositories\CmsRepository $cmsRepository
* @return void
*/
public function __construct(CmsRepository $cmsRepository)
public function __construct(protected CmsRepository $cmsRepository)
{
$this->cmsRepository = $cmsRepository;
}
/**

View File

@ -15,48 +15,6 @@ use Webkul\CartRule\Repositories\CartRuleCouponUsageRepository;
class CartRule
{
/**
* CartRuleRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleRepository
*/
protected $cartRuleRepository;
/**
* CartRuleCouponRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleCouponRepository
*/
protected $cartRuleCouponRepository;
/**
* CartRuleCouponUsageRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleCouponUsageRepository
*/
protected $cartRuleCouponUsageRepository;
/**
* CartRuleCustomerRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleCustomerRepository
*/
protected $cartRuleCustomerRepository;
/**
* CustomerGroupRepository object
*
* @var \Webkul\Customer\Repositories\CustomerGroupRepository
*/
protected $customerGroupRepository;
/**
* Validator object
*
* @var \Webkul\Rule\Helpers\Validator
*/
protected $validator;
/**
* @var array
*/
@ -75,25 +33,14 @@ class CartRule
* @return void
*/
public function __construct(
CartRuleRepository $cartRuleRepository,
CartRuleCouponRepository $cartRuleCouponRepository,
CartRuleCouponUsageRepository $cartRuleCouponUsageRepository,
CartRuleCustomerRepository $cartRuleCustomerRepository,
CustomerGroupRepository $customerGroupRepository,
Validator $validator
protected CartRuleRepository $cartRuleRepository,
protected CartRuleCouponRepository $cartRuleCouponRepository,
protected CartRuleCouponUsageRepository $cartRuleCouponUsageRepository,
protected CartRuleCustomerRepository $cartRuleCustomerRepository,
protected CustomerGroupRepository $customerGroupRepository,
protected Validator $validator
)
{
$this->cartRuleRepository = $cartRuleRepository;
$this->cartRuleCouponRepository = $cartRuleCouponRepository;
$this->cartRuleCouponUsageRepository = $cartRuleCouponUsageRepository;
$this->cartRuleCustomerRepository = $cartRuleCustomerRepository;
$this->customerGroupRepository = $customerGroupRepository;
$this->validator = $validator;
}
/**

View File

@ -18,25 +18,15 @@ class CartRuleController extends Controller
*/
protected $_config;
/**
* To hold cart repository instance.
*
* @var \Webkul\CartRule\Repositories\CartRuleRepository
*/
protected $cartRuleRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\CartRule\Repositories\CartRuleRepository $cartRuleRepository
* @return void
*/
public function __construct(
CartRuleRepository $cartRuleRepository
) {
public function __construct(protected CartRuleRepository $cartRuleRepository)
{
$this->_config = request('_config');
$this->cartRuleRepository = $cartRuleRepository;
}
/**

View File

@ -7,22 +7,14 @@ use Webkul\CartRule\Repositories\CartRuleCouponRepository;
class CartRuleCouponController extends Controller
{
/**
* To hold cart rule coupon repository instance.
*
* @var \Webkul\CartRule\Repositories\CartRuleCouponRepository
*/
protected $cartRuleCouponRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\CartRule\Repositories\CartRuleCouponRepository $cartRuleCouponRepository
* @return void
*/
public function __construct(CartRuleCouponRepository $cartRuleCouponRepository)
public function __construct(protected CartRuleCouponRepository $cartRuleCouponRepository)
{
$this->cartRuleCouponRepository = $cartRuleCouponRepository;
}
/**

View File

@ -6,22 +6,14 @@ use Webkul\CartRule\Helpers\CartRule;
class Cart
{
/**
* CartRule object
*
* @var \Webkul\CartRule\Helpers\CartRule
*/
protected $cartRuleHepler;
/**
* Create a new listener instance.
*
* @param \Webkul\CartRule\Repositories\CartRule $cartRuleHepler
* @return void
*/
public function __construct(CartRule $cartRuleHepler)
public function __construct(protected CartRule $cartRuleHepler)
{
$this->cartRuleHepler = $cartRuleHepler;
}
/**

View File

@ -9,34 +9,6 @@ use Webkul\CartRule\Repositories\CartRuleCouponUsageRepository;
class Order
{
/**
* CartRuleRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleRepository
*/
protected $cartRuleRepository;
/**
* CartRuleCustomerRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleCustomerRepository
*/
protected $cartRuleCustomerRepository;
/**
* CartRuleCouponRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleCouponRepository
*/
protected $cartRuleCouponRepository;
/**
* CartRuleCouponUsageRepository object
*
* @var \Webkul\CartRule\Repositories\CartRuleCouponUsageRepository
*/
protected $cartRuleCouponUsageRepository;
/**
* Create a new listener instance.
*
@ -47,19 +19,12 @@ class Order
* @return void
*/
public function __construct(
CartRuleRepository $cartRuleRepository,
CartRuleCustomerRepository $cartRuleCustomerRepository,
CartRuleCouponRepository $cartRuleCouponRepository,
CartRuleCouponUsageRepository $cartRuleCouponUsageRepository
protected CartRuleRepository $cartRuleRepository,
protected CartRuleCustomerRepository $cartRuleCustomerRepository,
protected CartRuleCouponRepository $cartRuleCouponRepository,
protected CartRuleCouponUsageRepository $cartRuleCouponUsageRepository
)
{
$this->cartRuleRepository = $cartRuleRepository;
$this->cartRuleCustomerRepository = $cartRuleCustomerRepository;
$this->cartRuleCouponRepository = $cartRuleCouponRepository;
$this->cartRuleCouponUsageRepository = $cartRuleCouponUsageRepository;
}
/**

View File

@ -14,55 +14,6 @@ use Webkul\Tax\Repositories\TaxCategoryRepository;
class CartRuleRepository extends Repository
{
/**
* Attribute family repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeFamilyRepository
*/
protected $attributeFamilyRepository;
/**
* Attribute repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* Category repository instance.
*
* @var \Webkul\Category\Repositories\CategoryRepository
*/
protected $categoryRepository;
/**
* Cart rule coupon repository instance.
*
* @var \Webkul\CartRule\Repositories\CartRuleCouponRepository
*/
protected $cartRuleCouponRepository;
/**
* Tax category repository instance.
*
* @var \Webkul\Tax\Repositories\TaxCategoryRepository
*/
protected $taxCategoryRepository;
/**
* Country repository instance.
*
* @var \Webkul\Core\Repositories\CountryRepository
*/
protected $countryRepository;
/**
* Country state repository instance.
*
* @var \Webkul\Core\Repositories\CountryStateRepository
*/
protected $countryStateRepository;
/**
* Create a new repository instance.
*
@ -77,29 +28,16 @@ class CartRuleRepository extends Repository
* @return void
*/
public function __construct(
AttributeFamilyRepository $attributeFamilyRepository,
AttributeRepository $attributeRepository,
CategoryRepository $categoryRepository,
CartRuleCouponRepository $cartRuleCouponRepository,
TaxCategoryRepository $taxCategoryRepository,
CountryRepository $countryRepository,
CountryStateRepository $countryStateRepository,
protected AttributeFamilyRepository $attributeFamilyRepository,
protected AttributeRepository $attributeRepository,
protected CategoryRepository $categoryRepository,
protected CartRuleCouponRepository $cartRuleCouponRepository,
protected TaxCategoryRepository $taxCategoryRepository,
protected CountryRepository $countryRepository,
protected CountryStateRepository $countryStateRepository,
App $app
) {
$this->attributeFamilyRepository = $attributeFamilyRepository;
$this->attributeRepository = $attributeRepository;
$this->categoryRepository = $categoryRepository;
$this->cartRuleCouponRepository = $cartRuleCouponRepository;
$this->taxCategoryRepository = $taxCategoryRepository;
$this->countryRepository = $countryRepository;
$this->countryStateRepository = $countryStateRepository;
)
{
parent::__construct($app);
}

View File

@ -21,23 +21,14 @@ class PriceRuleIndex extends Command
*/
protected $description = 'Automatically updates catalog rule price index information (eg. rule_price)';
/**
* CatalogRuleIndex object
*
* @var \Webkul\CatalogRule\Helpers\CatalogRuleIndex
*/
protected $catalogRuleIndexHelper;
/**
* Create a new command instance.
*
* @param \Webkul\CatalogRuleProduct\Helpers\CatalogRuleIndex $catalogRuleIndexHelper
* @return void
*/
public function __construct(CatalogRuleIndex $catalogRuleIndexHelper)
public function __construct(protected CatalogRuleIndex $catalogRuleIndexHelper)
{
$this->catalogRuleIndexHelper = $catalogRuleIndexHelper;
parent::__construct();
}

View File

@ -7,27 +7,6 @@ use Webkul\CatalogRule\Repositories\CatalogRuleRepository;
class CatalogRuleIndex
{
/**
* CatalogRuleRepository object
*
* @var \Webkul\CatalogRule\Repositories\CatalogRuleRepository
*/
protected $catalogRuleRepository;
/**
* CatalogRuleProduct object
*
* @var \Webkul\CatalogRule\Helpers\CatalogRuleProduct
*/
protected $catalogRuleHelper;
/**
* CatalogRuleProductPrice object
*
* @var \Webkul\CatalogRule\Helpers\CatalogRuleProductPrice
*/
protected $catalogRuleProductPriceHelper;
/**
* Create a new helper instance.
*
@ -37,16 +16,11 @@ class CatalogRuleIndex
* @return void
*/
public function __construct(
CatalogRuleRepository $catalogRuleRepository,
CatalogRuleProduct $catalogRuleProductHelper,
CatalogRuleProductPrice $catalogRuleProductPriceHelper
protected CatalogRuleRepository $catalogRuleRepository,
protected CatalogRuleProduct $catalogRuleProductHelper,
protected CatalogRuleProductPrice $catalogRuleProductPriceHelper
)
{
$this->catalogRuleRepository = $catalogRuleRepository;
$this->catalogRuleProductHelper = $catalogRuleProductHelper;
$this->catalogRuleProductPriceHelper = $catalogRuleProductPriceHelper;
}
/**

View File

@ -11,34 +11,6 @@ use Webkul\Rule\Helpers\Validator;
class CatalogRuleProduct
{
/**
* AttributeRepository object
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* ProductRepository object
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* CatalogRuleProductRepository object
*
* @var \Webkul\CatalogRule\Repositories\CatalogRuleProductRepository
*/
protected $catalogRuleProductRepository;
/**
* Validator object
*
* @var \Webkul\Rule\Helpers\ValidatorValidator
*/
protected $validator;
/**
* Create a new helper instance.
*
@ -49,19 +21,12 @@ class CatalogRuleProduct
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
ProductRepository $productRepository,
CatalogRuleProductRepository $catalogRuleProductRepository,
Validator $validator
protected AttributeRepository $attributeRepository,
protected ProductRepository $productRepository,
protected CatalogRuleProductRepository $catalogRuleProductRepository,
protected Validator $validator
)
{
$this->attributeRepository = $attributeRepository;
$this->productRepository = $productRepository;
$this->catalogRuleProductRepository = $catalogRuleProductRepository;
$this->validator = $validator;
}
/**

View File

@ -8,27 +8,6 @@ use Webkul\CatalogRule\Repositories\CatalogRuleProductPriceRepository;
class CatalogRuleProductPrice
{
/**
* CatalogRuleProductPriceRepository object
*
* @var \Webkul\CatalogRule\Repositories\CatalogRuleProductPriceRepository
*/
protected $catalogRuleProductPriceRepository;
/**
* CatalogRuleProduct object
*
* @var \Webkul\CatalogRule\Helpers\CatalogRuleProduct
*/
protected $catalogRuleProductHelper;
/**
* CustomerGroupRepository object
*
* @var \Webkul\Customer\Repositories\CustomerGroupRepository
*/
protected $customerGroupRepository;
/**
* Create a new helper instance.
*
@ -38,16 +17,11 @@ class CatalogRuleProductPrice
* @return void
*/
public function __construct(
CatalogRuleProductPriceRepository $catalogRuleProductPriceRepository,
CatalogRuleProduct $catalogRuleProductHelper,
CustomerGroupRepository $customerGroupRepository
protected CatalogRuleProductPriceRepository $catalogRuleProductPriceRepository,
protected CatalogRuleProduct $catalogRuleProductHelper,
protected CustomerGroupRepository $customerGroupRepository
)
{
$this->catalogRuleProductPriceRepository = $catalogRuleProductPriceRepository;
$this->catalogRuleProductHelper = $catalogRuleProductHelper;
$this->customerGroupRepository = $customerGroupRepository;
}
/**

View File

@ -16,20 +16,6 @@ class CatalogRuleController extends Controller
*/
protected $_config;
/**
* To hold catalog repository instance.
*
* @var \Webkul\CatalogRule\Repositories\CatalogRuleRepository
*/
protected $catalogRuleRepository;
/**
* Catalog rule index.
*
* @var \Webkul\CatalogRule\Helpers\CatalogRuleIndex
*/
protected $catalogRuleIndexHelper;
/**
* Create a new controller instance.
*
@ -38,14 +24,11 @@ class CatalogRuleController extends Controller
* @return void
*/
public function __construct(
CatalogRuleRepository $catalogRuleRepository,
CatalogRuleIndex $catalogRuleIndexHelper
) {
protected CatalogRuleRepository $catalogRuleRepository,
protected CatalogRuleIndex $catalogRuleIndexHelper
)
{
$this->_config = request('_config');
$this->catalogRuleRepository = $catalogRuleRepository;
$this->catalogRuleIndexHelper = $catalogRuleIndexHelper;
}
/**

View File

@ -6,22 +6,14 @@ use Webkul\CatalogRule\Helpers\CatalogRuleIndex;
class Product
{
/**
* Product Repository Object
*
* @var \Webkul\CatalogRule\Helpers\CatalogRuleIndex
*/
protected $catalogRuleIndexHelper;
/**
* Create a new listener instance.
*
* @param \Webkul\CatalogRule\Helpers\CatalogRuleIndex $catalogRuleIndexHelper
* @return void
*/
public function __construct(CatalogRuleIndex $catalogRuleIndexHelper)
public function __construct(protected CatalogRuleIndex $catalogRuleIndexHelper)
{
$this->catalogRuleIndexHelper = $catalogRuleIndexHelper;
}
/**

View File

@ -12,34 +12,6 @@ use Webkul\Tax\Repositories\TaxCategoryRepository;
class CatalogRuleRepository extends Repository
{
/**
* Attribute family repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeFamilyRepository
*/
protected $attributeFamilyRepository;
/**
* Attribute repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* Category repository instance.
*
* @var \Webkul\Category\Repositories\CategoryRepository
*/
protected $categoryRepository;
/**
* Tax category repository instance.
*
* @var \Webkul\CaTaxtegory\Repositories\axCategoryRepository
*/
protected $taxCategoryRepository;
/**
* Create a new repository instance.
*
@ -51,20 +23,13 @@ class CatalogRuleRepository extends Repository
* @return void
*/
public function __construct(
AttributeFamilyRepository $attributeFamilyRepository,
AttributeRepository $attributeRepository,
CategoryRepository $categoryRepository,
TaxCategoryRepository $taxCategoryRepository,
protected AttributeFamilyRepository $attributeFamilyRepository,
protected AttributeRepository $attributeRepository,
protected CategoryRepository $categoryRepository,
protected TaxCategoryRepository $taxCategoryRepository,
App $app
) {
$this->attributeFamilyRepository = $attributeFamilyRepository;
$this->attributeRepository = $attributeRepository;
$this->categoryRepository = $categoryRepository;
$this->taxCategoryRepository = $taxCategoryRepository;
)
{
parent::__construct($app);
}

View File

@ -18,20 +18,6 @@ class CategoryController extends Controller
*/
protected $_config;
/**
* Category repository instance.
*
* @var \Webkul\Category\Repositories\CategoryRepository
*/
protected $categoryRepository;
/**
* Attribute repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* Create a new controller instance.
*
@ -40,13 +26,10 @@ class CategoryController extends Controller
* @return void
*/
public function __construct(
CategoryRepository $categoryRepository,
AttributeRepository $attributeRepository
) {
$this->categoryRepository = $categoryRepository;
$this->attributeRepository = $attributeRepository;
protected CategoryRepository $categoryRepository,
protected AttributeRepository $attributeRepository
)
{
$this->_config = request('_config');
}

View File

@ -25,55 +25,6 @@ class Cart
{
use CartCoupons, CartTools, CartValidators;
/**
* Cart repository instance.
*
* @var \Webkul\Checkout\Repositories\CartRepository
*/
protected $cartRepository;
/**
* Cart item repository instance.
*
* @var \Webkul\Checkout\Repositories\CartItemRepository
*/
protected $cartItemRepository;
/**
* Cart address repository instance.
*
* @var \Webkul\Checkout\Repositories\CartAddressRepository
*/
protected $cartAddressRepository;
/**
* Product repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* Tax category repository instance.
*
* @var \Webkul\Tax\Repositories\TaxCategoryRepository
*/
protected $taxCategoryRepository;
/**
* Wishlist repository instance.
*
* @var \Webkul\Customer\Repositories\WishlistRepository
*/
protected $wishlistRepository;
/**
* Customer address repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerAddressRepository
*/
protected $customerAddressRepository;
/**
* Create a new class instance.
*
@ -87,27 +38,15 @@ class Cart
* @return void
*/
public function __construct(
CartRepository $cartRepository,
CartItemRepository $cartItemRepository,
CartAddressRepository $cartAddressRepository,
ProductRepository $productRepository,
TaxCategoryRepository $taxCategoryRepository,
WishlistRepository $wishlistRepository,
CustomerAddressRepository $customerAddressRepository
) {
$this->cartRepository = $cartRepository;
$this->cartItemRepository = $cartItemRepository;
$this->cartAddressRepository = $cartAddressRepository;
$this->productRepository = $productRepository;
$this->taxCategoryRepository = $taxCategoryRepository;
$this->wishlistRepository = $wishlistRepository;
$this->customerAddressRepository = $customerAddressRepository;
protected CartRepository $cartRepository,
protected CartItemRepository $cartItemRepository,
protected CartAddressRepository $cartAddressRepository,
protected ProductRepository $productRepository,
protected TaxCategoryRepository $taxCategoryRepository,
protected WishlistRepository $wishlistRepository,
protected CustomerAddressRepository $customerAddressRepository
)
{
}
/**

View File

@ -23,62 +23,6 @@ class Core
*/
const BAGISTO_VERSION = '1.x-dev';
/**
* Channel repository instance.
*
* @var \Webkul\Core\Repositories\ChannelRepository
*/
protected $channelRepository;
/**
* Currency repository instance.
*
* @var \Webkul\Core\Repositories\CurrencyRepository
*/
protected $currencyRepository;
/**
* Exchange rate repository instance.
*
* @var \Webkul\Core\Repositories\ExchangeRateRepository
*/
protected $exchangeRateRepository;
/**
* Country repository instance.
*
* @var \Webkul\Core\Repositories\CountryRepository
*/
protected $countryRepository;
/**
* Country state repository instance.
*
* @var \Webkul\Core\Repositories\CountryStateRepository
*/
protected $countryStateRepository;
/**
* Locale repository instance.
*
* @var \Webkul\Core\Repositories\LocaleRepository
*/
protected $localeRepository;
/**
* Customer group repository instance.
*
* @var CustomerGroupRepository
*/
protected $customerGroupRepository;
/**
* Core config repository instance.
*
* @var \Webkul\Core\Repositories\CoreConfigRepository
*/
protected $coreConfigRepository;
/**
* Channel.
*
@ -116,30 +60,16 @@ class Core
* @return void
*/
public function __construct(
ChannelRepository $channelRepository,
CurrencyRepository $currencyRepository,
ExchangeRateRepository $exchangeRateRepository,
CountryRepository $countryRepository,
CountryStateRepository $countryStateRepository,
LocaleRepository $localeRepository,
CustomerGroupRepository $customerGroupRepository,
CoreConfigRepository $coreConfigRepository
) {
$this->channelRepository = $channelRepository;
$this->currencyRepository = $currencyRepository;
$this->exchangeRateRepository = $exchangeRateRepository;
$this->countryRepository = $countryRepository;
$this->countryStateRepository = $countryStateRepository;
$this->localeRepository = $localeRepository;
$this->customerGroupRepository = $customerGroupRepository;
$this->coreConfigRepository = $coreConfigRepository;
protected ChannelRepository $channelRepository,
protected CurrencyRepository $currencyRepository,
protected ExchangeRateRepository $exchangeRateRepository,
protected CountryRepository $countryRepository,
protected CountryStateRepository $countryStateRepository,
protected LocaleRepository $localeRepository,
protected CustomerGroupRepository $customerGroupRepository,
protected CoreConfigRepository $coreConfigRepository
)
{
}
/**

View File

@ -22,20 +22,6 @@ class ExchangeRates extends ExchangeRate
*/
protected $apiEndPoint;
/**
* CurrencyRepository $currencyRepository
*
* @var \Webkul\Core\Repositories\CurrencyRepository
*/
protected $currencyRepository;
/**
* ExchangeRateRepository $exchangeRateRepository
*
* @var \Webkul\Core\Repositories\ExchangeRateRepository
*/
protected $exchangeRateRepository;
/**
* Create a new helper instance.
*
@ -44,14 +30,10 @@ class ExchangeRates extends ExchangeRate
* @return void
*/
public function __construct(
CurrencyRepository $currencyRepository,
ExchangeRateRepository $exchangeRateRepository
protected CurrencyRepository $currencyRepository,
protected ExchangeRateRepository $exchangeRateRepository
)
{
$this->currencyRepository = $currencyRepository;
$this->exchangeRateRepository = $exchangeRateRepository;
$this->apiEndPoint = 'https://api.exchangeratesapi.io/latest';
$this->apiKey = config('services.exchange-api.exchange_rates.key');

View File

@ -22,20 +22,6 @@ class FixerExchange extends ExchangeRate
*/
protected $apiEndPoint;
/**
* Holds CurrencyRepository instance
*
* @var \Webkul\Core\Repositories\CurrencyRepository
*/
protected $currencyRepository;
/**
* Holds ExchangeRateRepository instance
*
* @var \Webkul\Core\Repositories\ExchangeRateRepository
*/
protected $exchangeRateRepository;
/**
* Create a new helper instance.
*
@ -44,14 +30,10 @@ class FixerExchange extends ExchangeRate
* @return void
*/
public function __construct(
CurrencyRepository $currencyRepository,
ExchangeRateRepository $exchangeRateRepository
protected CurrencyRepository $currencyRepository,
protected ExchangeRateRepository $exchangeRateRepository
)
{
$this->currencyRepository = $currencyRepository;
$this->exchangeRateRepository = $exchangeRateRepository;
$this->apiEndPoint = 'http://data.fixer.io/api';
$this->apiKey = config('services.exchange-api')['fixer']['key'];

View File

@ -14,23 +14,14 @@ class ChannelController extends Controller
*/
protected $_config;
/**
* Channel repository instance.
*
* @var \Webkul\Core\Repositories\ChannelRepository
*/
protected $channelRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Core\Repositories\ChannelRepository $channelRepository
* @return void
*/
public function __construct(ChannelRepository $channelRepository)
public function __construct(protected ChannelRepository $channelRepository)
{
$this->channelRepository = $channelRepository;
$this->_config = request('_config');
}

View File

@ -14,20 +14,6 @@ class CountryStateController extends Controller
*/
protected $_config;
/**
* CountryRepository object
*
* @var \Webkul\Core\Repositories\CountryRepository
*/
protected $countryRepository;
/**
* CountryStateRepository object
*
* @var Webkul\Core\Repositories\CountryStateRepository
*/
protected $countryStateRepository;
/**
* Create a new controller instance.
*
@ -36,14 +22,10 @@ class CountryStateController extends Controller
* @return void
*/
public function __construct(
CountryRepository $countryRepository,
CountryStateRepository $countryStateRepository
protected CountryRepository $countryRepository,
protected CountryStateRepository $countryStateRepository
)
{
$this->countryRepository = $countryRepository;
$this->countryStateRepository = $countryStateRepository;
$this->_config = request('_config');
}

View File

@ -14,23 +14,14 @@ class CurrencyController extends Controller
*/
protected $_config;
/**
* Currency repository instance.
*
* @var \Webkul\Core\Repositories\CurrencyRepository
*/
protected $currencyRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Core\Repositories\CurrencyRepository $currencyRepository
* @return void
*/
public function __construct(CurrencyRepository $currencyRepository)
public function __construct(protected CurrencyRepository $currencyRepository)
{
$this->currencyRepository = $currencyRepository;
$this->_config = request('_config');
}

View File

@ -15,20 +15,6 @@ class ExchangeRateController extends Controller
*/
protected $_config;
/**
* Exchange rate repository instance.
*
* @var \Webkul\Core\Repositories\ExchangeRateRepository
*/
protected $exchangeRateRepository;
/**
* Currency repository instance.
*
* @var \Webkul\Core\Repositories\CurrencyRepository
*/
protected $currencyRepository;
/**
* Create a new controller instance.
*
@ -37,13 +23,10 @@ class ExchangeRateController extends Controller
* @return void
*/
public function __construct(
ExchangeRateRepository $exchangeRateRepository,
CurrencyRepository $currencyRepository
) {
$this->exchangeRateRepository = $exchangeRateRepository;
$this->currencyRepository = $currencyRepository;
protected ExchangeRateRepository $exchangeRateRepository,
protected CurrencyRepository $currencyRepository
)
{
$this->_config = request('_config');
}

View File

@ -14,23 +14,14 @@ class LocaleController extends Controller
*/
protected $_config;
/**
* Locale repository instance.
*
* @var \Webkul\Core\Repositories\LocaleRepository
*/
protected $localeRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Core\Repositories\LocaleRepository $localeRepository
* @return void
*/
public function __construct(LocaleRepository $localeRepository)
public function __construct(protected LocaleRepository $localeRepository)
{
$this->localeRepository = $localeRepository;
$this->_config = request('_config');
}

View File

@ -14,30 +14,14 @@ class SliderController extends Controller
*/
protected $_config;
/**
* Slider repository instance.
*
* @var \Webkul\Core\Repositories\SliderRepository
*/
protected $sliderRepository;
/**
* Channels.
*
* @var array
*/
protected $channels;
/**
* Create a new controller instance.
*
* @param \Webkul\Core\Repositories\SliderRepository $sliderRepository
* @return void
*/
public function __construct(SliderRepository $sliderRepository)
public function __construct(protected SliderRepository $sliderRepository)
{
$this->sliderRepository = $sliderRepository;
$this->_config = request('_config');
}

View File

@ -14,23 +14,14 @@ class SubscriptionController extends Controller
*/
protected $_config;
/**
* Subscribers list repository.
*
* @var \Webkul\Core\Repositories\SubscribersListRepository
*/
protected $subscribersListRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Core\Repositories\SubscribersListRepository $subscribersListRepository
* @return void
*/
public function __construct(SubscribersListRepository $subscribersListRepository)
public function __construct(protected SubscribersListRepository $subscribersListRepository)
{
$this->subscribersListRepository = $subscribersListRepository;
$this->_config = request('_config');
}

View File

@ -14,13 +14,6 @@ class SliderRepository extends Repository
{
use CacheableRepository;
/**
* Channel repository instance.
*
* @var \Webkul\Core\Repositories\ChannelRepository
*/
protected $channelRepository;
/**
* Create a new repository instance.
*
@ -29,11 +22,10 @@ class SliderRepository extends Repository
* @return void
*/
public function __construct(
ChannelRepository $channelRepository,
protected ChannelRepository $channelRepository,
App $app
) {
$this->channelRepository = $channelRepository;
)
{
parent::__construct($app);
}

View File

@ -21,26 +21,17 @@ class AddressController extends Controller
*/
protected $customer;
/**
* Customer address repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerAddressRepository
*/
protected $customerAddressRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Customer\Repositories\CustomerAddressRepository $customerAddressRepository
* @return void
*/
public function __construct(CustomerAddressRepository $customerAddressRepository)
public function __construct(protected CustomerAddressRepository $customerAddressRepository)
{
$this->_config = request('_config');
$this->customer = auth()->guard('customer')->user();
$this->customerAddressRepository = $customerAddressRepository;
}
/**

View File

@ -20,27 +20,6 @@ class CustomerController extends Controller
*/
protected $_config;
/**
* Customer repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerRepository
*/
protected $customerRepository;
/**
* Product review repository instance.
*
* @var \Webkul\Customer\Repositories\ProductReviewRepository
*/
protected $productReviewRepository;
/**
* Subscribers list repository instance.
*
* @var \Webkul\Core\Repositories\SubscribersListRepository
*/
protected $subscriptionRepository;
/**
* Create a new controller instance.
*
@ -50,17 +29,12 @@ class CustomerController extends Controller
* @return void
*/
public function __construct(
CustomerRepository $customerRepository,
ProductReviewRepository $productReviewRepository,
SubscribersListRepository $subscriptionRepository
) {
protected CustomerRepository $customerRepository,
protected ProductReviewRepository $productReviewRepository,
protected SubscribersListRepository $subscriptionRepository
)
{
$this->_config = request('_config');
$this->customerRepository = $customerRepository;
$this->productReviewRepository = $productReviewRepository;
$this->subscriptionRepository = $subscriptionRepository;
}
/**

View File

@ -23,27 +23,6 @@ class RegistrationController extends Controller
*/
protected $_config;
/**
* Customer repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerRepository
*/
protected $customerRepository;
/**
* Customer group repository instance.
*
* @var \Webkul\Customer\Repositories\CustomerGroupRepository
*/
protected $customerGroupRepository;
/**
* Subscribers list repository instance.
*
* @var \Webkul\Core\Repositories\SubscribersListRepository
*/
protected $subscriptionRepository;
/**
* Create a new controller instance.
*
@ -53,17 +32,12 @@ class RegistrationController extends Controller
* @return void
*/
public function __construct(
CustomerRepository $customerRepository,
CustomerGroupRepository $customerGroupRepository,
SubscribersListRepository $subscriptionRepository
) {
protected CustomerRepository $customerRepository,
protected CustomerGroupRepository $customerGroupRepository,
protected SubscribersListRepository $subscriptionRepository
)
{
$this->_config = request('_config');
$this->customerRepository = $customerRepository;
$this->customerGroupRepository = $customerGroupRepository;
$this->subscriptionRepository = $subscriptionRepository;
}
/**

View File

@ -23,20 +23,6 @@ class WishlistController extends Controller
*/
protected $currentCustomer;
/**
* Product repository instance.
*
* @var \Webkul\Customer\Repositories\WishlistRepository
*/
protected $wishlistRepository;
/**
* Wishlist repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* Create a new controller instance.
*
@ -45,15 +31,12 @@ class WishlistController extends Controller
* @return void
*/
public function __construct(
WishlistRepository $wishlistRepository,
ProductRepository $productRepository
) {
protected WishlistRepository $wishlistRepository,
protected ProductRepository $productRepository
)
{
$this->_config = request('_config');
$this->wishlistRepository = $wishlistRepository;
$this->productRepository = $productRepository;
$this->currentCustomer = auth()->guard('customer')->user();
}

View File

@ -24,13 +24,6 @@ class RegistrationEmail extends Mailable
*/
public $selectedMailType;
/**
* Request data.
*
* @var array
*/
public $data;
/**
* Create a new mailable instance.
*
@ -38,7 +31,10 @@ class RegistrationEmail extends Mailable
* @param string $mailType
* @return void
*/
public function __construct($data, $mailType)
public function __construct(
public $data,
$mailType
)
{
$this->data = $data;

View File

@ -11,20 +11,14 @@ class VerificationEmail extends Mailable
{
use Queueable, SerializesModels;
/**
* @var array
*/
public $verificationData;
/**
* Create a new mailable instance.
*
* @param array $verificationData
* @return void
*/
public function __construct($verificationData)
public function __construct(public $verificationData)
{
$this->verificationData = $verificationData;
}
/**

View File

@ -10,22 +10,14 @@ class CustomerUpdatePassword extends Mailable
{
use Queueable, SerializesModels;
/**
* The customer instance.
*
* @var \Webkul\Customer\Models\Customer $customer
*/
public $customer;
/**
* Create a new message instance.
*
* @param \Webkul\Customer\Models\Customer $customer
* @return void
*/
public function __construct($customer)
public function __construct(public $customer)
{
$this->customer = $customer;
}
/**

View File

@ -15,23 +15,14 @@ class InventorySourceController extends Controller
*/
protected $_config;
/**
* Inventory source repository instance.
*
* @var \Webkul\Inventory\Repositories\InventorySourceRepository
*/
protected $inventorySourceRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Inventory\Repositories\InventorySourceRepository $inventorySourceRepository
* @return void
*/
public function __construct(InventorySourceRepository $inventorySourceRepository)
public function __construct(protected InventorySourceRepository $inventorySourceRepository)
{
$this->inventorySourceRepository = $inventorySourceRepository;
$this->_config = request('_config');
}

View File

@ -21,23 +21,14 @@ class EmailsCommand extends Command
*/
protected $description = 'Process campaigns and send emails to the subscribed customers.';
/**
* Campaign object
*
* @var \Webkul\Marketing\Helpers\Campaign
*/
protected $campaignHelper;
/**
* Create a new command instance.
*
* @param \Webkul\Marketing\Repositories\Campaign $campaignHelper
* @return void
*/
public function __construct(Campaign $campaignHelper)
public function __construct(protected Campaign $campaignHelper)
{
$this->campaignHelper = $campaignHelper;
parent::__construct();
}

View File

@ -11,27 +11,6 @@ use Webkul\Marketing\Repositories\EventRepository;
class Campaign
{
/**
* EventRepository object
*
* @var \Webkul\Marketing\Repositories\EventRepository
*/
protected $eventRepository;
/**
* CampaignRepository object
*
* @var \Webkul\Marketing\Repositories\CampaignRepository
*/
protected $campaignRepository;
/**
* TemplateRepository object
*
* @var \Webkul\Marketing\Repositories\TemplateRepository
*/
protected $templateRepository;
/**
* Create a new helper instance.
*
@ -42,15 +21,11 @@ class Campaign
* @return void
*/
public function __construct(
EventRepository $eventRepository,
CampaignRepository $campaignRepository,
CampaignRepository $templateRepository
) {
$this->eventRepository = $eventRepository;
$this->campaignRepository = $campaignRepository;
$this->templateRepository = $templateRepository;
protected EventRepository $eventRepository,
protected CampaignRepository $campaignRepository,
protected CampaignRepository $templateRepository
)
{
}
/**

View File

@ -14,23 +14,14 @@ class CampaignController extends Controller
*/
protected $_config;
/**
* Campaign repository instance.
*
* @var \Webkul\Marketing\Repositories\CampaignRepository
*/
protected $campaignRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Marketing\Repositories\CampaignRepository $campaignRepository
* @return void
*/
public function __construct(CampaignRepository $campaignRepository)
public function __construct(protected CampaignRepository $campaignRepository)
{
$this->campaignRepository = $campaignRepository;
$this->_config = request('_config');
}

View File

@ -14,23 +14,14 @@ class EventController extends Controller
*/
protected $_config;
/**
* Event repository instance.
*
* @var \Webkul\Marketing\Repositories\EventRepository
*/
protected $eventRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Marketing\Repositories\EventRepository $eventRepository
* @return void
*/
public function __construct(EventRepository $eventRepository)
public function __construct(protected EventRepository $eventRepository)
{
$this->eventRepository = $eventRepository;
$this->_config = request('_config');
}

View File

@ -14,23 +14,14 @@ class TemplateController extends Controller
*/
protected $_config;
/**
* Template repository instance.
*
* @var \Webkul\Marketing\Repositories\TemplateRepository
*/
protected $templateRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Marketing\Repositories\TemplateRepository $templateRepository
* @return void
*/
public function __construct(TemplateRepository $templateRepository)
public function __construct(protected TemplateRepository $templateRepository)
{
$this->templateRepository = $templateRepository;
$this->_config = request('_config');
}

View File

@ -11,18 +11,6 @@ class NewsletterMail extends Mailable
{
use Queueable, SerializesModels;
/**
* @var string
*/
public $email;
/**
* The campaign instance.
*
* @var \Webkul\Marketing\Contracts\Campaign
*/
public $campaign;
/**
* Create a new message instance.
*
@ -30,11 +18,11 @@ class NewsletterMail extends Mailable
* @param \Webkul\Marketing\Contracts\Campaign $campaign
* @return void
*/
public function __construct($email, $campaign)
public function __construct(
public $email,
public $campaign
)
{
$this->email = $email;
$this->campaign = $campaign;
}
/**

View File

@ -12,16 +12,13 @@ class UpdateOrderNotification implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
protected $data;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($data)
public function __construct(protected $data)
{
$this->data = $data;
}
/**

View File

@ -14,22 +14,13 @@ class NotificationController extends Controller
*/
protected $_config;
/**
* Notification repository instance.
*
* @var object
*/
protected $notificationRepository;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct(NotificationRepository $notificationRepository)
public function __construct(protected NotificationRepository $notificationRepository)
{
$this->notificationRepository = $notificationRepository;
$this->_config = request('_config');
}

View File

@ -9,21 +9,13 @@ use Webkul\Notification\Events\UpdateOrderNotification;
class Order
{
/**
* NotificationRepository
*
* @var object
*/
protected $notificationRepository;
/**
* Create a new listener instance.
*
* @return void
*/
public function __construct(NotificationRepository $notificationRepository)
public function __construct(protected NotificationRepository $notificationRepository)
{
$this->notificationRepository = $notificationRepository;
}
/**

View File

@ -13,20 +13,6 @@ use Webkul\Sales\Repositories\InvoiceRepository;
*/
class GenerateInvoice
{
/**
* OrderRepository object
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* InvoiceRepository object
*
* @var \Webkul\Sales\Repositories\InvoiceRepository
*/
protected $invoiceRepository;
/**
* Create the event listener.
*
@ -35,12 +21,10 @@ class GenerateInvoice
* @return void
*/
public function __construct(
OrderRepository $orderRepository,
InvoiceRepository $invoiceRepository
protected OrderRepository $orderRepository,
protected InvoiceRepository $invoiceRepository
)
{
$this->orderRepository = $orderRepository;
$this->invoiceRepository = $invoiceRepository;
}
/**

View File

@ -15,34 +15,12 @@ class Ipn
*/
protected $post;
/**
* Standard $paypalStandard
*
* @var \Webkul\Paypal\Payment\Standard
*/
protected $paypalStandard;
/**
* Order $order
*
* @var \Webkul\Sales\Contracts\Order
*/
protected $order;
/**
* OrderRepository $orderRepository
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* InvoiceRepository $invoiceRepository
*
* @var \Webkul\Sales\Repositories\InvoiceRepository
*/
protected $invoiceRepository;
/**
* Create a new helper instance.
*
@ -52,16 +30,11 @@ class Ipn
* @return void
*/
public function __construct(
Standard $paypalStandard,
OrderRepository $orderRepository,
InvoiceRepository $invoiceRepository
protected Standard $paypalStandard,
protected OrderRepository $orderRepository,
protected InvoiceRepository $invoiceRepository
)
{
$this->paypalStandard = $paypalStandard;
$this->orderRepository = $orderRepository;
$this->invoiceRepository = $invoiceRepository;
}
/**

View File

@ -9,27 +9,6 @@ use Webkul\Sales\Repositories\InvoiceRepository;
class SmartButtonController extends Controller
{
/**
* SmartButton $smartButton
*
* @var \Webkul\Paypal\Payment\SmartButton
*/
protected $smartButton;
/**
* OrderRepository $orderRepository
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* InvoiceRepository $invoiceRepository
*
* @var \Webkul\Sales\Repositories\InvoiceRepository
*/
protected $invoiceRepository;
/**
* Create a new controller instance.
*
@ -39,16 +18,11 @@ class SmartButtonController extends Controller
* @return void
*/
public function __construct(
SmartButton $smartButton,
OrderRepository $orderRepository,
InvoiceRepository $invoiceRepository
protected SmartButton $smartButton,
protected OrderRepository $orderRepository,
protected InvoiceRepository $invoiceRepository
)
{
$this->smartButton = $smartButton;
$this->orderRepository = $orderRepository;
$this->invoiceRepository = $invoiceRepository;
}
/**

View File

@ -8,20 +8,6 @@ use Webkul\Sales\Repositories\OrderRepository;
class StandardController extends Controller
{
/**
* OrderRepository $orderRepository
*
* @var \Webkul\Sales\Repositories\OrderRepository
*/
protected $orderRepository;
/**
* IPN $ipnHelper
*
* @var \Webkul\Paypal\Helpers\Ipn
*/
protected $ipnHelper;
/**
* Create a new controller instance.
*
@ -30,13 +16,10 @@ class StandardController extends Controller
* @return void
*/
public function __construct(
OrderRepository $orderRepository,
Ipn $ipnHelper
protected OrderRepository $orderRepository,
protected Ipn $ipnHelper
)
{
$this->orderRepository = $orderRepository;
$this->ipnHelper = $ipnHelper;
}
/**

View File

@ -7,20 +7,6 @@ use Webkul\Sales\Repositories\OrderTransactionRepository;
class Transaction
{
/**
* SmartButton $smartButton
*
* @var \Webkul\Paypal\Payment\SmartButton
*/
protected $smartButton;
/**
* OrderTransactionRepository object
*
* @var \Webkul\Sales\Repositories\OrderTransactionRepository
*/
protected $orderTransactionRepository;
/**
* Create a new listener instance.
*
@ -29,13 +15,10 @@ class Transaction
* @return void
*/
public function __construct(
SmartButton $smartButton,
OrderTransactionRepository $orderTransactionRepository
protected SmartButton $smartButton,
protected OrderTransactionRepository $orderTransactionRepository
)
{
$this->smartButton = $smartButton;
$this->orderTransactionRepository = $orderTransactionRepository;
}
/**

View File

@ -21,23 +21,14 @@ class PriceUpdate extends Command
*/
protected $description = 'Automatically updates product information (eg. min_price and max_price)';
/**
* ProductFlatRepository object
*
* @var \Webkul\Product\Repositories\ProductFlatRepository
*/
protected $productFlatRepository;
/**
* Create a new command instance.
*
* @param ]Webkul\Product\Repositories\ProductFlatRepository $productFlatRepository
* @return void
*/
public function __construct(ProductFlatRepository $productFlatRepository)
public function __construct(protected ProductFlatRepository $productFlatRepository)
{
$this->productFlatRepository = $productFlatRepository;
parent::__construct();
}

View File

@ -15,20 +15,6 @@ use Illuminate\Support\Str;
*/
class GenerateProduct
{
/**
* Product Repository instance
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* AttributeFamily Repository instance
*
* @var \Webkul\Product\Repositories\AttributeFamilyRepository
*/
protected $attributeFamilyRepository;
/**
* Product Attribute Types
*
@ -44,14 +30,10 @@ class GenerateProduct
* @return void
*/
public function __construct(
ProductRepository $productRepository,
AttributeFamilyRepository $attributeFamilyRepository
protected ProductRepository $productRepository,
protected AttributeFamilyRepository $attributeFamilyRepository
)
{
$this->productRepository = $productRepository;
$this->attributeFamilyRepository = $attributeFamilyRepository;
$this->types = [
'text',
'textarea',

View File

@ -28,62 +28,6 @@ class ProductController extends Controller
*/
protected $_config;
/**
* Category repository instance.
*
* @var \Webkul\Category\Repositories\CategoryRepository
*/
protected $categoryRepository;
/**
* Product repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* Product downloadable link repository instance.
*
* @var \Webkul\Product\Repositories\ProductDownloadableLinkRepository
*/
protected $productDownloadableLinkRepository;
/**
* Product downloadable sample repository instance.
*
* @var \Webkul\Product\Repositories\ProductDownloadableSampleRepository
*/
protected $productDownloadableSampleRepository;
/**
* Attribute family repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeFamilyRepository
*/
protected $attributeFamilyRepository;
/**
* Inventory source repository instance.
*
* @var \Webkul\Inventory\Repositories\InventorySourceRepository
*/
protected $inventorySourceRepository;
/**
* Product attribute value repository instance.
*
* @var \Webkul\Product\Repositories\ProductAttributeValueRepository
*/
protected $productAttributeValueRepository;
/**
* Product inventory repository instance.
*
* @var \Webkul\Product\Repositories\ProductInventoryRepository
*/
protected $productInventoryRepository;
/**
* Create a new controller instance.
*
@ -97,32 +41,17 @@ class ProductController extends Controller
* @return void
*/
public function __construct(
CategoryRepository $categoryRepository,
ProductRepository $productRepository,
ProductDownloadableLinkRepository $productDownloadableLinkRepository,
ProductDownloadableSampleRepository $productDownloadableSampleRepository,
AttributeFamilyRepository $attributeFamilyRepository,
InventorySourceRepository $inventorySourceRepository,
ProductAttributeValueRepository $productAttributeValueRepository,
ProductInventoryRepository $productInventoryRepository
) {
protected CategoryRepository $categoryRepository,
protected ProductRepository $productRepository,
protected ProductDownloadableLinkRepository $productDownloadableLinkRepository,
protected ProductDownloadableSampleRepository $productDownloadableSampleRepository,
protected AttributeFamilyRepository $attributeFamilyRepository,
protected InventorySourceRepository $inventorySourceRepository,
protected ProductAttributeValueRepository $productAttributeValueRepository,
protected ProductInventoryRepository $productInventoryRepository
)
{
$this->_config = request('_config');
$this->categoryRepository = $categoryRepository;
$this->productRepository = $productRepository;
$this->productDownloadableLinkRepository = $productDownloadableLinkRepository;
$this->productDownloadableSampleRepository = $productDownloadableSampleRepository;
$this->attributeFamilyRepository = $attributeFamilyRepository;
$this->inventorySourceRepository = $inventorySourceRepository;
$this->productAttributeValueRepository = $productAttributeValueRepository;
$this->productInventoryRepository = $productInventoryRepository;
}
/**

View File

@ -15,23 +15,14 @@ class ReviewController extends Controller
*/
protected $_config;
/**
* Product review repository instance.
*
* @var \Webkul\Product\Repositories\ProductReviewRepository
*/
protected $productReviewRepository;
/**
* Create a new controller instance.
*
* @param \Webkul\Product\Repositories\ProductReviewRepository $productReview
* @return void
*/
public function __construct(ProductReviewRepository $productReviewRepository)
public function __construct(protected ProductReviewRepository $productReviewRepository)
{
$this->productReviewRepository = $productReviewRepository;
$this->_config = request('_config');
}

View File

@ -12,20 +12,6 @@ use Webkul\Product\Repositories\ProductRepository;
class ProductForm extends FormRequest
{
/**
* Product repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* Product attribute value repository instnace.
*
* @var \Webkul\Product\Repositories\ProductAttributeValueRepository
*/
protected $productAttributeValueRepository;
/**
* Rules.
*
@ -41,12 +27,10 @@ class ProductForm extends FormRequest
* @return void
*/
public function __construct(
ProductRepository $productRepository,
ProductAttributeValueRepository $productAttributeValueRepository
) {
$this->productRepository = $productRepository;
$this->productAttributeValueRepository = $productAttributeValueRepository;
protected ProductRepository $productRepository,
protected ProductAttributeValueRepository $productAttributeValueRepository
)
{
}
/**

View File

@ -13,34 +13,6 @@ use Webkul\Product\Models\ProductAttributeValue;
class ProductFlat
{
/**
* AttributeRepository Repository Object
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* AttributeOptionRepository Repository Object
*
* @var \Webkul\Attribute\Repositories\AttributeOptionRepository
*/
protected $attributeOptionRepository;
/**
* ProductFlatRepository Repository Object
*
* @var \Webkul\Product\Repositories\ProductFlatRepository
*/
protected $productFlatRepository;
/**
* ProductAttributeValueRepository Repository Object
*
* @var \Webkul\Product\Repositories\ProductAttributeValueRepository
*/
protected $productAttributeValueRepository;
/**
* Attribute Object
*
@ -88,19 +60,12 @@ class ProductFlat
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
AttributeOptionRepository $attributeOptionRepository,
ProductFlatRepository $productFlatRepository,
ProductAttributeValueRepository $productAttributeValueRepository
protected AttributeRepository $attributeRepository,
protected AttributeOptionRepository $attributeOptionRepository,
protected ProductFlatRepository $productFlatRepository,
protected ProductAttributeValueRepository $productAttributeValueRepository
)
{
$this->attributeRepository = $attributeRepository;
$this->attributeOptionRepository = $attributeOptionRepository;
$this->productAttributeValueRepository = $productAttributeValueRepository;
$this->productFlatRepository = $productFlatRepository;
}
/**

View File

@ -8,23 +8,14 @@ use Webkul\Product\Repositories\ProductRepository;
class ProductImage extends AbstractProduct
{
/**
* Product repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* Create a new helper instance.
*
* @param \Webkul\Product\Repositories\ProductRepository $productRepository
* @return void
*/
public function __construct(
ProductRepository $productRepository
) {
$this->productRepository = $productRepository;
public function __construct(protected ProductRepository $productRepository)
{
}
/**

View File

@ -9,13 +9,6 @@ use Webkul\Product\Models\ProductAttributeValueProxy;
class ProductAttributeValueRepository extends Repository
{
/**
* AttributeRepository object
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* Create a new reposotory instance.
*
@ -24,12 +17,10 @@ class ProductAttributeValueRepository extends Repository
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
protected AttributeRepository $attributeRepository,
App $app
)
{
$this->attributeRepository = $attributeRepository;
parent::__construct($app);
}

View File

@ -8,13 +8,6 @@ use Illuminate\Support\Str;
class ProductBundleOptionRepository extends Repository
{
/**
* ProductBundleOptionProductRepository object
*
* @var \Webkul\Product\Repositories\ProductBundleOptionProductRepository
*/
protected $productBundleOptionProductRepository;
/**
* Create a new repository instance.
*
@ -23,12 +16,10 @@ class ProductBundleOptionRepository extends Repository
* @return void
*/
public function __construct(
ProductBundleOptionProductRepository $productBundleOptionProductRepository,
protected ProductBundleOptionProductRepository $productBundleOptionProductRepository,
App $app
)
{
$this->productBundleOptionProductRepository = $productBundleOptionProductRepository;
parent::__construct($app);
}

View File

@ -16,11 +16,10 @@ class ProductFlatRepository extends Repository
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
protected AttributeRepository $attributeRepository,
App $app
) {
$this->attributeRepository = $attributeRepository;
)
{
parent::__construct($app);
}

View File

@ -7,13 +7,6 @@ use Webkul\Product\Repositories\ProductRepository;
class ProductImageRepository extends ProductMediaRepository
{
/**
* Product repository object.
*
* @var Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* Create a new repository instance.
*
@ -22,12 +15,11 @@ class ProductImageRepository extends ProductMediaRepository
* @return void
*/
public function __construct(
ProductRepository $productRepository,
protected ProductRepository $productRepository,
App $app
) {
)
{
parent::__construct($app);
$this->productRepository = $productRepository;
}
/**

View File

@ -20,13 +20,6 @@ use Webkul\Product\Models\ProductFlat;
class ProductRepository extends Repository
{
/**
* Attribute repository instance,
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
protected $attributeRepository;
/**
* Create a new repository instance.
*
@ -36,11 +29,10 @@ class ProductRepository extends Repository
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
protected AttributeRepository $attributeRepository,
App $app
) {
$this->attributeRepository = $attributeRepository;
)
{
parent::__construct($app);
}

View File

@ -15,7 +15,8 @@ class ProductReviewImageRepository extends Repository
*
* @return void
*/
public function __construct(App $app) {
public function __construct(App $app)
{
parent::__construct($app);
}

View File

@ -11,29 +11,19 @@ use Webkul\Product\Repositories\ProductRepository;
class SearchRepository extends Repository
{
use Sanitizer;
/**
* ProductRepository object
*
* @return Object
*/
protected $productRepository;
/**
* Create a new repository instance.
*
* @param \Webkul\Product\Repositories\ProductRepository $productRepository
* @param \Illuminate\Container\Container $app
*
* @return void
*/
public function __construct(
ProductRepository $productRepository,
protected ProductRepository $productRepository,
App $app
) {
)
{
parent::__construct($app);
$this->productRepository = $productRepository;
}
function model()

Some files were not shown because too many files have changed in this diff Show More