Skip to content

Commit

Permalink
fix(.php-cs-fixer): update curly_braces_position
Browse files Browse the repository at this point in the history
- 'curly_braces_position' changed to 'braces_position'
  • Loading branch information
guanguans committed Oct 18, 2023
1 parent fcc499e commit ce02d1f
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 52 deletions.
13 changes: 8 additions & 5 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
// array_notation

// basic
'curly_braces_position' => [
'braces_position' => [
'control_structures_opening_brace' => 'same_line',
'functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_functions_opening_brace' => 'same_line',
Expand Down Expand Up @@ -197,7 +197,7 @@
// list_notation

// namespace_notation
'no_blank_lines_before_namespace' => false,
'blank_lines_before_namespace' => true,

// naming

Expand All @@ -219,6 +219,8 @@
'methods' => [],
],
'php_unit_test_class_requires_covers' => false,
'php_unit_data_provider_name' => true,
'php_unit_data_provider_return_type' => true,

// phpdoc
'phpdoc_align' => [
Expand Down Expand Up @@ -259,6 +261,7 @@
'var',
],
],
'phpdoc_param_order' => true,

// return_notation
'simplified_null_return' => true,
Expand Down Expand Up @@ -305,8 +308,8 @@
'functions' => ['print_r', 'var_dump', 'var_export'],
],
// PhpCsFixerCustomFixers\Fixer\ConstructorEmptyBracesFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\DataProviderNameFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\DataProviderReturnTypeFixer::name() => true,
// PhpCsFixerCustomFixers\Fixer\DataProviderNameFixer::name() => true,
// PhpCsFixerCustomFixers\Fixer\DataProviderReturnTypeFixer::name() => true,
// PhpCsFixerCustomFixers\Fixer\DeclareAfterOpeningTagFixer::name() => true,
// PhpCsFixerCustomFixers\Fixer\EmptyFunctionBodyFixer::name() => true,
// PhpCsFixerCustomFixers\Fixer\IssetToArrayKeyExistsFixer::name() => true,
Expand Down Expand Up @@ -357,7 +360,7 @@
// 'var',
// ],
// ],
PhpCsFixerCustomFixers\Fixer\PhpdocParamOrderFixer::name() => true,
// PhpCsFixerCustomFixers\Fixer\PhpdocParamOrderFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocParamTypeFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocSelfAccessorFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocSingleLineVarFixer::name() => true,
Expand Down
16 changes: 4 additions & 12 deletions _ide_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
*/

namespace {
class Soar extends \Guanguans\LaravelSoar\Facades\Soar
{
}
class Soar extends \Guanguans\LaravelSoar\Facades\Soar {}
}

namespace Illuminate\Database\Query {
Expand All @@ -34,9 +32,7 @@ class Soar extends \Guanguans\LaravelSoar\Facades\Soar
* @see \Guanguans\LaravelSoar\Macros\QueryBuilderMacro
* @see \Illuminate\Database\Query\Builder
*/
class Builder
{
}
class Builder {}
}

namespace Illuminate\Database\Eloquent {
Expand All @@ -59,9 +55,7 @@ class Builder
* @see \Guanguans\LaravelSoar\Macros\QueryBuilderMacro
* @see \Illuminate\Database\Eloquent\Builder
*/
class Builder
{
}
class Builder {}
}

namespace Illuminate\Database\Eloquent\Relations {
Expand All @@ -84,7 +78,5 @@ class Builder
* @see \Guanguans\LaravelSoar\Macros\QueryBuilderMacro
* @see \Illuminate\Database\Eloquent\Relations\Relation
*/
class Relation
{
}
class Relation {}
}
4 changes: 1 addition & 3 deletions src/Contracts/Throwable.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@

namespace Guanguans\LaravelSoar\Contracts;

interface Throwable extends \Throwable
{
}
interface Throwable extends \Throwable {}
4 changes: 1 addition & 3 deletions src/Exceptions/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@

use Guanguans\LaravelSoar\Contracts\Throwable;

class InvalidArgumentException extends \InvalidArgumentException implements Throwable
{
}
class InvalidArgumentException extends \InvalidArgumentException implements Throwable {}
2 changes: 0 additions & 2 deletions src/Facades/Soar.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ class Soar extends Facade
{
/**
* @noinspection MissingParentCallInspection
*
* {@inheritDoc}
*/
protected static function getFacadeAccessor(): string
{
Expand Down
5 changes: 3 additions & 2 deletions src/JavascriptRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ protected function getModifiedTime(?string $type): int
}

/**
* {@inheritDoc}
*
* @noinspection MissingParentCallInspection
*
* @param mixed $uri
* @param mixed $root
*/
protected function makeUriRelativeTo($uri, $root)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Outputs/DebugBarOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(string $name = 'Soar Scores', string $label = 'warni
}

/**
* {@inheritDoc}
* @param mixed $dispatcher
*
* @throws \JsonException
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Outputs/DumpOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public function __construct(bool $exit = false)
}

/**
* {@inheritDoc}
*
* @noinspection ForgottenDebugOutputInspection
* @noinspection ClosureToArrowFunctionInspection
* @noinspection DebugFunctionUsageInspection
*
* @param mixed $dispatcher
*/
public function output(Collection $scores, $dispatcher): void
{
Expand Down
8 changes: 4 additions & 4 deletions src/Outputs/ErrorLogOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function __construct(int $messageType = 0, string $destination = '', stri
}

/**
* {@inheritDoc}
*
* @throws \JsonException
*
* @noinspection ForgottenDebugOutputInspection
* @noinspection DebugFunctionUsageInspection
*
* @param mixed $dispatcher
*
* @throws \JsonException
*/
public function output(Collection $scores, $dispatcher): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Outputs/LogOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(string $channel = 'daily', string $level = 'warning'
}

/**
* {@inheritDoc}
* @param mixed $dispatcher
*
* @throws \JsonException
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Outputs/RayOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public function __construct(string $label = 'Soar Scores')
}

/**
* {@inheritDoc}
*
* @psalm-suppress UndefinedDocblockClass
*
* @param mixed $dispatcher
*/
public function output(Collection $scores, $dispatcher): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Outputs/SoarBarOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(string $name = 'Scores', string $label = 'warning')
}

/**
* {@inheritDoc}
* @param mixed $dispatcher
*
* @throws \JsonException
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Outputs/SyslogOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(int $priority = LOG_WARNING)
}

/**
* {@inheritDoc}
* @param mixed $dispatcher
*
* @throws \JsonException
*/
Expand Down
12 changes: 4 additions & 8 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
namespace Tests;

uses(TestCase::class)
->beforeAll(function (): void {
})
->beforeEach(function (): void {
})
->afterEach(function (): void {
})
->afterAll(function (): void {
})
->beforeAll(function (): void {})
->beforeEach(function (): void {})
->afterEach(function (): void {})
->afterAll(function (): void {})
->in(__DIR__);

expect()->extend('between', function (int $min, $max) {
Expand Down
7 changes: 2 additions & 5 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ protected function getPackageProviders($app)
];
}

/**
* {@inheritDoc}
*/
protected function defineEnvironment($app): void
{
config()->set('app.key', 'base64:6Cu/ozj4gPtIjmXjr8EdVnGFNsdRqZfHfVjQkmTlg4Y=');
Expand Down Expand Up @@ -138,10 +135,10 @@ protected function setUpDatabase(): void
}

/**
* {@inheritDoc}
*
* @noinspection PhpUndefinedMethodInspection
* @noinspection PhpUndefinedFieldInspection
*
* @param mixed $router
*/
protected function defineRoutes($router): void
{
Expand Down

0 comments on commit ce02d1f

Please sign in to comment.