protected function stringifyArray(array $array) { if (a\isList($array)) { return 'array(' . implode(', ', array_map(function ($v) { return is_scalar($v) ? var_export($v, true) : \nspl\getType($v); }, $array)) . ')'; } return f\I(var_export($this->array, true), f\partial('str_replace', "\n", ''), f\partial('str_replace', 'array ( ', 'array('), f\partial('str_replace', ' ', ' '), f\partial('str_replace', ',)', ')')); }
public function testI() { $this->assertEquals('underscoreToCamelcase', I('underscore_to_camelcase', rpartial('ucwords', '_'), partial('str_replace', '_', ''), 'lcfirst')); }