Skip to content

Commit

Permalink
Str\{split_args_switched -> split}
Browse files Browse the repository at this point in the history
Reviewed By: fredemmott

Differential Revision: D5982970

fbshipit-source-id: 464498926152f961fa7e31cc097b0325c11915c7
  • Loading branch information
kmeht authored and facebook-github-bot committed Oct 5, 2017
1 parent 9346487 commit a5de85b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/generate-docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function createInDirectory($path): void {
);

foreach ($namespaces_funcs as $ns => $funcs) {
$file = $path.'/'.C\lastx(Str\split_args_switched($ns, "\\")).'.md';
$file = $path.'/'.C\lastx(Str\split($ns, "\\")).'.md';
file_put_contents(
$file,
$this->getMarkdownForNamespace($ns, $funcs),
Expand All @@ -57,7 +57,7 @@ public function createInDirectory($path): void {
$ns ==> sprintf(
" - [%s](%s)",
$ns,
C\lastx(Str\split_args_switched($ns, "\\")).'.md',
C\lastx(Str\split($ns, "\\")).'.md',
),
)
|>Str\join_args_switched($$, "\n")
Expand Down Expand Up @@ -122,7 +122,7 @@ private function renderSignature(ScannedFunction $f): string {

if (
C\every(
Str\split_args_switched($out, "\n"),
Str\split($out, "\n"),
$s ==> Str\length($s) < self::TARGET_LINE_LENGTH,
)
) {
Expand Down Expand Up @@ -251,7 +251,7 @@ private function renderDocComment(ScannedFunction $f): ?string {
|>Str\strip_prefix($$, '/**')
|>Str\strip_suffix($$, '*/')
|>Str\trim($$)
|>Str\split_args_switched($$, "\n")
|>Str\split($$, "\n")
|>Vec\map($$, $s ==> Str\trim(Str\strip_prefix(Str\trim($s), '*')))
|>Str\join_args_switched($$, "\n")
|>$$."\n";
Expand Down
2 changes: 1 addition & 1 deletion tests/str/StrDivideTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function testSplit(
?int $limit,
vec<string> $expected,
): void {
expect(Str\split_args_switched($string, $delimiter, $limit))
expect(Str\split($string, $delimiter, $limit))
->toBeSame($expected);
}

Expand Down

0 comments on commit a5de85b

Please sign in to comment.