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 384db7c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 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
4 changes: 1 addition & 3 deletions src/Tracy/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ class Panel implements Tracy\IBarPanel
{
use Nette\SmartObject;

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

/**
* @param $eventDispatcher
*/
public function __construct()
{
$this->eventDispatcher = new EventDispatcher();
Expand Down
9 changes: 8 additions & 1 deletion src/Tracy/SkautisQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SkautisQuery

/**
* Parametry SOAP requestu na server.
* @var array<int, mixed>
* @var array<int|string, mixed>
*/
public $args;

Expand All @@ -42,6 +42,13 @@ class SkautisQuery
*/
public $result;

/**
* @param string $fname
* @param array<int|string, 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 384db7c

Please sign in to comment.