Skip to content

Commit

Permalink
Issue CollaboraOnline#56: Rename vars in strStartsWith().
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Nov 12, 2024
1 parent 09a8456 commit 64a477b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Cool/CoolRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ function getWopiSrcUrl($discovery_parsed, $mimetype) {
/**
* Checks if a string starts with another string.
*
* @param string $s
* @param string $haystack
* Haystack.
* @param string $ss
* @param string $needle
* Needle.
*
* @return bool
* TRUE if $ss is a prefix of $s.
*
* @see str_starts_with()
*/
function strStartsWith($s, $ss) {
$res = strrpos($s, $ss);
return !is_bool($res) && $res == 0;
function strStartsWith($haystack, $needle) {
$pos = strrpos($haystack, $needle);
return !is_bool($pos) && $pos == 0;
}

/**
Expand Down

0 comments on commit 64a477b

Please sign in to comment.