Skip to content

Commit

Permalink
Code style and doc typo (#23)
Browse files Browse the repository at this point in the history
* Code style and doc typo

* Update MultipartStreamBuilder.php
  • Loading branch information
Nyholm authored Dec 25, 2016
1 parent 42fade9 commit cf58c6d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/MultipartStreamBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,11 @@ private function basename($path)
// For Windows OS add special separator.
$separators .= DIRECTORY_SEPARATOR;
}
// Remove right-most slashes when $uri points to directory.

// Remove right-most slashes when $path points to directory.
$path = rtrim($path, $separators);
// Returns the trailing part of the $uri starting after one of the directory
// separators.

// Returns the trailing part of the $path starting after one of the directory separators.
$filename = preg_match('@[^'.preg_quote($separators, '@').']+$@', $path, $matches) ? $matches[0] : '';

return $filename;
Expand Down

0 comments on commit cf58c6d

Please sign in to comment.