Skip to content

Commit

Permalink
Add some return types
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu authored and debesha committed Jul 1, 2023
1 parent bbd055f commit a0eeb93
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.php_cs.cache
vendor
composer.lock
9 changes: 6 additions & 3 deletions DataCollector/HydrationDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ class HydrationDataCollector extends DataCollector
/**
* @var HydrationLogger
*/
private $hydrationLogger = [];
private $hydrationLogger;

public function __construct(EntityManagerInterface $manager)
{
$this->hydrationLogger = $manager->getConfiguration()->getHydrationLogger();
}

/**
* @return void
*/
public function collect(Request $request, Response $response, \Throwable $exception = null)
{
$this->data['hydrations'] = $this->hydrationLogger->hydrations;
Expand Down Expand Up @@ -59,15 +62,15 @@ public function getTime()
}

/**
* {@inheritdoc}
* @return string
*/
public function getName()
{
return 'hydrations';
}

/**
* {@inheritdoc}
* @return void
*/
public function reset()
{
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class DebeshaDoctrineProfileExtraExtension extends Extension
{
/**
* {@inheritdoc}
* @return void
*/
public function load(array $configs, ContainerBuilder $container)
{
Expand Down
2 changes: 2 additions & 0 deletions ORM/HydrationLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function start($type)
*
* @param int $resultNum
* @param array $aliasMap
*
* @return void
*/
public function stop($resultNum, $aliasMap)
{
Expand Down
4 changes: 3 additions & 1 deletion ORM/LoggingConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct()
/**
* Gets the hydration logger.
*
* @return HydrationLogger
* @return HydrationLogger|null
*/
public function getHydrationLogger()
{
Expand All @@ -33,6 +33,8 @@ public function getHydrationLogger()
* Sets the hydration logger.
*
* @param HydrationLogger $ns
*
* @return void
*/
public function setHydrationLogger(HydrationLogger $logger)
{
Expand Down

0 comments on commit a0eeb93

Please sign in to comment.