PHPackages                             jascha030/type-collections - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jascha030/type-collections

ActiveLibrary

jascha030/type-collections
==========================

1.0.0(3y ago)06MITPHPPHP ~8.0||~8.1||~8.2CI passing

Since Dec 25Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/jascha030/type-collections)[ Packagist](https://packagist.org/packages/jascha030/type-collections)[ RSS](/packages/jascha030-type-collections/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Type collections
================

[](#type-collections)

A small set of interfaces and an abstract implementation, extending the [Collection class](https://laravel.com/docs/9.x/collections) from `illuminate/collections`, used to create collections with predefined content types.

Getting started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

- PHP `>=8.0.2`

Having the `phpstan/phpstan` composer package installed globally is not required, but useful.

### Installation

[](#installation)

```
composer require Jascha030/type-collections
```

Usage
-----

[](#usage)

You can create a "typed" collection class by extending `Jascha030\TypeCollection\TypeCollectionAbstract`, this will require you to implement the `getType` method.

```
