Merge pull request #20476 from nextcloud/techdebt/php-cs-check-action

Add php-cs check action
This commit is contained in:
Roeland Jago Douma 2020-04-15 08:30:29 +02:00 committed by GitHub
commit b212151af1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -18,3 +18,19 @@ jobs:
coverage: none
- name: Lint
run: composer run lint
php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: 7.4
coverage: none
- name: Install dependencies
run: composer i
- name: Run coding standards check
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

View File

@ -558,7 +558,7 @@ class GroupsControllerTest extends \Test\TestCase {
$this->userManager->expects($this->any())
->method('get')
->willReturnCallback(function(string $uid) use ($users) {
->willReturnCallback(function (string $uid) use ($users) {
return isset($users[$uid]) ? $users[$uid] : null;
});