Skip to content

Commit

Permalink
chore: update Pint (#22)
Browse files Browse the repository at this point in the history
* WIP

* style: apply Pint

---------

Co-authored-by: ralphjsmit <[email protected]>
  • Loading branch information
ralphjsmit and ralphjsmit authored Mar 19, 2024
1 parent 86a9d1f commit 2e8a3e5
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 71 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/php-cs-fixer.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint with Pint

on:
pull_request:
workflow_call:
workflow_dispatch:

jobs:
pint:
name: Run Pint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Run Pint
uses: aglipanci/laravel-pint-action@latest
with:
verboseMode: true

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: apply Pint"
40 changes: 0 additions & 40 deletions .php_cs.dist.php

This file was deleted.

19 changes: 19 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"preset": "laravel",
"rules": {
"no_superfluous_phpdoc_tags": true,
"concat_space": {
"spacing": "one"
},
"single_quote": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
"explicit_string_variable": true,
"global_namespace_import": true,
"single_trait_insert_per_statement": true,
"ordered_traits": true,
"types_spaces": {
"space": "single"
}
}
}
2 changes: 1 addition & 1 deletion resources/lang/en/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
'author' => 'Author name',
'image' => 'Image',
'characters' => 'Characters',
];
];
2 changes: 1 addition & 1 deletion tests/Fixtures/Http/Livewire/CreatePost.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function getFormStatePath(): ?string
return 'data';
}

protected function getFormModel(): Model|string|null
protected function getFormModel(): Model | string | null
{
return Post::class;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Http/Livewire/EditPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function render(): View
return view('livewire.edit-post');
}

protected function getFormModel(): Model|string|null
protected function getFormModel(): Model | string | null
{
return $this->post;
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Fixtures/migrations/create_test_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
return new class() extends Migration
{
public function up(): void
{
Schema::create('posts', function (Blueprint $table) {
Expand Down
7 changes: 3 additions & 4 deletions tests/SEOTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

use function Pest\Laravel\assertDatabaseCount;
use function Pest\Laravel\assertDatabaseHas;

use RalphJSmit\Filament\SEO\Tests\Fixtures\Http\Livewire\CreatePost;
use RalphJSmit\Filament\SEO\Tests\Fixtures\Http\Livewire\EditPost;

use RalphJSmit\Filament\SEO\Tests\Fixtures\Models\Post;
use RalphJSmit\Laravel\SEO\Models\SEO;

use function Pest\Laravel\assertDatabaseCount;
use function Pest\Laravel\assertDatabaseHas;

it('can create a post with seo', function () {
$livewire = Livewire\Livewire::test(CreatePost::class);

Expand Down

0 comments on commit 2e8a3e5

Please sign in to comment.