Skip to content

Commit

Permalink
Code style: ternary_operator_spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mtvbrianking committed Feb 1, 2021
1 parent 6708742 commit 6bff19e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .php_cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

// https://mlocati.github.io/php-cs-fixer-configurator/
// https://mlocati.github.io/php-cs-fixer-configurator

$rules = [
'@PSR2' => true,
Expand Down Expand Up @@ -31,6 +31,7 @@ $rules = [
'concat_space' => [
'spacing' => 'none',
],
'ternary_operator_spaces' => true,
'blank_line_before_statement' => true,
'method_chaining_indentation' => true,
'ordered_imports' => [
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![](./images/banner.png)

[![Tests](https://github.com/mtvbrianking/laravel-route-list/workflows/run-tests/badge.svg)](https://github.com/mtvbrianking/laravel-route-list/actions?query=workflow:run-tests)
[![Documentation](https://github.com/mtvbrianking/laravel-route-list/workflows/gen-docs/badge.svg)](https://mtvbrianking.github.io/laravel-route-list/master)
[![Tests](https://github.com/mtvbrianking/laravel-artisan-gui/workflows/run-tests/badge.svg)](https://github.com/mtvbrianking/laravel-artisan-gui/actions?query=workflow:run-tests)
[![Documentation](https://github.com/mtvbrianking/laravel-artisan-gui/workflows/gen-docs/badge.svg)](https://mtvbrianking.github.io/laravel-artisan-gui/master)
[![Code Quality](https://scrutinizer-ci.com/g/mtvbrianking/laravel-artisan-gui/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mtvbrianking/laravel-artisan-gui/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/mtvbrianking/laravel-artisan-gui/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mtvbrianking/laravel-artisan-gui/?branch=master)
[![Code Style](https://github.styleci.io/repos/334360362/shield?branch=master)](https://github.styleci.io/repos/334360362)
Expand Down
4 changes: 2 additions & 2 deletions src/Http/CommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected function rules(Command $command): array
foreach ($command->getDefinition()->getArguments() as $argument) {
$rules[$argument->getName()] = array_filter([
$argument->isRequired() ? 'required' : 'nullable',
$argument->isArray() ? 'array': '',
$argument->isArray() ? 'array' : '',
]);
}

Expand All @@ -176,7 +176,7 @@ protected function rules(Command $command): array

$rules["--{$name}"] = array_filter([
$option->isValueRequired() ? 'required' : 'nullable',
$option->isArray() ? 'array': ($option->acceptValue() ? 'string' : 'bool'),
$option->isArray() ? 'array' : ($option->acceptValue() ? 'string' : 'bool'),
]);
}

Expand Down

0 comments on commit 6bff19e

Please sign in to comment.