Skip to content

Commit

Permalink
improved phpDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 7, 2021
1 parent 120c1bc commit 3973cf3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/RobotLoader/RobotLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RobotLoader
/** @var string[] */
private $excludeDirs = [];

/** @var array of class => [file, time] */
/** @var array<string, array{string, int}> class => [file, time] */
private $classes = [];

/** @var bool */
Expand All @@ -57,10 +57,10 @@ class RobotLoader
/** @var bool */
private $refreshed = false;

/** @var array of class => counter */
/** @var array<string, int> class => counter */
private $missingClasses = [];

/** @var array of file => mtime */
/** @var array<string, int> file => mtime */
private $emptyFiles = [];

/** @var string|null */
Expand Down Expand Up @@ -176,7 +176,7 @@ public function excludeDirectory(...$paths): self


/**
* @return array of class => filename
* @return array<string, string> class => filename
*/
public function getIndexedClasses(): array
{
Expand Down Expand Up @@ -495,6 +495,7 @@ private function loadCache(): void

/**
* Writes class list to cache.
* @param resource $lock
*/
private function saveCache($lock = null): void
{
Expand All @@ -515,6 +516,7 @@ private function saveCache($lock = null): void
}


/** @return resource */
private function acquireLock(string $file, int $mode)
{
$handle = @fopen($file, 'w'); // @ is escalated to exception
Expand Down

0 comments on commit 3973cf3

Please sign in to comment.