Skip to content

Commit

Permalink
minor #31606 [Finder] fix wrong method call casing (azjezz)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Finder] fix wrong method call casing

fix wrong method call casing for [`SplFileInfo::getRealPath()`](https://www.php.net/manual/en/splfileinfo.getrealpath.php)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

9b558fe [Finder] fix wrong method call casing
  • Loading branch information
fabpot committed May 25, 2019
2 parents e214d28 + 9b558fe commit b647f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Finder/Iterator/SortableIterator.php
Expand Up @@ -39,7 +39,7 @@ public function __construct(\Traversable $iterator, $sort)

if (self::SORT_BY_NAME === $sort) {
$this->sort = function ($a, $b) {
return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
return strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
};
} elseif (self::SORT_BY_TYPE === $sort) {
$this->sort = function ($a, $b) {
Expand All @@ -49,7 +49,7 @@ public function __construct(\Traversable $iterator, $sort)
return 1;
}

return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
return strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
};
} elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
$this->sort = function ($a, $b) {
Expand Down

0 comments on commit b647f74

Please sign in to comment.