Skip to content

Commit

Permalink
Make classmap countable
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jun 19, 2022
1 parent 641a112 commit 1e1cb2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ClassMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @author Jordi Boggiano <[email protected]>
*/
class ClassMap
class ClassMap implements \Countable
{
/**
* @var array<class-string, non-empty-string>
Expand Down Expand Up @@ -123,4 +123,9 @@ public function addAmbiguousClass(string $className, string $path): void
{
$this->ambiguousClasses[$className][] = $path;
}

public function count(): int
{
return \count($this->map);
}
}

0 comments on commit 1e1cb2b

Please sign in to comment.