Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 3, 2023
1 parent a6e4bee commit 2e48d9f
Show file tree
Hide file tree
Showing 32 changed files with 139 additions and 154 deletions.
30 changes: 15 additions & 15 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
parameters:
ignoreErrors:
-
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\ArtistSearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\ArtistSearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/ArtistSearchBuilder.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\ArtistSearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\ArtistSearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/ArtistSearchBuilder.php

-
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\CitySearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\CitySearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/CitySearchBuilder.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\CitySearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\CitySearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/CitySearchBuilder.php

-
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\SetlistSearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\SetlistSearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/SetlistSearchBuilder.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\SetlistSearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\SetlistSearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/SetlistSearchBuilder.php

-
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\VenueSearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\VenueSearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/VenueSearchBuilder.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Builder\\\\VenueSearchBuilder\\:\\:getQuery\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Property Nucleos\\\\SetlistFm\\\\Builder\\\\VenueSearchBuilder\\:\\:\\$query type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Builder/VenueSearchBuilder.php

Expand All @@ -51,22 +51,22 @@ parameters:
path: src/Connection/ConnectionInterface.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:call\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:buildRequest\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#"
count: 1
path: src/Connection/PsrClientConnection.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:call\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:call\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#"
count: 1
path: src/Connection/PsrClientConnection.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:parseResponse\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:call\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Connection/PsrClientConnection.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:buildRequest\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Connection\\\\PsrClientConnection\\:\\:parseResponse\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Connection/PsrClientConnection.php

Expand Down Expand Up @@ -111,17 +111,17 @@ parameters:
path: src/Model/Set.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Model\\\\Setlist\\:\\:fromApi\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Model\\\\Setlist\\:\\:createSetsFromApi\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
path: src/Model/Setlist.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Model\\\\Setlist\\:\\:createSetsFromApi\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Model\\\\Setlist\\:\\:createSetsFromApi\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Model/Setlist.php

-
message: "#^Method Nucleos\\\\SetlistFm\\\\Model\\\\Setlist\\:\\:createSetsFromApi\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Method Nucleos\\\\SetlistFm\\\\Model\\\\Setlist\\:\\:fromApi\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
path: src/Model/Setlist.php

Expand Down
8 changes: 1 addition & 7 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="3.12.1@9b860214d58c48b5cbe99bdb17914d0eb723c9cd">
<file src="tests/bootstrap.php">
<UnresolvableInclude occurrences="1">
<code>require_once current($files)</code>
</UnresolvableInclude>
</file>
</files>
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591"/>
2 changes: 1 addition & 1 deletion src/Builder/ArtistSearchBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private function __construct()

public static function create(): self
{
return new static();
return new self();
}

public function page(int $page): self
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/CitySearchBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private function __construct()

public static function create(): self
{
return new static();
return new self();
}

public function page(int $page): self
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/SetlistSearchBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private function __construct()

public static function create(): self
{
return new static();
return new self();
}

public function page(int $page): self
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/VenueSearchBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private function __construct()

public static function create(): self
{
return new static();
return new self();
}

public function page(int $page): self
Expand Down
3 changes: 0 additions & 3 deletions src/Connection/AbstractConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ abstract class AbstractConnection implements ConnectionInterface
*/
private $uri;

/**
* @param string $uri
*/
public function __construct(string $apikey, string $uri = null)
{
if (null === $uri) {
Expand Down
2 changes: 0 additions & 2 deletions src/Connection/PsrClientConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ final class PsrClientConnection extends AbstractConnection

/**
* Initialize client.
*
* @param string $uri
*/
public function __construct(ClientInterface $client, RequestFactoryInterface $requestFactory, string $apiKey, string $uri = null)
{
Expand Down
4 changes: 1 addition & 3 deletions src/Exception/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@

use Exception;

final class NotFoundException extends Exception
{
}
final class NotFoundException extends Exception {}
16 changes: 8 additions & 8 deletions tests/Builder/ArtistSearchBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function testCreate(): void
$expected = [
'p' => 1,
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithTmbid(): void
Expand All @@ -37,7 +37,7 @@ public function testWithTmbid(): void
'p' => 1,
'artistTmid' => 123,
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithMbid(): void
Expand All @@ -50,7 +50,7 @@ public function testWithMbid(): void
'p' => 1,
'artistMbid' => 'a466c2a2-6517-42fb-a160-1087c3bafd9f',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithName(): void
Expand All @@ -63,7 +63,7 @@ public function testWithName(): void
'p' => 1,
'artistName' => 'FooBar',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithNameOverride(): void
Expand All @@ -77,7 +77,7 @@ public function testWithNameOverride(): void
'p' => 1,
'artistName' => 'BarBaz',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testSortByRelevance(): void
Expand All @@ -90,7 +90,7 @@ public function testSortByRelevance(): void
'p' => 1,
'sort' => 'relevance',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testSortWithInvalidType(): void
Expand All @@ -113,7 +113,7 @@ public function testSortByName(): void
'p' => 1,
'sort' => 'sortName',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testPage(): void
Expand All @@ -125,6 +125,6 @@ public function testPage(): void
$expected = [
'p' => 42,
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}
}
12 changes: 6 additions & 6 deletions tests/Builder/CitySearchBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testCreate(): void
$expected = [
'p' => 1,
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithState(): void
Expand All @@ -36,7 +36,7 @@ public function testWithState(): void
'p' => 1,
'state' => 'Lower Saxony',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithName(): void
Expand All @@ -49,7 +49,7 @@ public function testWithName(): void
'p' => 1,
'name' => 'Hamburg',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithCountry(): void
Expand All @@ -62,7 +62,7 @@ public function testWithCountry(): void
'p' => 1,
'country' => 'DE',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testWithStateCode(): void
Expand All @@ -75,7 +75,7 @@ public function testWithStateCode(): void
'p' => 1,
'stateCode' => 'NY',
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}

public function testPage(): void
Expand All @@ -87,6 +87,6 @@ public function testPage(): void
$expected = [
'p' => 42,
];
static::assertSame($expected, $builder->getQuery());
self::assertSame($expected, $builder->getQuery());
}
}
Loading

0 comments on commit 2e48d9f

Please sign in to comment.