Skip to content

Commit b363e3b

Browse files
committed
minor #32786 add parameter type declarations to private methods (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- add parameter type declarations to private methods | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 1b2aaa4a06 add parameter type declarations to private methods
2 parents e377df5 + 71d7207 commit b363e3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Command/LintCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
109109
return $this->display($io, $filesInfo);
110110
}
111111

112-
private function validate($content, $flags, $file = null)
112+
private function validate(string $content, int $flags, string $file = null)
113113
{
114114
$prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
115115
if (E_USER_DEPRECATED === $level) {
@@ -182,7 +182,7 @@ private function displayJson(SymfonyStyle $io, array $filesInfo)
182182
return min($errors, 1);
183183
}
184184

185-
private function getFiles($fileOrDirectory)
185+
private function getFiles(string $fileOrDirectory)
186186
{
187187
if (is_file($fileOrDirectory)) {
188188
yield new \SplFileInfo($fileOrDirectory);
@@ -222,7 +222,7 @@ private function getParser()
222222
return $this->parser;
223223
}
224224

225-
private function getDirectoryIterator($directory)
225+
private function getDirectoryIterator(string $directory)
226226
{
227227
$default = function ($directory) {
228228
return new \RecursiveIteratorIterator(
@@ -238,7 +238,7 @@ private function getDirectoryIterator($directory)
238238
return $default($directory);
239239
}
240240

241-
private function isReadable($fileOrDirectory)
241+
private function isReadable(string $fileOrDirectory)
242242
{
243243
$default = function ($fileOrDirectory) {
244244
return is_readable($fileOrDirectory);

0 commit comments

Comments
 (0)