Skip to content

Commit ec95066

Browse files
committed
Modernize codestyle
1 parent 86691d3 commit ec95066

1 file changed

Lines changed: 4 additions & 15 deletions

File tree

src/StatisticsManager.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,37 @@ final class StatisticsManager
2020
private $entityManager;
2121

2222

23-
/**
24-
* @param EntityManager $entityManager
25-
*/
2623
public function __construct(EntityManager $entityManager)
2724
{
2825
$this->entityManager = $entityManager;
2926
}
3027

3128

3229
/**
33-
* @param string $query
3430
* @return string[]
3531
*/
3632
public function getNumbers(string $query): array
3733
{
38-
$numbers = [];
39-
4034
$query = (string) preg_replace('/[^0-9-.\/]/', ';', $query);
4135
$query = (string) preg_replace('/\;+/', ';', $query);
4236

37+
$return = [];
4338
foreach (explode(';', $query) as $number) {
4439
if (Validators::isNumeric($number)) {
45-
$numbers[] = $number;
40+
$return[] = $number;
4641
}
4742
}
4843

49-
return $numbers;
44+
return $return;
5045
}
5146

5247

5348
/**
54-
* @param string $data
5549
* @return float[][]
5650
*/
5751
public function getData(string $data): array
5852
{
5953
$return = [];
60-
6154
foreach (explode("\n", Strings::normalize($data)) as $line) {
6255
$numbers = [];
6356
foreach ($this->getNumbers($line) as $number) {
@@ -111,7 +104,6 @@ public function getAverage(array $array)
111104

112105
/**
113106
* @param string[] $sequence
114-
* @param int $limit
115107
* @return Sequence[]
116108
*/
117109
public function getSequences(array $sequence, int $limit = 6): array
@@ -141,10 +133,7 @@ public function getSequences(array $sequence, int $limit = 6): array
141133

142134

143135
/**
144-
* @param string $aId
145-
* @return Sequence
146-
* @throws EntityManagerException
147-
* @throws NoResultException|NonUniqueResultException
136+
* @throws EntityManagerException|NoResultException|NonUniqueResultException
148137
*/
149138
public function getSequence(string $aId): Sequence
150139
{

0 commit comments

Comments
 (0)