Skip to content

Commit

Permalink
Update terminology from 'count' to 'number' for rows (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis authored Mar 17, 2024
1 parent 97e7e73 commit b29153a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ columns:
average_min: 1.123
average_max: 10.123

# Total(!) count of rows in the CSV file.
# Since any values are taken into account, it only makes sense to use these rules once in any column.
# Total number of rows in the CSV file.
# Since any(!) values are taken into account, it only makes sense to use these rules once in any column.
count: 5
count_not: 4
count_min: 1
Expand Down
4 changes: 2 additions & 2 deletions schema-examples/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ columns:
average_min: 1.123
average_max: 10.123

# Total(!) count of rows in the CSV file.
# Since any values are taken into account, it only makes sense to use these rules once in any column.
# Total number of rows in the CSV file.
# Since any(!) values are taken into account, it only makes sense to use these rules once in any column.
count: 5
count_not: 4
count_min: 1
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/Aggregate/ComboCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

final class ComboCount extends AbstarctAggregateRuleCombo
{
protected const NAME = 'count of rows';
protected const NAME = 'number of rows';

protected const HELP_TOP = [
'Total(!) count of rows in the CSV file.',
'Since any values are taken into account, it only makes sense to use these rules once in any column.',
'Total number of rows in the CSV file.',
'Since any(!) values are taken into account, it only makes sense to use these rules once in any column.',
];

protected const HELP_OPTIONS = [
Expand Down
8 changes: 4 additions & 4 deletions tests/Rules/Aggregate/ComboCountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testEqual(): void
isSame('', $rule->test(['1', '2', '3']));

isSame(
'The count of rows in the column is "4", which is not equal than the expected "3"',
'The number of rows in the column is "4", which is not equal than the expected "3"',
$rule->test(['1', '2', '3', '4.5']),
);
}
Expand All @@ -45,7 +45,7 @@ public function testNotEqual(): void
isSame('', $rule->test(['1', '2', '3', '4.5']));

isSame(
'The count of rows in the column is "3", which is equal than the not expected "3"',
'The number of rows in the column is "3", which is equal than the not expected "3"',
$rule->test(['1', '2', '3']),
);
}
Expand All @@ -57,7 +57,7 @@ public function testMin(): void
isSame('', $rule->test(['1', '2', '3']));

isSame(
'The count of rows in the column is "2", which is less than the expected "3"',
'The number of rows in the column is "2", which is less than the expected "3"',
$rule->test(['1', '2']),
);
}
Expand All @@ -69,7 +69,7 @@ public function testMax(): void
isSame('', $rule->test(['1', '2', '3']));

isSame(
'The count of rows in the column is "4", which is greater than the expected "3"',
'The number of rows in the column is "4", which is greater than the expected "3"',
$rule->test(['1', '2', '3', '4.5']),
);
}
Expand Down

0 comments on commit b29153a

Please sign in to comment.