Skip to content

Commit

Permalink
updating style (PER) 💅
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-butti committed Dec 26, 2023
1 parent 5c86f52 commit f55519d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Freq.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function frequencies(array $data, bool $transformToInteger = false
if (Stat::count($data) === 0) {
return [];
}
if ($transformToInteger || ! self::isDiscreteType($data[0])) {
if ($transformToInteger || !self::isDiscreteType($data[0])) {
foreach ($data as $key => $value) {
$data[$key] = (int) $value;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Stat.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public static function harmonicMean(array $data, ?array $weights = null, ?int $r
}
$sumWeigth = 0;
foreach ($data as $key => $value) {
if (! $value) {
if (!$value) {
return 0;
}
$weight = is_null($weights) ? 1 : $weights[$key];
Expand Down Expand Up @@ -407,13 +407,13 @@ public static function covariance(array $x, array $y): false|float

for ($pos = 0; $pos < $countX; $pos++) {
$valueX = $x[$pos];
if (! is_numeric($valueX)) {
if (!is_numeric($valueX)) {
throw new InvalidDataInputException(
'Covariance requires numeric data points.'
);
}
$valueY = $y[$pos];
if (! is_numeric($valueY)) {
if (!is_numeric($valueY)) {
throw new InvalidDataInputException(
'Covariance requires numeric data points.'
);
Expand Down
2 changes: 1 addition & 1 deletion src/Statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function numericalArray(): array
{
if ($this->containsNan === null) {
foreach ($this->values as $value) {
if (! is_numeric($value)) {
if (!is_numeric($value)) {
$this->containsNan = true;

break;
Expand Down

0 comments on commit f55519d

Please sign in to comment.