Skip to content

Commit 096440b

Browse files
minor #32993 Turned return type annotations of private methods into php return types (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- Turned return type annotations of private methods into php return types | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A As discussed with @nicolas-grekas in symfony/symfony#30323 (comment), this PR attempts to turn `@return` annotations on private methods into return type declarations. Commits ------- f54ca001fe Turned return type annotations of private methods into php return types.
2 parents 326664d + bab93c5 commit 096440b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

FileLocator.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,8 @@ public function locate($name, $currentPath = null, $first = true)
7676

7777
/**
7878
* Returns whether the file path is an absolute path.
79-
*
80-
* @param string $file A file path
81-
*
82-
* @return bool
8379
*/
84-
private function isAbsolutePath(string $file)
80+
private function isAbsolutePath(string $file): bool
8581
{
8682
if ('/' === $file[0] || '\\' === $file[0]
8783
|| (\strlen($file) > 3 && ctype_alpha($file[0])

ResourceCheckerConfigCache.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,8 @@ public function write($content, array $metadata = null)
144144

145145
/**
146146
* Gets the meta file path.
147-
*
148-
* @return string The meta file path
149147
*/
150-
private function getMetaFile()
148+
private function getMetaFile(): string
151149
{
152150
return $this->file.'.meta';
153151
}

0 commit comments

Comments
 (0)