Skip to content

Commit 8c395a1

Browse files
authored
Apply fixes from StyleCI (#163)
1 parent d285850 commit 8c395a1

6 files changed

+6
-30
lines changed

src/HttpAsyncClientDiscovery.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ public static function find()
2424
try {
2525
$asyncClient = static::findOneByType(HttpAsyncClient::class);
2626
} catch (DiscoveryFailedException $e) {
27-
throw new NotFoundException(
28-
'No HTTPlug async clients found. Make sure to install a package providing "php-http/async-client-implementation". Example: "php-http/guzzle6-adapter".',
29-
0,
30-
$e
31-
);
27+
throw new NotFoundException('No HTTPlug async clients found. Make sure to install a package providing "php-http/async-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
3228
}
3329

3430
return static::instantiateClass($asyncClient);

src/HttpClientDiscovery.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ public static function find()
2424
try {
2525
$client = static::findOneByType(HttpClient::class);
2626
} catch (DiscoveryFailedException $e) {
27-
throw new NotFoundException(
28-
'No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter".',
29-
0,
30-
$e
31-
);
27+
throw new NotFoundException('No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
3228
}
3329

3430
return static::instantiateClass($client);

src/MessageFactoryDiscovery.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ public static function find()
2626
try {
2727
$messageFactory = static::findOneByType(MessageFactory::class);
2828
} catch (DiscoveryFailedException $e) {
29-
throw new NotFoundException(
30-
'No message factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.',
31-
0,
32-
$e
33-
);
29+
throw new NotFoundException('No message factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e);
3430
}
3531

3632
return static::instantiateClass($messageFactory);

src/Psr18ClientDiscovery.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ public static function find()
2424
try {
2525
$client = static::findOneByType(ClientInterface::class);
2626
} catch (DiscoveryFailedException $e) {
27-
throw new \Http\Discovery\Exception\NotFoundException(
28-
'No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".',
29-
0,
30-
$e
31-
);
27+
throw new \Http\Discovery\Exception\NotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
3228
}
3329

3430
return static::instantiateClass($client);

src/StreamFactoryDiscovery.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ public static function find()
2626
try {
2727
$streamFactory = static::findOneByType(StreamFactory::class);
2828
} catch (DiscoveryFailedException $e) {
29-
throw new NotFoundException(
30-
'No stream factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.',
31-
0,
32-
$e
33-
);
29+
throw new NotFoundException('No stream factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e);
3430
}
3531

3632
return static::instantiateClass($streamFactory);

src/UriFactoryDiscovery.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ public static function find()
2626
try {
2727
$uriFactory = static::findOneByType(UriFactory::class);
2828
} catch (DiscoveryFailedException $e) {
29-
throw new NotFoundException(
30-
'No uri factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.',
31-
0,
32-
$e
33-
);
29+
throw new NotFoundException('No uri factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e);
3430
}
3531

3632
return static::instantiateClass($uriFactory);

0 commit comments

Comments
 (0)