Skip to content

Commit 48ed4b2

Browse files
committed
refactor: . Inline variables that were used only once
1 parent 4183a2f commit 48ed4b2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Query/Explain/Explainer.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,23 @@ export class Explainer {
4949
}
5050

5151
public explainFilters(query: Query) {
52-
const numberOfFilters = query.filters.length;
53-
if (numberOfFilters === 0) {
52+
if (query.filters.length === 0) {
5453
return this.indent('No filters supplied. All tasks will match the query.\n');
5554
}
5655

5756
return query.filters.map((filter) => filter.explainFilterIndented(this.indentation)).join('\n');
5857
}
5958

6059
public explainGroups(query: Query) {
61-
const numberOfGroups = query.grouping.length;
62-
if (numberOfGroups === 0) {
60+
if (query.grouping.length === 0) {
6361
return this.indent('No grouping instructions supplied.\n');
6462
}
6563

6664
return query.grouping.map((group) => this.indentation + group.instruction).join('\n') + '\n';
6765
}
6866

6967
public explainSorters(query: Query) {
70-
const numberOfSorters = query.sorting.length;
71-
if (numberOfSorters === 0) {
68+
if (query.sorting.length === 0) {
7269
return this.indent('No sorting instructions supplied.\n');
7370
}
7471

0 commit comments

Comments
 (0)