Skip to content

Commit

Permalink
Composeer.json: Fix PhpStan
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Apr 14, 2020
1 parent 30ef3f3 commit 4eb9d27
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/StatisticsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ public function getNumbers(string $query): array

/**
* @param string $data
* @return int[][]|float[][]
* @return float[][]
*/
public function getData(string $data): array
{
$return = [];

foreach (explode("\n", Strings::normalize($data)) as $line) {
$return[] = $this->getNumbers($line);
$numbers = [];
foreach ($this->getNumbers($line) as $number) {
$numbers[] = (float) $number;
}
$return[] = $numbers;
}

return $return;
Expand Down

0 comments on commit 4eb9d27

Please sign in to comment.