mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 18:40:12 +00:00
Test some preprocessors.
This commit is contained in:
@@ -34,6 +34,11 @@ class TagsComma implements PreProcessorInterface
|
||||
*/
|
||||
public function run(string $value): array
|
||||
{
|
||||
return explode(',', $value);
|
||||
$set = explode(',', $value);
|
||||
$set = array_map('trim', $set);
|
||||
$set = array_filter($set, 'strlen');
|
||||
$return = array_values($set);
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
@@ -34,6 +34,11 @@ class TagsSpace implements PreProcessorInterface
|
||||
*/
|
||||
public function run(string $value): array
|
||||
{
|
||||
return explode(' ', $value);
|
||||
$set = explode(' ', $value);
|
||||
$set = array_map('trim', $set);
|
||||
$set = array_filter($set, 'strlen');
|
||||
$return = array_values($set);
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user