File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ $arr = [
3232];
3333
3434$result = $arr
35- |> fn($x) => array_column($x, 'tags') // Gets an array of arrays
36- |> fn($x) => array_merge(...$x) // Flatten into one big array
35+ |> ( fn($x) => array_column($x, 'tags') ) // Gets an array of arrays
36+ |> ( fn($x) => array_merge(...$x) ) // Flatten into one big array
3737 |> array_unique(...) // Remove duplicates
3838 |> array_values(...) // Reindex the array.
3939;
@@ -90,12 +90,12 @@ $string = 'something GoesHERE';
9090$newString = match ($format) {
9191 'snake_case' => $string
9292 |> splitString(...)
93- |> fn($x) => implode('_', $x)
93+ |> ( fn($x) => implode('_', $x) )
9494 |> strtolower(...),
9595 'lowerCamel' => $string
9696 |> splitString(...),
97- |> fn($x) => array_map(ucfirst(...), $x)
98- |> fn($x) => implode('', $x)
97+ |> ( fn($x) => array_map(ucfirst(...), $x) )
98+ |> ( fn($x) => implode('', $x) )
9999 |> lcfirst(...),
100100 // Other case options here.
101101};
You can’t perform that action at this time.
0 commit comments