Skip to content

Commit

Permalink
Resolved remaining psalm issues and updated composer.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoboss committed Feb 13, 2022
1 parent bae1793 commit a352016
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 22 deletions.
7 changes: 5 additions & 2 deletions composer.json
Expand Up @@ -13,11 +13,11 @@
"require": {
"php": "~8.1.0 || ~8.2.0",
"ext-mbstring": "*",
"elephox/mimey": "^4.0",
"jetbrains/phpstorm-attributes": "^1.0",
"psr/cache": "^3.0",
"psr/container": "^2.0",
"ricardoboss/php-console-logger": "^1.8",
"elephox/mimey": "^4.0"
"ricardoboss/php-console-logger": "^1.8"
},
"require-dev": {
"ext-json": "*",
Expand Down Expand Up @@ -149,6 +149,9 @@
"phpunit --configuration=phpunit.xml.dist --no-interaction --coverage-xml=build/coverage/coverage-xml --log-junit=build/coverage/junit.xml --coverage-clover=build/coverage/clover.xml --coverage-html=build/coverage/html"
],
"local-ci": [
"@composer validate --no-interaction --strict",
"@composer install --no-interaction --no-scripts --ignore-platform-req=php+",
"@composer modules:normalize",
"@update-readme",
"@check-dependencies",
"@static-analysis",
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/Cache/composer.json
Expand Up @@ -11,11 +11,11 @@
],
"require": {
"php": "~8.1.0 || ~8.2.0",
"psr/cache": "^3.0",
"elephox/collection": "^0.3",
"elephox/files": "^0.3",
"elephox/stream": "^0.3",
"jetbrains/phpstorm-attributes": "^1.0"
"jetbrains/phpstorm-attributes": "^1.0",
"psr/cache": "^3.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion modules/Collection/src/Contract/GenericEnumerable.php
Expand Up @@ -309,7 +309,7 @@ public function takeWhile(callable $predicate): GenericEnumerable;
/**
* @template TArrayKey as array-key
*
* @param null|callable(TSource): TArrayKey $keySelector
* @param null|callable(NonNegativeInteger, TSource): TArrayKey $keySelector
*
* @return array<TArrayKey, TSource>
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/Files/composer.json
Expand Up @@ -12,9 +12,9 @@
"require": {
"php": "~8.1.0 || ~8.2.0",
"elephox/collection": "^0.3",
"elephox/support": "^0.3",
"elephox/stream": "^0.3",
"elephox/mimey": "^4.0",
"elephox/stream": "^0.3",
"elephox/support": "^0.3",
"jetbrains/phpstorm-attributes": "^1.0"
},
"autoload": {
Expand Down
2 changes: 2 additions & 0 deletions modules/Http/composer.json
Expand Up @@ -8,6 +8,8 @@
"ext-mbstring": "*",
"elephox/collection": "^0.3",
"elephox/files": "^0.3",
"elephox/mimey": "^4.0",
"elephox/oor": "^0.3",
"elephox/stream": "^0.3",
"elephox/support": "^0.3",
"jetbrains/phpstorm-attributes": "^1.0"
Expand Down
2 changes: 1 addition & 1 deletion modules/Http/src/Contract/Response.php
Expand Up @@ -5,7 +5,7 @@

use Elephox\Http\ResponseCode;
use JetBrains\PhpStorm\Pure;
use Mimey\MimeTypeInterface;
use Elephox\Mimey\MimeTypeInterface;

interface Response extends Message
{
Expand Down
2 changes: 1 addition & 1 deletion modules/Http/src/Contract/ResponseBuilder.php
Expand Up @@ -4,7 +4,7 @@
namespace Elephox\Http\Contract;

use Elephox\Http\ResponseCode;
use Mimey\MimeTypeInterface;
use Elephox\Mimey\MimeTypeInterface;

/**
* @psalm-consistent-constructor
Expand Down
2 changes: 1 addition & 1 deletion modules/Http/src/Response.php
Expand Up @@ -7,7 +7,7 @@
use Elephox\Stream\Contract\Stream;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Pure;
use Mimey\MimeTypeInterface;
use Elephox\Mimey\MimeTypeInterface;

#[Immutable]
class Response extends AbstractMessage implements Contract\Response
Expand Down
4 changes: 2 additions & 2 deletions modules/Http/src/ResponseBuilder.php
Expand Up @@ -9,8 +9,8 @@
use JetBrains\PhpStorm\Pure;
use JsonException;
use LogicException;
use Mimey\MimeType;
use Mimey\MimeTypeInterface;
use Elephox\Mimey\MimeType;
use Elephox\Mimey\MimeTypeInterface;

/**
* @psalm-consistent-constructor
Expand Down
15 changes: 10 additions & 5 deletions modules/Stream/src/StringStream.php
Expand Up @@ -13,9 +13,14 @@
class StringStream implements Stream
{
#[Pure]
public static function from(string|Stringable $string): Stream
public static function from(
string|Stringable $string,
bool $seekable = true,
bool $writeable = false,
bool $readable = true
): Stream
{
return new self($string);
return new self((string)$string, $readable, $seekable, $writeable);
}

private bool $detached = false;
Expand All @@ -26,9 +31,9 @@ public static function from(string|Stringable $string): Stream
#[Pure]
public function __construct(
private string $string,
private bool $seekable = true,
private bool $writeable = false,
private bool $readable = true
private bool $readable = true,
private bool $seekable = true,
private bool $writeable = false
) {
}

Expand Down

0 comments on commit a352016

Please sign in to comment.