Skip to content

Commit

Permalink
use more of the default symfony cs fixer rules
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Jan 19, 2025
1 parent a69d991 commit 6754d42
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 108 deletions.
4 changes: 0 additions & 4 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
'static_lambda' => true,
'ternary_to_null_coalescing' => true,
'void_return' => true,
'new_with_parentheses' => false,
'php_unit_data_provider_static' => false,
'php_unit_data_provider_name' => false,
'php_unit_data_provider_return_type' => false,

// Don't mark tests as @internal
'php_unit_internal_class' => false,
Expand Down
2 changes: 1 addition & 1 deletion tests/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function setUp(): void

public function testBuild(): void
{
$c = new class() {
$c = new class {
/**
* @var Nested
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Metadata/PropertyTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
class PropertyTypeTest extends TestCase
{
public function provideMergeCases(): iterable
public static function provideMergeCases(): iterable
{
yield [
new PropertyTypeUnknown(true),
Expand Down
6 changes: 3 additions & 3 deletions tests/Metadata/VersionRangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testWithUntil(): void
$this->assertSame('2', $version->getUntil());
}

public function provideIsIncludedCases(): iterable
public static function provideIsIncludedCases(): iterable
{
return [
'null is lowest and highest' => [
Expand Down Expand Up @@ -93,7 +93,7 @@ public function testIsIncluded(VersionRange $versionRange, string $version, bool
$this->assertSame($expected, $versionRange->isIncluded($version));
}

public function provideAllowsLowerThanCases(): iterable
public static function provideAllowsLowerThanCases(): iterable
{
return [
'same null' => [
Expand Down Expand Up @@ -137,7 +137,7 @@ public function testAllowsLowerThan(VersionRange $versionRange, VersionRange $ot
$this->assertSame($lower, $versionRange->allowsLowerThan($other));
}

public function provideAllowsHigherThanCases(): iterable
public static function provideAllowsHigherThanCases(): iterable
{
return [
'same null' => [
Expand Down
8 changes: 4 additions & 4 deletions tests/ModelParser/JMSParserTest81.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class JMSParserTest81 extends JMSParserTestCase
{
public function testReadOnlyProperty(): void
{
$c = new class() {
$c = new class {
/**
* @JMS\ReadOnlyProperty()
*/
Expand All @@ -35,7 +35,7 @@ public function testReadOnlyProperty(): void

public function testAttributes(): void
{
$c = new class() {
$c = new class {
#[JMS\Type('string')]
private $property1;

Expand All @@ -62,7 +62,7 @@ public function testAttributes(): void

public function testAttributesMixedWithAnnotations(): void
{
$c = new class() {
$c = new class {
/**
* @JMS\SerializedName("property_mixed")
*
Expand Down Expand Up @@ -106,7 +106,7 @@ public function testAttributesMixedWithAnnotations(): void

public function testVirtualPropertyWithoutDocblock(): void
{
$c = new class() {
$c = new class {
#[JMS\VirtualProperty]
public function foo(): string
{
Expand Down
Loading

0 comments on commit 6754d42

Please sign in to comment.