From df7878943c2bfe68c73935db8203b1c083bd7463 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 23 Dec 2016 11:56:45 +0100 Subject: [PATCH 1/2] Code style and doc typo --- src/MultipartStreamBuilder.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/MultipartStreamBuilder.php b/src/MultipartStreamBuilder.php index 5a62d75..828f552 100644 --- a/src/MultipartStreamBuilder.php +++ b/src/MultipartStreamBuilder.php @@ -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; From 0a38764be359268101d96b48bd2124c60252f9a0 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 23 Dec 2016 11:57:33 +0100 Subject: [PATCH 2/2] Update MultipartStreamBuilder.php --- src/MultipartStreamBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MultipartStreamBuilder.php b/src/MultipartStreamBuilder.php index 828f552..8156511 100644 --- a/src/MultipartStreamBuilder.php +++ b/src/MultipartStreamBuilder.php @@ -247,10 +247,10 @@ private function basename($path) // For Windows OS add special separator. $separators .= DIRECTORY_SEPARATOR; } - + // Remove right-most slashes when $path points to directory. $path = rtrim($path, $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] : '';