minor #32772 [FrameworkBundle] Add type-hints on private methods (fabpot)

This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Add type-hints on private methods

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

da54325136 [FrameworkBundle] added type-hints on private methods
This commit is contained in:
Fabien Potencier 2019-07-27 08:40:13 +02:00
commit dd5aa5d447
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ class AnnotationsCacheWarmer extends AbstractPhpFileCacheWarmer
return true;
}
private function readAllComponents(Reader $reader, $class)
private function readAllComponents(Reader $reader, string $class)
{
$reflectionClass = new \ReflectionClass($class);
$reader->getClassAnnotations($reflectionClass);

View File

@ -141,7 +141,7 @@ class FrameworkBundle extends Bundle
}
}
private function addCompilerPassIfExists(ContainerBuilder $container, $class, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, $priority = 0)
private function addCompilerPassIfExists(ContainerBuilder $container, string $class, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)
{
$container->addResource(new ClassExistenceResource($class));