diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc30f6e..1ebc1b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,17 @@ image: lorisleiva/laravel-docker:latest +# https://lorisleiva.com/laravel-deployment-using-gitlab-pipelines/ + # Replace the last line with the following lines if you'd rather # leave StrictHostKeyChecking enabled (replace yourdomain.com): # # ssh-keyscan yourdomain.com >> ~/.ssh/known_hosts # chmod 644 ~/.ssh/known_hosts - + .change_file_permissions: &change_file_permissions | - find . -type f -not -path "./vendor/*" -exec chmod 664 {} \; + find . -type f -not -path "./vendor/*" -exec chmod 664 {} \; find . -type d -not -path "./vendor/*" -exec chmod 775 {} \; - + composer: stage: build cache: @@ -48,11 +50,14 @@ codestyle: dependencies: [] script: - phpcs --standard=PSR2 --extensions=php --ignore=app/Support/helpers.php app - + phpunit: stage: test dependencies: - composer script: - phpunit --coverage-text --colors=never + artifacts: + paths: + - storage/ diff --git a/app/Policies/EventPolicy.php b/app/Policies/EventPolicy.php index 01c7f59..9876616 100644 --- a/app/Policies/EventPolicy.php +++ b/app/Policies/EventPolicy.php @@ -58,9 +58,9 @@ class EventPolicy } else { $testedUser = $event->guests()->where('users.id', $user->id)->first(); if ($testedUser !== null) { - if($testedUser->pivot->is_staff) { + if ($testedUser->pivot->is_staff) { return $testedUser->pivot->is_staff; - } else if (!$event->private) { + } elseif (!$event->private) { return true; } }