Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DoctrineBridge] add parameter type declarations to private methods #32771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions 5 src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ public function removeEventListener($events, $listener)
}
}

/**
* @param string $eventName
*/
private function initializeListeners($eventName)
private function initializeListeners(string $eventName)
{
foreach ($this->listeners[$eventName] as $hash => $listener) {
if (\is_string($listener)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function getName()
return 'db';
}

private function sanitizeQueries($connectionName, $queries)
private function sanitizeQueries(string $connectionName, array $queries)
{
foreach ($queries as $i => $query) {
$queries[$i] = $this->sanitizeQuery($connectionName, $query);
Expand All @@ -129,7 +129,7 @@ private function sanitizeQueries($connectionName, $queries)
return $queries;
}

private function sanitizeQuery($connectionName, $query)
private function sanitizeQuery(string $connectionName, $query)
{
$query['explainable'] = true;
if (null === $query['params']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private function addTaggedListeners(ContainerBuilder $container)
}
}

private function getEventManagerDef(ContainerBuilder $container, $name)
private function getEventManagerDef(ContainerBuilder $container, string $name)
{
if (!isset($this->eventManagers[$name])) {
$this->eventManagers[$name] = $container->getDefinition(sprintf($this->managerTemplate, $name));
Expand All @@ -128,12 +128,9 @@ private function getEventManagerDef(ContainerBuilder $container, $name)
* @see https://bugs.php.net/bug.php?id=53710
* @see https://bugs.php.net/bug.php?id=60926
*
* @param string $tagName
* @param ContainerBuilder $container
*
* @return array
*/
private function findAndSortTags($tagName, ContainerBuilder $container)
private function findAndSortTags(string $tagName, ContainerBuilder $container)
{
$sortedTags = [];

Expand Down
4 changes: 2 additions & 2 deletions 4 src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function setRepository(EntityManagerInterface $entityManager, $entityName
/**
* @return ObjectRepository
*/
private function createRepository(EntityManagerInterface $entityManager, $entityName)
private function createRepository(EntityManagerInterface $entityManager, string $entityName)
{
/* @var $metadata ClassMetadata */
$metadata = $entityManager->getClassMetadata($entityName);
Expand All @@ -59,7 +59,7 @@ private function createRepository(EntityManagerInterface $entityManager, $entity
return new $repositoryClassName($entityManager, $metadata);
}

private function getRepositoryHash(EntityManagerInterface $entityManager, $entityName)
private function getRepositoryHash(EntityManagerInterface $entityManager, string $entityName)
{
return $entityManager->getClassMetadata($entityName)->getName().spl_object_hash($entityManager);
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.