Skip to content

Commit

Permalink
[4.x] Switch StyleCI with Pint (#8310)
Browse files Browse the repository at this point in the history
Co-authored-by: jasonvarga <[email protected]>
  • Loading branch information
jasonvarga and jasonvarga authored Jun 28, 2023
1 parent 28c08e5 commit 304f199
Show file tree
Hide file tree
Showing 173 changed files with 1,037 additions and 1,273 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pint-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Fix PHP code style issues

on:
push:
paths:
- '**.php'

permissions:
contents: write

jobs:
fix-php-code-styling:
runs-on: ubuntu-latest

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

- name: Fix PHP code style issues
uses: aglipanci/[email protected]

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
20 changes: 20 additions & 0 deletions .github/workflows/pint-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint PHP code style issues

on:
pull_request:
paths:
- '**.php'

jobs:
lint-php-code-styling:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check PHP code style issues
uses: aglipanci/[email protected]
with:
testMode: true
verboseMode: true
2 changes: 0 additions & 2 deletions .styleci.yml

This file was deleted.

10 changes: 0 additions & 10 deletions pint.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
{
"preset": "laravel",
"rules": {
"binary_operator_spaces": {
"default": "single_space",
"operators": {
"=>": null
}
},
"class_attributes_separation": {
"elements": {
"method": "one"
}
},
"class_definition": {
"multi_line_extends_each_single_line": true,
"single_item_single_line": true
},
"psr_autoloading": true
}
}
170 changes: 85 additions & 85 deletions resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,108 +13,108 @@
|
*/

'accepted' => 'Must be accepted.',
'active_url' => 'This is not a valid URL.',
'after' => 'Must be a date after :date.',
'after_or_equal' => 'Must be a date after or equal to :date.',
'alpha' => 'May only contain letters.',
'alpha_dash' => 'May only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'May only contain letters and numbers.',
'array' => 'Must be an array.',
'before' => 'Must be a date before :date.',
'before_or_equal' => 'Must be a date before or equal to :date.',
'between' => [
'accepted' => 'Must be accepted.',
'active_url' => 'This is not a valid URL.',
'after' => 'Must be a date after :date.',
'after_or_equal' => 'Must be a date after or equal to :date.',
'alpha' => 'May only contain letters.',
'alpha_dash' => 'May only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'May only contain letters and numbers.',
'array' => 'Must be an array.',
'before' => 'Must be a date before :date.',
'before_or_equal' => 'Must be a date before or equal to :date.',
'between' => [
'numeric' => 'Must be between :min and :max.',
'file' => 'Must be between :min and :max kilobytes.',
'string' => 'Must be between :min and :max characters.',
'array' => 'Must have between :min and :max items.',
'file' => 'Must be between :min and :max kilobytes.',
'string' => 'Must be between :min and :max characters.',
'array' => 'Must have between :min and :max items.',
],
'boolean' => 'Must be true or false.',
'confirmed' => 'Confirmation does not match.',
'current_password' => 'The password is incorrect.',
'date' => 'Not a valid date.',
'date_format' => 'Does not match the format :format.',
'different' => 'This field and :other must be different.',
'digits' => 'Must be :digits digits.',
'digits_between' => 'Must be between :min and :max digits.',
'dimensions' => 'Invalid image dimensions.',
'distinct' => 'This field has a duplicate value.',
'email' => 'Must be a valid email address.',
'ends_with' => 'Must end with :values',
'exists' => 'This is invalid.',
'file' => 'Must be a file.',
'filled' => 'Must have a value.',
'gt' => [
'boolean' => 'Must be true or false.',
'confirmed' => 'Confirmation does not match.',
'current_password' => 'The password is incorrect.',
'date' => 'Not a valid date.',
'date_format' => 'Does not match the format :format.',
'different' => 'This field and :other must be different.',
'digits' => 'Must be :digits digits.',
'digits_between' => 'Must be between :min and :max digits.',
'dimensions' => 'Invalid image dimensions.',
'distinct' => 'This field has a duplicate value.',
'email' => 'Must be a valid email address.',
'ends_with' => 'Must end with :values',
'exists' => 'This is invalid.',
'file' => 'Must be a file.',
'filled' => 'Must have a value.',
'gt' => [
'numeric' => 'Must be greater than :value.',
'file' => 'Must be greater than :value kilobytes.',
'string' => 'Must be greater than :value characters.',
'array' => 'Must have more than :value items.',
'file' => 'Must be greater than :value kilobytes.',
'string' => 'Must be greater than :value characters.',
'array' => 'Must have more than :value items.',
],
'gte' => [
'gte' => [
'numeric' => 'Must be greater than or equal :value.',
'file' => 'Must be greater than or equal :value kilobytes.',
'string' => 'Must be greater than or equal :value characters.',
'array' => 'Must have :value items or more.',
'file' => 'Must be greater than or equal :value kilobytes.',
'string' => 'Must be greater than or equal :value characters.',
'array' => 'Must have :value items or more.',
],
'image' => 'Must be an image.',
'in' => 'This is invalid.',
'in_array' => 'This field does not exist in :other.',
'integer' => 'Must be an integer.',
'ip' => 'Must be a valid IP address.',
'ipv4' => 'Must be a valid IPv4 address.',
'ipv6' => 'Must be a valid IPv6 address.',
'json' => 'Must be a valid JSON string.',
'lt' => [
'image' => 'Must be an image.',
'in' => 'This is invalid.',
'in_array' => 'This field does not exist in :other.',
'integer' => 'Must be an integer.',
'ip' => 'Must be a valid IP address.',
'ipv4' => 'Must be a valid IPv4 address.',
'ipv6' => 'Must be a valid IPv6 address.',
'json' => 'Must be a valid JSON string.',
'lt' => [
'numeric' => 'Must be less than :value.',
'file' => 'Must be less than :value kilobytes.',
'string' => 'Must be less than :value characters.',
'array' => 'Must have less than :value items.',
'file' => 'Must be less than :value kilobytes.',
'string' => 'Must be less than :value characters.',
'array' => 'Must have less than :value items.',
],
'lte' => [
'lte' => [
'numeric' => 'Must be less than or equal :value.',
'file' => 'Must be less than or equal :value kilobytes.',
'string' => 'Must be less than or equal :value characters.',
'array' => 'Must not have more than :value items.',
'file' => 'Must be less than or equal :value kilobytes.',
'string' => 'Must be less than or equal :value characters.',
'array' => 'Must not have more than :value items.',
],
'max' => [
'max' => [
'numeric' => 'May not be greater than :max.',
'file' => 'May not be greater than :max kilobytes.',
'string' => 'May not be greater than :max characters.',
'array' => 'May not have more than :max items.',
'file' => 'May not be greater than :max kilobytes.',
'string' => 'May not be greater than :max characters.',
'array' => 'May not have more than :max items.',
],
'mimes' => 'Must be a file of type: :values.',
'mimetypes' => 'Must be a file of type: :values.',
'min' => [
'mimes' => 'Must be a file of type: :values.',
'mimetypes' => 'Must be a file of type: :values.',
'min' => [
'numeric' => 'Must be at least :min.',
'file' => 'Must be at least :min kilobytes.',
'string' => 'Must be at least :min characters.',
'array' => 'Must have at least :min items.',
'file' => 'Must be at least :min kilobytes.',
'string' => 'Must be at least :min characters.',
'array' => 'Must have at least :min items.',
],
'not_in' => 'This is invalid.',
'not_regex' => 'Format is invalid.',
'numeric' => 'Must be a number.',
'present' => 'Must be present.',
'regex' => 'Format is invalid.',
'required' => 'This field is required.',
'required_if' => 'This field is required when :other is :value.',
'required_unless' => 'This field is required unless :other is in :values.',
'required_with' => 'This field is required when :values is present.',
'required_with_all' => 'This field is required when :values is present.',
'required_without' => 'This field is required when :values is not present.',
'not_in' => 'This is invalid.',
'not_regex' => 'Format is invalid.',
'numeric' => 'Must be a number.',
'present' => 'Must be present.',
'regex' => 'Format is invalid.',
'required' => 'This field is required.',
'required_if' => 'This field is required when :other is :value.',
'required_unless' => 'This field is required unless :other is in :values.',
'required_with' => 'This field is required when :values is present.',
'required_with_all' => 'This field is required when :values is present.',
'required_without' => 'This field is required when :values is not present.',
'required_without_all' => 'This field is required when none of :values are present.',
'same' => 'This field and :other must match.',
'size' => [
'same' => 'This field and :other must match.',
'size' => [
'numeric' => 'Must be :size.',
'file' => 'Must be :size kilobytes.',
'string' => 'Must be :size characters.',
'array' => 'Must contain :size items.',
'file' => 'Must be :size kilobytes.',
'string' => 'Must be :size characters.',
'array' => 'Must contain :size items.',
],
'starts_with' => 'Must start with :values',
'string' => 'Must be a string.',
'timezone' => 'Must be a valid zone.',
'unique' => 'This value has already been taken.',
'uploaded' => 'Failed to upload.',
'url' => 'Format is invalid.',
'starts_with' => 'Must start with :values',
'string' => 'Must be a string.',
'timezone' => 'Must be a valid zone.',
'unique' => 'This value has already been taken.',
'uploaded' => 'Failed to upload.',
'url' => 'Format is invalid.',

/*
|--------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 304f199

Please sign in to comment.