Skip to content

Commit

Permalink
Laravel Pint Improvements (#1182)
Browse files Browse the repository at this point in the history
Laravel Pint was causing issues as when a new version was released our
codebase suddenly didn't conform. This update locks the version of Pint
and also only checks changed files.
  • Loading branch information
glennjacobs authored Aug 7, 2023
1 parent 76f15d3 commit 2dbedef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/laravel-pint-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
jobs:
Test:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress

- name: Check code style
run: ./vendor/bin/pint --test --preset laravel
- uses: actions/checkout@v1
- name: "laravel-pint"
uses: aglipanci/[email protected]
with:
preset: laravel
verboseMode: true
testMode: true
pintVersion: 1.10.5
onlyDirty: true
2 changes: 1 addition & 1 deletion packages/core/src/Actions/Carts/GetExistingCartLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function execute(
Cart $cart,
Purchasable $purchasable,
array $meta = []
): CartLine|null {
): ?CartLine {
// Get all possible cart lines
$lines = $cart->lines()
->wherePurchasableType(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Models/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public function setShippingOption(ShippingOption $option, $refresh = true): Cart
/**
* Get the shipping option for the cart
*/
public function getShippingOption(): ShippingOption|null
public function getShippingOption(): ?ShippingOption
{
return ShippingManifest::getShippingOption($this);
}
Expand Down

0 comments on commit 2dbedef

Please sign in to comment.