Skip to content

Commit

Permalink
phpstan fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-stanek committed Sep 20, 2022
1 parent 6e62395 commit 3815560
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Tracy/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Skaut\Skautis\Wsdl\Event\RequestFailEvent;
use Skaut\Skautis\Wsdl\Event\RequestPostEvent;
use Skaut\Skautis\Wsdl\Event\RequestPreEvent;
use stdClass;


/**
Expand All @@ -20,7 +21,7 @@ class EventDispatcher implements EventDispatcherInterface
/**
* @param RequestPreEvent|RequestPostEvent|RequestFailEvent $event
*/
public function dispatch($event): void
public function dispatch($event): object
{
switch (true) {
case $event instanceof RequestPreEvent:
Expand All @@ -33,6 +34,8 @@ public function dispatch($event): void
$this->queries[] = SkautisQuery::createFromFailEvent($event);
break;
}

return new stdClass();
}

/** @return SkautisQuery[] */
Expand Down
3 changes: 2 additions & 1 deletion src/Tracy/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ class Panel implements Tracy\IBarPanel
{
use Nette\SmartObject;

/** @var EventDispatcher */
private $eventDispatcher;

/**
* @param $eventDispatcher
* @param EventDispatcher $eventDispatcher
*/
public function __construct()
{
Expand Down
7 changes: 7 additions & 0 deletions src/Tracy/SkautisQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ class SkautisQuery
*/
public $result;

/**
* @param string $fname
* @param array<int, mixed> $args
* @param array<int, array<string, mixed>> $trace
* @param float $time
* @param mixed $result
*/
private function __construct($fname, $args, $trace, $time, $result)
{
$this->fname = $fname;
Expand Down

0 comments on commit 3815560

Please sign in to comment.