Skip to content

Commit

Permalink
Merge pull request #12 from laracasts/pr-2
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
lukeraymonddowning authored Aug 12, 2024
2 parents 134eb3f + 0d35bab commit 6f34a42
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/laravel-pint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Laravel Pint

on:
pull_request
push:
branches:
- main

jobs:
laravel-pint:
Expand All @@ -10,6 +12,8 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v4.1.7
with:
ref: ${{ github.head_ref }}

- name: Setup PHP and Composer
uses: shivammathur/setup-php@2.31.1
Expand All @@ -21,7 +25,12 @@ jobs:
run: composer global require laravel/pint

- name: Run Laravel Pint
run: pint --test
run: pint

- name: Push Back to Repo
run: echo "TODO"
run: |
git config user.name "gh-actions"
git config user.email "gh-actions@laracasts.com"
git add .
git commit -m "Laravel Pint" || exit 0
git push
10 changes: 4 additions & 6 deletions app/Actions/Fortify/CreateNewUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ class CreateNewUser implements CreatesNewUsers
/**
* Create a newly registered user.
*
* @param array<string, string> $input
* @param array<string, string> $input
*/
public function create(array $input): User
{
// This is a random comment!
public function create(array $input): User {
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'name' => ['required', 'string', 'max:255', 'nullable'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => $this->passwordRules(),
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
Expand All @@ -47,7 +45,7 @@ protected function createTeam(User $user): void
{
$user->ownedTeams()->save(Team::forceCreate([
'user_id' => $user->id,
'name' => explode(' ', $user->name, 2)[0] . "'s Team",
'name' => explode(' ', $user->name, 2)[0]."'s Team",
'personal_team' => true,
]));
}
Expand Down
4 changes: 1 addition & 3 deletions app/Actions/Jetstream/DeleteUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ class DeleteUser implements DeletesUsers
/**
* Create a new action instance.
*/
public function __construct(protected DeletesTeams $deletesTeams)
{
}
public function __construct(protected DeletesTeams $deletesTeams) {}

/**
* Delete the given user.
Expand Down

0 comments on commit 6f34a42

Please sign in to comment.