Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
parameters:
ignoreErrors:
-
message: '#^Instanceof between ArrayAccess and ArrayAccess will always evaluate to true\.$#'
identifier: instanceof.alwaysTrue
count: 1
path: src/AbstractTransport.php

-
message: '#^Result of && is always false\.$#'
identifier: booleanAnd.alwaysFalse
count: 1
path: src/AbstractTransport.php

-
message: '#^Instanceof between ArrayAccess and ArrayAccess will always evaluate to true\.$#'
identifier: instanceof.alwaysTrue
count: 1
path: src/Http.php

-
message: '#^Instanceof between Joomla\\Uri\\UriInterface and Joomla\\Uri\\UriInterface will always evaluate to true\.$#'
identifier: instanceof.alwaysTrue
count: 1
path: src/Http.php

-
message: '#^Result of && is always false\.$#'
identifier: booleanAnd.alwaysFalse
count: 1
path: src/Http.php

-
message: '#^Instanceof between ArrayAccess and ArrayAccess will always evaluate to true\.$#'
identifier: instanceof.alwaysTrue
count: 2
path: src/HttpFactory.php

-
message: '#^Result of && is always false\.$#'
identifier: booleanAnd.alwaysFalse
count: 2
path: src/HttpFactory.php
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

includes:
- phpstan-baseline.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon

parameters:
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,6 @@ protected function connect(UriInterface $uri, $timeout = null)
*/
public static function isSupported()
{
return \function_exists('fsockopen') && \is_callable('fsockopen');
return \function_exists('fsockopen');
}
}
2 changes: 1 addition & 1 deletion src/Transport/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,6 @@ protected function getResponse(array $headers, $body)
*/
public static function isSupported()
{
return \function_exists('fopen') && \is_callable('fopen') && ini_get('allow_url_fopen');
return \function_exists('fopen') && ini_get('allow_url_fopen');
}
}