Skip to content

Commit

Permalink
Remove unnecessary local variable (#47178)
Browse files Browse the repository at this point in the history
Co-authored-by: Volodya Khurshudyan <[email protected]>
  • Loading branch information
xurshudyan and Volodya Khurshudyan committed May 23, 2023
1 parent 4688461 commit 66e4858
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Illuminate/Support/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -1001,11 +1001,9 @@ public static function remove($search, $subject, $caseSensitive = true)
$search = collect($search)->all();
}

$subject = $caseSensitive
return $caseSensitive
? str_replace($search, '', $subject)
: str_ireplace($search, '', $subject);

return $subject;
}

/**
Expand Down

0 comments on commit 66e4858

Please sign in to comment.