Skip to content

Commit

Permalink
fixed bugs reported by PhpStan (#212)(#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored and dg committed Jul 19, 2019
1 parent 2f52649 commit 0768bda
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Bridges/DITracy/ContainerPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class ContainerPanel implements Tracy\IBarPanel
{
use Nette\SmartObject;

/** @var int */
/** @var float|null */
public static $compilationTime;

/** @var Nette\DI\Container */
private $container;

/** @var int|null */
/** @var float|null */
private $elapsedTime;


Expand Down
2 changes: 1 addition & 1 deletion src/DI/Extensions/DIExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class DIExtension extends Nette\DI\CompilerExtension
/** @var bool */
private $debugMode;

/** @var int */
/** @var float */
private $time;


Expand Down
1 change: 1 addition & 0 deletions src/DI/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public static function prefixServiceName($config, string $namespace)
/**
* Returns an annotation value.
* @param \Reflector|\ReflectionMethod $ref
*/
public static function parseAnnotation(\Reflector $ref, string $name): ?string
{
Expand Down
2 changes: 1 addition & 1 deletion src/DI/PhpGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public function toString(Nette\PhpGenerator\ClassType $class): string

public function generateMethod(Definitions\Definition $def): Nette\PhpGenerator\Method
{
$name = $def->getName();
try {
$name = $def->getName();
$method = new Nette\PhpGenerator\Method(Container::getMethodName($name));
$method->setVisibility('public');
$method->setReturnType($def->getType());
Expand Down

0 comments on commit 0768bda

Please sign in to comment.