Skip to content

Commit

Permalink
Use dev version of Yii Data + increase psalm level to 1 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Nov 21, 2023
1 parent 42a3986 commit b0052d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
"url": "https://github.com/sponsors/yiisoft"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.0",
"yiisoft/db": "^1.0",
"yiisoft/data": "^1.0"
"yiisoft/data": "dev-master"
},
"require-dev": {
"maglnet/composer-require-checker": "^4.2",
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
2 changes: 2 additions & 0 deletions src/AbstractQueryDataReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ public function withFilterHandlers(FilterHandlerInterface ...$filterHandlers): s

/**
* @return QueryHandlerInterface[]
* @psalm-return array<string, QueryHandlerInterface>
*/
private function prepareHandlers(QueryHandlerInterface ...$queryHandlers): array
{
Expand Down Expand Up @@ -337,6 +338,7 @@ public function getSort(): ?Sort
public function read(): array
{
if ($this->data === null) {
/** @psalm-var array<TKey, TValue> */
$this->data = $this->getPreparedQuery()->all();
}

Expand Down
4 changes: 0 additions & 4 deletions src/Filter/CompareFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ protected function formatValue(mixed $value): mixed
return $value;
}

/**
* @psalm-param array<int, mixed> $values
* @return array
*/
protected function formatValues(array $values): array
{
return array_map([$this, 'formatValue'], $values);

Check warning on line 63 in src/Filter/CompareFilter.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.2-ubuntu-latest

Escaped Mutant for Mutator "UnwrapArrayMap": --- Original +++ New @@ @@ } protected function formatValues(array $values) : array { - return array_map([$this, 'formatValue'], $values); + return $values; } public function toCriteriaArray() : array {
Expand Down

0 comments on commit b0052d1

Please sign in to comment.