Add Formatters

Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
davidarendsen 2022-08-11 12:42:43 +00:00
commit 328094d803
8 changed files with 61 additions and 31 deletions

View file

@ -2,6 +2,8 @@
namespace Arendsen\FluxQueryBuilder\Function;
use Arendsen\FluxQueryBuilder\Formatters;
abstract class Base {
/**
@ -12,13 +14,4 @@ abstract class Base {
throw new FunctionNotImplementedException('__toString', get_class($this));
}
protected function format(array $settings)
{
array_walk($settings, function(&$value, $key) {
$value = $key . ': ' . (is_string($value) ? '"' . $value . '"' : $value);
});
return $settings;
}
}