From e41d6361221a30ca9d996cde7591111e626b7e1c Mon Sep 17 00:00:00 2001 From: supahgreg Date: Thu, 9 Oct 2025 02:49:56 +0000 Subject: Remove dev dependencies and update the rest. --- .../sebastian/code-unit/src/CodeUnitCollection.php | 84 ---------------------- 1 file changed, 84 deletions(-) delete mode 100644 vendor/sebastian/code-unit/src/CodeUnitCollection.php (limited to 'vendor/sebastian/code-unit/src/CodeUnitCollection.php') diff --git a/vendor/sebastian/code-unit/src/CodeUnitCollection.php b/vendor/sebastian/code-unit/src/CodeUnitCollection.php deleted file mode 100644 index f53db8a12..000000000 --- a/vendor/sebastian/code-unit/src/CodeUnitCollection.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeUnit; - -use function array_merge; -use function count; -use Countable; -use IteratorAggregate; - -final class CodeUnitCollection implements Countable, IteratorAggregate -{ - /** - * @psalm-var list - */ - private $codeUnits = []; - - /** - * @psalm-param list $items - */ - public static function fromArray(array $items): self - { - $collection = new self; - - foreach ($items as $item) { - $collection->add($item); - } - - return $collection; - } - - public static function fromList(CodeUnit ...$items): self - { - return self::fromArray($items); - } - - private function __construct() - { - } - - /** - * @psalm-return list - */ - public function asArray(): array - { - return $this->codeUnits; - } - - public function getIterator(): CodeUnitCollectionIterator - { - return new CodeUnitCollectionIterator($this); - } - - public function count(): int - { - return count($this->codeUnits); - } - - public function isEmpty(): bool - { - return empty($this->codeUnits); - } - - public function mergeWith(self $other): self - { - return self::fromArray( - array_merge( - $this->asArray(), - $other->asArray() - ) - ); - } - - private function add(CodeUnit $item): void - { - $this->codeUnits[] = $item; - } -} -- cgit v1.2.3-54-g00ecf