From 36d9513d7be56286017830338d0bdf010d3a8d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haso=C5=88?= Date: Fri, 23 Mar 2012 12:49:29 +0100 Subject: [PATCH] Changed parameter name in Filesystem::findShortestPath --- src/Composer/Util/Filesystem.php | 6 +++--- tests/Composer/Test/Util/FilesystemTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index 0cd687a40..88e8a77c2 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -58,10 +58,10 @@ class Filesystem * * @param string $from * @param string $to - * @param Boolean $inDirectory if true, the source is considered to be in the directory + * @param Boolean $directories if true, the source/target are considered to be directories * @return string */ - public function findShortestPath($from, $to, $inDirectory = false) + public function findShortestPath($from, $to, $directories = false) { if (!$this->isAbsolutePath($from) || !$this->isAbsolutePath($to)) { throw new \InvalidArgumentException('from and to must be absolute paths'); @@ -70,7 +70,7 @@ class Filesystem $from = lcfirst(rtrim(strtr($from, '\\', '/'), '/')); $to = lcfirst(rtrim(strtr($to, '\\', '/'), '/')); - if ($inDirectory) { + if ($directories) { $from .= '/dummy_file'; } diff --git a/tests/Composer/Test/Util/FilesystemTest.php b/tests/Composer/Test/Util/FilesystemTest.php index 739b30cbe..37e9f1129 100644 --- a/tests/Composer/Test/Util/FilesystemTest.php +++ b/tests/Composer/Test/Util/FilesystemTest.php @@ -58,10 +58,10 @@ class FilesystemTest extends TestCase /** * @dataProvider providePathCouples */ - public function testFindShortestPath($a, $b, $expected, $inDirectory = false) + public function testFindShortestPath($a, $b, $expected, $directory = false) { $fs = new Filesystem; - $this->assertEquals($expected, $fs->findShortestPath($a, $b, $inDirectory)); + $this->assertEquals($expected, $fs->findShortestPath($a, $b, $directory)); } public function providePathCouples()