Replace else if with elseif
This commit is contained in:
parent
95d198c1d6
commit
195eb82802
|
|
@ -82,9 +82,9 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
'wrapper' => function ($value) {
|
||||
if ($value->product_review_status == 'approved') {
|
||||
return '<span class="badge badge-md badge-success">Approved</span>';
|
||||
} else if ($value->product_review_status == "pending") {
|
||||
} elseif ($value->product_review_status == "pending") {
|
||||
return '<span class="badge badge-md badge-warning">Pending</span>';
|
||||
} else if ($value->product_review_status == "disapproved") {
|
||||
} elseif ($value->product_review_status == "disapproved") {
|
||||
return '<span class="badge badge-md badge-danger">Disapproved</span>';
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -98,17 +98,17 @@ class OrderDataGrid extends DataGrid
|
|||
'wrapper' => function ($value) {
|
||||
if ($value->status == 'processing') {
|
||||
return '<span class="badge badge-md badge-success">Processing</span>';
|
||||
} else if ($value->status == 'completed') {
|
||||
} elseif ($value->status == 'completed') {
|
||||
return '<span class="badge badge-md badge-success">Completed</span>';
|
||||
} else if ($value->status == "canceled") {
|
||||
} elseif ($value->status == "canceled") {
|
||||
return '<span class="badge badge-md badge-danger">Canceled</span>';
|
||||
} else if ($value->status == "closed") {
|
||||
} elseif ($value->status == "closed") {
|
||||
return '<span class="badge badge-md badge-info">Closed</span>';
|
||||
} else if ($value->status == "pending") {
|
||||
} elseif ($value->status == "pending") {
|
||||
return '<span class="badge badge-md badge-warning">Pending</span>';
|
||||
} else if ($value->status == "pending_payment") {
|
||||
} elseif ($value->status == "pending_payment") {
|
||||
return '<span class="badge badge-md badge-warning">Pending Payment</span>';
|
||||
} else if ($value->status == "fraud") {
|
||||
} elseif ($value->status == "fraud") {
|
||||
return '<span class="badge badge-md badge-danger">Fraud</span>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ class Handler extends ExceptionHandler
|
|||
$statusCode = in_array($exception->getStatusCode(), [401, 403, 404, 503]) ? $exception->getStatusCode() : 500;
|
||||
|
||||
return $this->response($path, $statusCode);
|
||||
} else if ($exception instanceof ModelNotFoundException) {
|
||||
} elseif ($exception instanceof ModelNotFoundException) {
|
||||
return $this->response($path, 404);
|
||||
} else if ($exception instanceof PDOException) {
|
||||
} elseif ($exception instanceof PDOException) {
|
||||
return $this->response($path, 500);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class CustomerGroupController extends Controller
|
|||
|
||||
if ($customerGroup->is_user_defined == 0) {
|
||||
session()->flash('warning', trans('admin::app.customers.customers.group-default'));
|
||||
} else if (count($customerGroup->customer) > 0) {
|
||||
} elseif (count($customerGroup->customer) > 0) {
|
||||
session()->flash('warning', trans('admin::app.response.customer-associate', ['name' => 'Customer Group']));
|
||||
} else {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@
|
|||
if (! this.idNullOption) {
|
||||
this.addOptionRow(true);
|
||||
}
|
||||
} else if(this.idNullOption !== null && typeof this.idNullOption !== 'undefined') {
|
||||
} elseif(this.idNullOption !== null && typeof this.idNullOption !== 'undefined') {
|
||||
const row = this.optionRows.find(optionRow => optionRow.id === this.idNullOption);
|
||||
this.removeRow(row);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@
|
|||
if (! this.idNullOption) {
|
||||
this.addOptionRow(true);
|
||||
}
|
||||
} else if(this.idNullOption !== null && typeof this.idNullOption !== 'undefined') {
|
||||
} elseif(this.idNullOption !== null && typeof this.idNullOption !== 'undefined') {
|
||||
const row = this.optionRows.find(optionRow => optionRow.id === this.idNullOption);
|
||||
this.removeRow(row);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@
|
|||
|
||||
if (dependValue == 'true') {
|
||||
dependValue = 1;
|
||||
} else if (dependValue == 'false') {
|
||||
} elseif (dependValue == 'false') {
|
||||
dependValue = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,15 +116,15 @@
|
|||
count = count + moveDown;
|
||||
|
||||
$('.navbar-left').css("top", count + "px");
|
||||
} else if ((event.keyCode == 40) && count >= -differenceInHeight) {
|
||||
} elseif ((event.keyCode == 40) && count >= -differenceInHeight) {
|
||||
count = count + moveUp;
|
||||
|
||||
$('.navbar-left').css("top", count + "px");
|
||||
} else if ((event.keyCode == 33) && countKeyUp <= 0) {
|
||||
} elseif ((event.keyCode == 33) && countKeyUp <= 0) {
|
||||
countKeyUp = countKeyUp + pageDown;
|
||||
|
||||
$('.navbar-left').css("top", countKeyUp + "px");
|
||||
} else if ((event.keyCode == 34) && countKeyUp >= -differenceInHeight) {
|
||||
} elseif ((event.keyCode == 34) && countKeyUp >= -differenceInHeight) {
|
||||
countKeyUp = countKeyUp + pageUp;
|
||||
|
||||
$('.navbar-left').css("top", countKeyUp + "px");
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class AttributeFamilyController extends Controller
|
|||
if ($this->attributeFamilyRepository->count() == 1) {
|
||||
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Family']));
|
||||
|
||||
} else if ($attributeFamily->products()->count()) {
|
||||
} elseif ($attributeFamily->products()->count()) {
|
||||
session()->flash('error', trans('admin::app.response.attribute-product-error', ['name' => 'Attribute family']));
|
||||
} else {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Booking extends Model implements BookingContract
|
|||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['slot_information', 'order_item_id', 'order_id'];
|
||||
protected $fillable = ['from', 'to', 'order_item_id', 'order_id'];
|
||||
|
||||
/**
|
||||
* Get the order record associated with the order item.
|
||||
|
|
|
|||
|
|
@ -17,5 +17,7 @@ class EventServiceProvider extends ServiceProvider
|
|||
Event::listen('bagisto.shop.products.view.short_description.after', function($viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate('bookingproduct::shop.products.view.booking');
|
||||
});
|
||||
|
||||
Event::listen('checkout.order.save.after', 'Webkul\BookingProduct\Listeners\Order@afterPlaceOrder');
|
||||
}
|
||||
}
|
||||
|
|
@ -14,30 +14,6 @@ use Webkul\Core\Eloquent\Repository;
|
|||
*/
|
||||
class BookingRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* ProductRepository object
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $productRepository;
|
||||
|
||||
/**
|
||||
* Create a new repository instance.
|
||||
*
|
||||
* @param Webkul\BookingProduct\Repositories\BookingProductRepository $bookingProductRepository
|
||||
* @param Illuminate\Container\Container $app
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
BookingProductRepository $bookingProductRepository,
|
||||
App $app
|
||||
)
|
||||
{
|
||||
$this->bookingProductRepository = $bookingProductRepository;
|
||||
|
||||
parent::__construct($app);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify Model class name
|
||||
*
|
||||
|
|
@ -61,19 +37,27 @@ class BookingRepository extends Repository
|
|||
continue;
|
||||
}
|
||||
|
||||
Event::fire('booking_product.booking.save.before', $item);
|
||||
Event::dispatch('booking_product.booking.save.before', $item);
|
||||
|
||||
$from = $to = null;
|
||||
|
||||
$booking = $this->bookingProductRepository->create([
|
||||
if (isset($item->additional['booking']['slot'])) {
|
||||
$timestamps = explode('-', $item->additional['booking']['slot']);
|
||||
|
||||
$from = current($timestamps);
|
||||
|
||||
$to = end($timestamps);
|
||||
}
|
||||
|
||||
$booking = parent::create([
|
||||
'qty' => $item->qty_ordered,
|
||||
'from' => $from,
|
||||
'to' => $to,
|
||||
'order_id' => $order,
|
||||
'order_id' => $order->id,
|
||||
'order_item_id' => $item->id
|
||||
]);
|
||||
|
||||
Event::fire('marketplace.booking.save.after', $booking);
|
||||
Event::dispatch('marketplace.booking.save.after', $booking);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -563,7 +563,7 @@ class Core
|
|||
|
||||
if (! $this->is_empty_date($dateFrom) && $channelTimeStamp < $fromTimeStamp) {
|
||||
$result = false;
|
||||
} else if (! $this->is_empty_date($dateTo) && $channelTimeStamp > $toTimeStamp) {
|
||||
} elseif (! $this->is_empty_date($dateTo) && $channelTimeStamp > $toTimeStamp) {
|
||||
$result = false;
|
||||
} else {
|
||||
$result = true;
|
||||
|
|
@ -802,7 +802,7 @@ class Core
|
|||
|
||||
$timeIntervals[] = ['start' => $start, 'end' => $end, 'formatedDate' => $date->format('M')];
|
||||
}
|
||||
} else if ($totalWeeks > 6) {
|
||||
} elseif ($totalWeeks > 6) {
|
||||
for ($i = 0; $i < $totalWeeks; $i++) {
|
||||
$date = clone $startDate;
|
||||
$date->addWeeks($i);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class TranslatableModel extends Model
|
|||
if (Locale::where('code', '=', end($chunks))->first()) {
|
||||
return true;
|
||||
}
|
||||
} else if (Locale::where('code', '=', $key)->first()) {
|
||||
} elseif (Locale::where('code', '=', $key)->first()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class CoreConfigRepository extends Repository
|
|||
|
||||
if ($dim > 1) {
|
||||
$this->recuressiveArray($formValue, $value);
|
||||
} else if ($dim == 1) {
|
||||
} elseif ($dim == 1) {
|
||||
$data[$value] = $formValue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class Tree {
|
|||
if (strpos($this->current, $item['url']) !== false) {
|
||||
$this->currentKey = $item['key'];
|
||||
}
|
||||
} else if ($type == 'acl') {
|
||||
} elseif ($type == 'acl') {
|
||||
$item['name'] = trans($item['name']);
|
||||
$this->roles[$item['route']] = $item['key'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,34 +61,34 @@ class GenerateProduct
|
|||
if ($attribute->type == 'text') {
|
||||
if ($attribute->code == 'width' || $attribute->code == 'height' || $attribute->code == 'depth' || $attribute->code == 'weight') {
|
||||
$data[$attribute->code] = $faker->randomNumber(3);
|
||||
} else if ($attribute->code == 'url_key') {
|
||||
} elseif ($attribute->code == 'url_key') {
|
||||
$data[$attribute->code] = strtolower($sku);
|
||||
} else if ($attribute->code != 'sku') {
|
||||
} elseif ($attribute->code != 'sku') {
|
||||
$data[$attribute->code] = $faker->name;
|
||||
} else {
|
||||
$data[$attribute->code] = $sku;
|
||||
}
|
||||
} else if ($attribute->type == 'textarea') {
|
||||
} elseif ($attribute->type == 'textarea') {
|
||||
$data[$attribute->code] = $faker->text;
|
||||
|
||||
if ($attribute->code == 'description' || $attribute->code == 'short_description') {
|
||||
$data[$attribute->code] = '<p>'. $data[$attribute->code] . '</p>';
|
||||
}
|
||||
} else if ($attribute->type == 'boolean') {
|
||||
} elseif ($attribute->type == 'boolean') {
|
||||
$data[$attribute->code] = $faker->boolean;
|
||||
} else if ($attribute->type == 'price') {
|
||||
} elseif ($attribute->type == 'price') {
|
||||
$data[$attribute->code] = $faker->randomNumber(2);
|
||||
} else if ($attribute->type == 'datetime') {
|
||||
} elseif ($attribute->type == 'datetime') {
|
||||
$data[$attribute->code] = $date->toDateTimeString();
|
||||
} else if ($attribute->type == 'date') {
|
||||
} elseif ($attribute->type == 'date') {
|
||||
if ($attribute->code == 'special_price_from') {
|
||||
$data[$attribute->code] = $specialFrom;
|
||||
} else if ($attribute->code == 'special_price_to') {
|
||||
} elseif ($attribute->code == 'special_price_to') {
|
||||
$data[$attribute->code] = $specialTo;
|
||||
} else {
|
||||
$data[$attribute->code] = $date->toDateString();
|
||||
}
|
||||
} else if ($attribute->code != 'tax_category_id' && ($attribute->type == 'select' || $attribute->type == 'multiselect')) {
|
||||
} elseif ($attribute->code != 'tax_category_id' && ($attribute->type == 'select' || $attribute->type == 'multiselect')) {
|
||||
$options = $attribute->options;
|
||||
|
||||
if ($attribute->type == 'select') {
|
||||
|
|
@ -99,7 +99,7 @@ class GenerateProduct
|
|||
} else {
|
||||
$data[$attribute->code] = "";
|
||||
}
|
||||
} else if ($attribute->type == 'multiselect') {
|
||||
} elseif ($attribute->type == 'multiselect') {
|
||||
if ($options->count()) {
|
||||
$option = $options->first()->id;
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ class GenerateProduct
|
|||
} else {
|
||||
$data[$attribute->code] = "";
|
||||
}
|
||||
} else if ($attribute->code == 'checkbox') {
|
||||
} elseif ($attribute->code == 'checkbox') {
|
||||
$options = $attribute->options;
|
||||
|
||||
if ($options->count()) {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class Toolbar extends AbstractProduct
|
|||
|
||||
if (isset($params['sort']) && $key == $params['sort'] . '-' . $params['order']) {
|
||||
return true;
|
||||
} else if (! isset($params['sort']) && $key == 'created_at-desc') {
|
||||
} elseif (! isset($params['sort']) && $key == 'created_at-desc') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class View extends AbstractProduct
|
|||
|
||||
if ($attribute->type == 'boolean') {
|
||||
$value = $value ? 'Yes' : 'No';
|
||||
} else if($value) {
|
||||
} elseif($value) {
|
||||
if ($attribute->type == 'select') {
|
||||
$attributeOption = $attributeOptionReposotory->find($value);
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ class View extends AbstractProduct
|
|||
continue;
|
||||
}
|
||||
}
|
||||
} else if ($attribute->type == 'multiselect' || $attribute->type == 'checkbox') {
|
||||
} elseif ($attribute->type == 'multiselect' || $attribute->type == 'checkbox') {
|
||||
$lables = [];
|
||||
|
||||
$attributeOptions = $attributeOptionReposotory->findWhereIn('id', explode(",", $value));
|
||||
|
|
|
|||
|
|
@ -179,9 +179,9 @@ class ReviewController extends Controller
|
|||
$review->update(['status' => 'approved']);
|
||||
|
||||
Event::dispatch('customer.review.update.after', $review);
|
||||
} else if ($data['update-options'] == 0) {
|
||||
} elseif ($data['update-options'] == 0) {
|
||||
$review->update(['status' => 'pending']);
|
||||
} else if ($data['update-options'] == 2) {
|
||||
} elseif ($data['update-options'] == 2) {
|
||||
$review->update(['status' => 'disapproved']);
|
||||
} else {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class ProductFlat
|
|||
$channel = app('Webkul\Core\Repositories\ChannelRepository')->findOrFail($channel);
|
||||
$channels[] = $channel['code'];
|
||||
}
|
||||
} else if (isset($parentProduct['channels'])){
|
||||
} elseif (isset($parentProduct['channels'])){
|
||||
foreach ($parentProduct['channels'] as $channel) {
|
||||
$channel = app('Webkul\Core\Repositories\ChannelRepository')->findOrFail($channel);
|
||||
$channels[] = $channel['code'];
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ abstract class AbstractType
|
|||
} else {
|
||||
if (core()->isChannelDateInInterval($this->product->special_price_from, $this->product->special_price_to)) {
|
||||
return true;
|
||||
} else if ($rulePrice) {
|
||||
} elseif ($rulePrice) {
|
||||
$this->product->special_price = $rulePrice->price;
|
||||
|
||||
return true;
|
||||
|
|
@ -632,9 +632,9 @@ abstract class AbstractType
|
|||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (isset($options1['parent_id']) && ! isset($options2['parent_id'])) {
|
||||
} elseif (isset($options1['parent_id']) && ! isset($options2['parent_id'])) {
|
||||
return false;
|
||||
} else if (isset($options2['parent_id']) && ! isset($options1['parent_id'])) {
|
||||
} elseif (isset($options2['parent_id']) && ! isset($options1['parent_id'])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class Validator
|
|||
}
|
||||
|
||||
return $cart->shipping_address->{$attributeCode};
|
||||
} else if ($attributeCode == 'shipping_method') {
|
||||
} elseif ($attributeCode == 'shipping_method') {
|
||||
if (! $cart->shipping_method) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ class Validator
|
|||
$shippingChunks = explode('_', $cart->shipping_method);
|
||||
|
||||
return current($shippingChunks);
|
||||
} else if ($attributeCode == 'payment_method') {
|
||||
} elseif ($attributeCode == 'payment_method') {
|
||||
if (! $cart->payment) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ class Validator
|
|||
{
|
||||
if ($attributeScope === 'parent') {
|
||||
return [$item];
|
||||
} else if ($attributeScope === 'children') {
|
||||
} elseif ($attributeScope === 'children') {
|
||||
return $item->children ?: [$item];
|
||||
} else {
|
||||
$items = $item->children ?: [];
|
||||
|
|
@ -227,7 +227,7 @@ class Validator
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (is_array($condition['value'])) {
|
||||
} elseif (is_array($condition['value'])) {
|
||||
if (! is_array($attributeValue)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,10 @@ class InvoiceRepository extends Repository
|
|||
'additional' => $childOrderItem->additional
|
||||
]);
|
||||
|
||||
if ($childOrderItem->product && ! $childOrderItem->getTypeInstance()->isStockable() && $childOrderItem->getTypeInstance()->showQuantityBox()) {
|
||||
if ($childOrderItem->product
|
||||
&& ! $childOrderItem->getTypeInstance()->isStockable()
|
||||
&& $childOrderItem->getTypeInstance()->showQuantityBox()) {
|
||||
|
||||
$this->invoiceItemRepository->updateProductInventory([
|
||||
'invoice' => $invoice,
|
||||
'product' => $childOrderItem->product,
|
||||
|
|
@ -177,7 +180,10 @@ class InvoiceRepository extends Repository
|
|||
|
||||
$this->orderItemRepository->collectTotals($childOrderItem);
|
||||
}
|
||||
} else if ($orderItem->product && ! $orderItem->getTypeInstance()->isStockable() && $orderItem->getTypeInstance()->showQuantityBox()) {
|
||||
} elseif ($orderItem->product
|
||||
&& ! $orderItem->getTypeInstance()->isStockable()
|
||||
&& $orderItem->getTypeInstance()->showQuantityBox()) {
|
||||
|
||||
$this->invoiceItemRepository->updateProductInventory([
|
||||
'invoice' => $invoice,
|
||||
'product' => $orderItem->product,
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ class OrderRepository extends Repository
|
|||
|
||||
if ($this->isInCanceledState($order)) {
|
||||
$status = 'canceled';
|
||||
} else if ($this->isInClosedState($order)) {
|
||||
} elseif ($this->isInClosedState($order)) {
|
||||
$status = 'closed';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class RefundItemRepository extends Repository
|
|||
|
||||
$quantity -= $totalShippedQtyToRefund;
|
||||
}
|
||||
} else if ($orderItem->getTypeInstance()->showQuantityBox()) {
|
||||
} elseif ($orderItem->getTypeInstance()->showQuantityBox()) {
|
||||
$inventory = $orderItem->product->inventories()
|
||||
// ->where('vendor_id', $data['vendor_id'])
|
||||
->whereIn('inventory_source_id', $orderItem->order->channel->inventory_sources()->pluck('id'))
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ class DownloadableProductDataGrid extends DataGrid
|
|||
'wrapper' => function ($value) {
|
||||
if ($value->status == 'pending') {
|
||||
return trans('shop::app.customer.account.downloadable_products.pending');
|
||||
} else if ($value->status == 'available') {
|
||||
} elseif ($value->status == 'available') {
|
||||
return trans('shop::app.customer.account.downloadable_products.available');
|
||||
} else if ($value->status == 'expired') {
|
||||
} elseif ($value->status == 'expired') {
|
||||
return trans('shop::app.customer.account.downloadable_products.expired');
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -68,17 +68,17 @@ class OrderDataGrid extends DataGrid
|
|||
'wrapper' => function ($value) {
|
||||
if ($value->status == 'processing') {
|
||||
return '<span class="badge badge-md badge-success">Processing</span>';
|
||||
} else if ($value->status == 'completed') {
|
||||
} elseif ($value->status == 'completed') {
|
||||
return '<span class="badge badge-md badge-success">Completed</span>';
|
||||
} else if ($value->status == "canceled") {
|
||||
} elseif ($value->status == "canceled") {
|
||||
return '<span class="badge badge-md badge-danger">Canceled</span>';
|
||||
} else if ($value->status == "closed") {
|
||||
} elseif ($value->status == "closed") {
|
||||
return '<span class="badge badge-md badge-info">Closed</span>';
|
||||
} else if ($value->status == "pending") {
|
||||
} elseif ($value->status == "pending") {
|
||||
return '<span class="badge badge-md badge-warning">Pending</span>';
|
||||
} else if ($value->status == "pending_payment") {
|
||||
} elseif ($value->status == "pending_payment") {
|
||||
return '<span class="badge badge-md badge-warning">Pending Payment</span>';
|
||||
} else if ($value->status == "fraud") {
|
||||
} elseif ($value->status == "fraud") {
|
||||
return '<span class="badge badge-md badge-danger">Fraud</span>';
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ class Handler extends ExceptionHandler
|
|||
$statusCode = in_array($exception->getStatusCode(), [401, 403, 404, 503]) ? $exception->getStatusCode() : 500;
|
||||
|
||||
return $this->response($path, $statusCode);
|
||||
} else if ($exception instanceof ModelNotFoundException) {
|
||||
} elseif ($exception instanceof ModelNotFoundException) {
|
||||
return $this->response($path, 404);
|
||||
} else if ($exception instanceof PDOException) {
|
||||
} elseif ($exception instanceof PDOException) {
|
||||
return $this->response($path, 500);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@
|
|||
|
||||
if (operation == 'add') {
|
||||
quantity = parseInt(quantity) + 1;
|
||||
} else if (operation == 'remove') {
|
||||
} elseif (operation == 'remove') {
|
||||
if (quantity > 1) {
|
||||
quantity = parseInt(quantity) - 1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -224,9 +224,9 @@
|
|||
if (result) {
|
||||
if (scope == 'address-form') {
|
||||
this_this.saveAddress();
|
||||
} else if (scope == 'shipping-form') {
|
||||
} elseif (scope == 'shipping-form') {
|
||||
this_this.saveShipping();
|
||||
} else if (scope == 'payment-form') {
|
||||
} elseif (scope == 'payment-form') {
|
||||
this_this.savePayment();
|
||||
}
|
||||
}
|
||||
|
|
@ -387,7 +387,7 @@
|
|||
if (response.status == 422) {
|
||||
serverErrors = response.data.errors;
|
||||
this.$root.addServerErrors(scope)
|
||||
} else if (response.status == 403) {
|
||||
} elseif (response.status == 403) {
|
||||
if (response.data.redirect_url) {
|
||||
window.location.href = response.data.redirect_url;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@
|
|||
$('#hammenu').addClass('icon-menu');
|
||||
$("#search-responsive").css("display", "block");
|
||||
$("#header-bottom").css("display", "none");
|
||||
} else if (currentElement.hasClass('icon-menu')) {
|
||||
} elseif (currentElement.hasClass('icon-menu')) {
|
||||
currentElement.removeClass('icon-menu');
|
||||
currentElement.addClass('icon-menu-close');
|
||||
$('#search').removeClass('icon-menu-close');
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
$('.responsive-layred-filter').css('display','none');
|
||||
$('.pager').css('display','flex');
|
||||
$('.pager').css('justify-content','space-between');
|
||||
} else if (currentElement.hasClass('filter-icon')) {
|
||||
} elseif (currentElement.hasClass('filter-icon')) {
|
||||
currentElement.removeClass('filter-icon');
|
||||
currentElement.addClass('icon-menu-close-adj');
|
||||
currentElement.prev().removeClass();
|
||||
|
|
|
|||
|
|
@ -229,17 +229,17 @@ class TaxRateController extends Controller
|
|||
foreach ($failedRules as $coulmn => $fail) {
|
||||
if ($fail->first('identifier')){
|
||||
$errorMsg[$coulmn] = $fail->first('identifier');
|
||||
} else if ($fail->first('tax_rate')) {
|
||||
} elseif ($fail->first('tax_rate')) {
|
||||
$errorMsg[$coulmn] = $fail->first('tax_rate');
|
||||
} else if ($fail->first('country')) {
|
||||
} elseif ($fail->first('country')) {
|
||||
$errorMsg[$coulmn] = $fail->first('country');
|
||||
} else if ($fail->first('state')) {
|
||||
} elseif ($fail->first('state')) {
|
||||
$errorMsg[$coulmn] = $fail->first('state');
|
||||
} else if ($fail->first('zip_code')) {
|
||||
} elseif ($fail->first('zip_code')) {
|
||||
$errorMsg[$coulmn] = $fail->first('zip_code');
|
||||
} else if ($fail->first('zip_from')) {
|
||||
} elseif ($fail->first('zip_from')) {
|
||||
$errorMsg[$coulmn] = $fail->first('zip_from');
|
||||
} else if ($fail->first('zip_to')) {
|
||||
} elseif ($fail->first('zip_to')) {
|
||||
$errorMsg[$coulmn] = $fail->first('zip_to');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class ViewRenderEventManager
|
|||
foreach ($this->templates as $template) {
|
||||
if (view()->exists($template)) {
|
||||
$string .= view($template , $this->params)->render();
|
||||
} else if (is_string($template)) {
|
||||
} elseif (is_string($template)) {
|
||||
$string .= $template;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ abstract class DataGrid
|
|||
if ( ! is_array($value)) {
|
||||
unset($parsedUrl[$key]);
|
||||
}
|
||||
} else if ( ! is_array($value)) {
|
||||
} elseif ( ! is_array($value)) {
|
||||
unset($parsedUrl[$key]);
|
||||
}
|
||||
}
|
||||
|
|
@ -312,7 +312,7 @@ abstract class DataGrid
|
|||
$columnName[1],
|
||||
array_values($info)[0]
|
||||
);
|
||||
} else if ($key == "search") {
|
||||
} elseif ($key == "search") {
|
||||
$count_keys = count(array_keys($info));
|
||||
|
||||
if ($count_keys > 1) {
|
||||
|
|
@ -326,7 +326,7 @@ abstract class DataGrid
|
|||
if ($column['searchable'] == true) {
|
||||
if($this->enableFilterMap && isset($this->filterMap[$column['index']])) {
|
||||
$collection->orWhere($this->filterMap[$column['index']], 'like', '%'.$info['all'].'%');
|
||||
} else if($this->enableFilterMap && !isset($this->filterMap[$column['index']])) {
|
||||
} elseif($this->enableFilterMap && !isset($this->filterMap[$column['index']])) {
|
||||
$collection->orWhere($column['index'], 'like', '%'.$info['all'].'%');
|
||||
}else {
|
||||
$collection->orWhere($column['index'], 'like', '%'.$info['all'].'%');
|
||||
|
|
@ -350,7 +350,7 @@ abstract class DataGrid
|
|||
$this->operators[$condition],
|
||||
'%'.$filter_value.'%'
|
||||
);
|
||||
} else if ($this->enableFilterMap && ! isset($this->filterMap[$columnName])) {
|
||||
} elseif ($this->enableFilterMap && ! isset($this->filterMap[$columnName])) {
|
||||
$collection->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
|
|
@ -373,7 +373,7 @@ abstract class DataGrid
|
|||
$this->operators[$condition],
|
||||
$filter_value
|
||||
);
|
||||
} else if ($this->enableFilterMap && ! isset($this->filterMap[$columnName])) {
|
||||
} elseif ($this->enableFilterMap && ! isset($this->filterMap[$columnName])) {
|
||||
$collection->whereDate(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
|
|
@ -393,7 +393,7 @@ abstract class DataGrid
|
|||
$this->operators[$condition],
|
||||
$filter_value
|
||||
);
|
||||
} else if($this->enableFilterMap && !isset($this->filterMap[$columnName])) {
|
||||
} elseif($this->enableFilterMap && !isset($this->filterMap[$columnName])) {
|
||||
$collection->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
|
|
|
|||
|
|
@ -247,28 +247,28 @@
|
|||
this.numberConditionSelect = false;
|
||||
|
||||
this.nullify();
|
||||
} else if (this.type == 'datetime') {
|
||||
} elseif (this.type == 'datetime') {
|
||||
this.datetimeConditionSelect = true;
|
||||
this.stringConditionSelect = false;
|
||||
this.booleanConditionSelect = false;
|
||||
this.numberConditionSelect = false;
|
||||
|
||||
this.nullify();
|
||||
} else if (this.type == 'boolean') {
|
||||
} elseif (this.type == 'boolean') {
|
||||
this.booleanConditionSelect = true;
|
||||
this.datetimeConditionSelect = false;
|
||||
this.stringConditionSelect = false;
|
||||
this.numberConditionSelect = false;
|
||||
|
||||
this.nullify();
|
||||
} else if (this.type == 'number') {
|
||||
} elseif (this.type == 'number') {
|
||||
this.numberConditionSelect = true;
|
||||
this.booleanConditionSelect = false;
|
||||
this.datetimeConditionSelect = false;
|
||||
this.stringConditionSelect = false;
|
||||
|
||||
this.nullify();
|
||||
} else if (this.type == 'price') {
|
||||
} elseif (this.type == 'price') {
|
||||
this.numberConditionSelect = true;
|
||||
this.booleanConditionSelect = false;
|
||||
this.datetimeConditionSelect = false;
|
||||
|
|
@ -298,7 +298,7 @@
|
|||
|
||||
if (this.type == 'string') {
|
||||
this.formURL(this.columnOrAlias, this.stringCondition, encodeURIComponent(this.stringValue), label)
|
||||
} else if (this.type == 'number') {
|
||||
} elseif (this.type == 'number') {
|
||||
indexConditions = true;
|
||||
|
||||
if (this.filterIndex == this.columnOrAlias && (this.numberValue == 0 || this.numberValue < 0)) {
|
||||
|
|
@ -309,11 +309,11 @@
|
|||
|
||||
if(indexConditions)
|
||||
this.formURL(this.columnOrAlias, this.numberCondition, this.numberValue, label);
|
||||
} else if (this.type == 'boolean') {
|
||||
} elseif (this.type == 'boolean') {
|
||||
this.formURL(this.columnOrAlias, this.booleanCondition, this.booleanValue, label);
|
||||
} else if (this.type == 'datetime') {
|
||||
} elseif (this.type == 'datetime') {
|
||||
this.formURL(this.columnOrAlias, this.datetimeCondition, this.datetimeValue, label);
|
||||
} else if (this.type == 'price') {
|
||||
} elseif (this.type == 'price') {
|
||||
this.formURL(this.columnOrAlias, this.numberCondition, this.numberValue, label);
|
||||
}
|
||||
},
|
||||
|
|
@ -412,7 +412,7 @@
|
|||
filterRepeated = 1;
|
||||
|
||||
return false;
|
||||
} else if(this.filters[j].cond == condition && this.filters[j].val != response) {
|
||||
} elseif(this.filters[j].cond == condition && this.filters[j].val != response) {
|
||||
filterRepeated = 1;
|
||||
|
||||
this.filters[j].val = response;
|
||||
|
|
@ -542,7 +542,7 @@
|
|||
if (this.filters[i].column == 'status') {
|
||||
if (this.filters[i].val.includes("True")) {
|
||||
this.filters[i].val = 1;
|
||||
} else if (this.filters[i].val.includes("False")) {
|
||||
} elseif (this.filters[i].val.includes("False")) {
|
||||
this.filters[i].val = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -594,7 +594,7 @@
|
|||
obj.label = this.columns[colIndex].label;
|
||||
}
|
||||
}
|
||||
} else if (col == "search") {
|
||||
} elseif (col == "search") {
|
||||
obj.label = 'Search';
|
||||
} else {
|
||||
obj.label = '';
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class RoleController extends Controller
|
|||
|
||||
if ($role->admins->count() >= 1) {
|
||||
session()->flash('error', trans('admin::app.response.being-used', ['name' => 'Role', 'source' => 'Admin User']));
|
||||
} else if($this->roleRepository->count() == 1) {
|
||||
} elseif($this->roleRepository->count() == 1) {
|
||||
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Role']));
|
||||
} else {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -87,11 +87,11 @@ class ContentDataGrid extends DataGrid
|
|||
'wrapper' => function($value) {
|
||||
if ($value->content_type == 'category') {
|
||||
return 'Category Slug';
|
||||
} else if ($value->content_type == 'link') {
|
||||
} elseif ($value->content_type == 'link') {
|
||||
return 'Link';
|
||||
} else if ($value->content_type == 'product') {
|
||||
} elseif ($value->content_type == 'product') {
|
||||
return 'Product';
|
||||
} else if ($value->content_type == 'static') {
|
||||
} elseif ($value->content_type == 'static') {
|
||||
return 'Static';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRep
|
|||
|
||||
if ($slug == "new-products") {
|
||||
$products = $productRepository->getNewProducts($count);
|
||||
} else if ($slug == "featured-products") {
|
||||
} elseif ($slug == "featured-products") {
|
||||
$products = $productRepository->getFeaturedProducts($count);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@
|
|||
if (response.status == 422) {
|
||||
serverErrors = response.data.errors;
|
||||
this.$root.addServerErrors(scope)
|
||||
} else if (response.status == 403) {
|
||||
} elseif (response.status == 403) {
|
||||
if (response.data.redirect_url) {
|
||||
window.location.href = response.data.redirect_url;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue