mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
lint fixes
Took 3 minutes
This commit is contained in:
@ -51,7 +51,7 @@ final class Datasets
|
|||||||
/**
|
/**
|
||||||
* Resolves the current dataset to an array value.
|
* Resolves the current dataset to an array value.
|
||||||
*
|
*
|
||||||
* @param array<Closure|iterable<int|string, mixed>|string> $datasets
|
* @param array<Closure|iterable<int|string, mixed>|string> $datasets
|
||||||
*
|
*
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
@ -80,10 +80,10 @@ final class Datasets
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($datasets[$index] as $key => $values) {
|
foreach ($datasets[$index] as $key => $values) {
|
||||||
$values = is_array($values) ? $values : [$values];
|
$values = is_array($values) ? $values : [$values];
|
||||||
$processedDataset[] = [
|
$processedDataset[] = [
|
||||||
'label' => self::getDataSetDescription($key, $values),
|
'label' => self::getDataSetDescription($key, $values),
|
||||||
'values' => $values,
|
'values' => $values,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,19 +93,19 @@ final class Datasets
|
|||||||
$datasetCombinations = self::getDataSetsCombinations($processedDatasets);
|
$datasetCombinations = self::getDataSetsCombinations($processedDatasets);
|
||||||
|
|
||||||
$dataSetDescriptions = [];
|
$dataSetDescriptions = [];
|
||||||
$dataSetValues = [];
|
$dataSetValues = [];
|
||||||
|
|
||||||
foreach ($datasetCombinations as $datasets){
|
foreach ($datasetCombinations as $datasets) {
|
||||||
$partialDescriptions = [];
|
$partialDescriptions = [];
|
||||||
$values = [];
|
$values = [];
|
||||||
|
|
||||||
foreach ($datasets as $dataset_data){
|
foreach ($datasets as $dataset_data) {
|
||||||
$partialDescriptions[] = $dataset_data['label'];
|
$partialDescriptions[] = $dataset_data['label'];
|
||||||
$values = array_merge($values, $dataset_data['values']);
|
$values = array_merge($values, $dataset_data['values']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dataSetDescriptions[] = $description." with ".implode(" / ", $partialDescriptions);
|
$dataSetDescriptions[] = $description . ' with ' . implode(' / ', $partialDescriptions);
|
||||||
$dataSetValues[] = $values;
|
$dataSetValues[] = $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (array_count_values($dataSetDescriptions) as $descriptionToCheck => $count) {
|
foreach (array_count_values($dataSetDescriptions) as $descriptionToCheck => $count) {
|
||||||
@ -139,6 +139,7 @@ final class Datasets
|
|||||||
}
|
}
|
||||||
$result = $tmp;
|
$result = $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ it('show the actual dataset of non-named datasets in their description', functio
|
|||||||
expect($descriptions[1])->toBe('test description with (array(2))');
|
expect($descriptions[1])->toBe('test description with (array(2))');
|
||||||
});
|
});
|
||||||
|
|
||||||
$state = new stdClass();
|
$state = new stdClass();
|
||||||
$state->combinations = [
|
$state->combinations = [
|
||||||
['a', 'b', 'c', 1, 2, 'bar', 'foo', 'baz'],
|
['a', 'b', 'c', 1, 2, 'bar', 'foo', 'baz'],
|
||||||
['a', 'b', 'c', 1, 2, 'zip', 'zap', 'zop'],
|
['a', 'b', 'c', 1, 2, 'zip', 'zap', 'zop'],
|
||||||
|
|||||||
Reference in New Issue
Block a user