Skip to content

Commit

Permalink
Use && and || logical operators instead of and and or
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Nov 1, 2021
1 parent 1f428f2 commit b559504
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/cartbox/buttons.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<button
class="checkout-btn btn btn-primary {{ $locationIsClosed ? 'disabled' : '' }} btn-block btn-lg"
data-attach-loading="disabled"
@if ($pageIsCheckout AND !$locationIsClosed)
@if ($pageIsCheckout && !$locationIsClosed)
data-checkout-control="confirm-checkout"
data-request-form="#checkout-form"
@elseif (!$locationIsClosed)
Expand Down
2 changes: 1 addition & 1 deletion components/cartbox/item_modal.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class="modal-dialog "
>
<form method="POST" data-request="{{ $formHandler }}">
<div class="modal-content">
@if ($showCartItemThumb AND $menuItem->hasMedia('thumb'))
@if ($showCartItemThumb && $menuItem->hasMedia('thumb'))
<div class="modal-top">
<img
class="img-fluid" src="{!! $menuItem->thumb->getThumb([
Expand Down
2 changes: 1 addition & 1 deletion components/cartbox/item_option_checkbox.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class="custom-control-input"
name="menu_options[{{ $index }}][option_values][]"
value="{{ $optionValue->menu_option_value_id }}"
data-option-price="{{ $optionValue->price }}"
@if (($cartItem AND $cartItem->hasOptionValue($menuOptionValueId)) OR $optionValue->isDefault())
@if (($cartItem && $cartItem->hasOptionValue($menuOptionValueId)) OR $optionValue->isDefault())
checked="checked"
@endif
>
Expand Down
2 changes: 1 addition & 1 deletion components/cartbox/item_option_radio.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class="custom-control-input"
name="menu_options[{{ $index }}][option_values][]"
value="{{ $optionValue->menu_option_value_id }}"
data-option-price="{{ $optionValue->price }}"
@if (($cartItem AND $cartItem->hasOptionValue($menuOptionValueId)) OR $optionValue->isDefault())
@if (($cartItem && $cartItem->hasOptionValue($menuOptionValueId)) OR $optionValue->isDefault())
checked="checked"
@endif
>
Expand Down
6 changes: 3 additions & 3 deletions components/cartbox/item_option_select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ class="form-control my-2"
>
<option>@lang('admin::lang.text_select')</option>
@foreach ($optionValues as $optionValue)
@php $isSelected = ($cartItem AND $cartItem->hasOptionValue($optionValue->menu_option_value_id)); @endphp
@php $isSelected = ($cartItem && $cartItem->hasOptionValue($optionValue->menu_option_value_id)); @endphp
<option
value="{{ $optionValue->menu_option_value_id }}"
@if (($cartItem AND $cartItem->hasOptionValue($optionValue->menu_option_value_id)) OR $optionValue->isDefault())
@if (($cartItem && $cartItem->hasOptionValue($optionValue->menu_option_value_id)) OR $optionValue->isDefault())
selected="selected"
@endif
data-option-price="{{ $optionValue->price }}"
>{{ $optionValue->name }}{!! ($optionValue->price > 0 || !$hideZeroOptionPrices ? '&nbsp;&nbsp;-&nbsp;&nbsp;'.lang('main::lang.text_plus').currency_format($optionValue->price) : '') !!}</option>
@endforeach
</select>
</select>
2 changes: 1 addition & 1 deletion components/cartbox/tip_form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class="btn btn-light{{ $tipAmountType == 'custom' ? ' active' : '' }}"
<div
class="input-group{{ $tipAmounts ? ' mt-2' : '' }}"
data-tip-custom
{!! ($tipAmounts AND $tipAmountType != 'custom') ? 'style="display: none;"' : '' !!}
{!! ($tipAmounts && $tipAmountType != 'custom') ? 'style="display: none;"' : '' !!}
>
<input
type="number"
Expand Down
4 changes: 2 additions & 2 deletions components/order/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
</div>

@if ($session AND !$session->customer())
@if ($session && !$session->customer())
<div class="card mb-1">
<div class="card-body text-center">
<a
Expand All @@ -20,7 +20,7 @@
</div>
</div>
@else
@if ($showReviews AND !empty($reviewable))
@if ($showReviews && !empty($reviewable))
<div class="card mb-1">
<div class="card-body">
@partial('localReview::form')
Expand Down
2 changes: 1 addition & 1 deletion components/order/items.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</tr>
@foreach ($order->getOrderTotals() as $orderTotal)
@continue(!$orderTotal->is_summable)
@continue($order->isCollectionType() AND $orderTotal->code == 'delivery')
@continue($order->isCollectionType() && $orderTotal->code == 'delivery')
@php($thickLine = ($orderTotal->code == 'order_total' OR $orderTotal->code == 'total'))
<tr>
<td class="px-0 {{ $thickLine ? 'border-top lead font-weight-bold' : 'text-muted border-0' }}">
Expand Down

0 comments on commit b559504

Please sign in to comment.