PHPackages                             phpextra/unknown - 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. phpextra/unknown

AbandonedArchivedLibrary

phpextra/unknown
================

Unknown type for PHP

08.1kPHP

Since Apr 1Pushed 11y ago1 watchersCompare

[ Source](https://github.com/phpextra/unknown)[ Packagist](https://packagist.org/packages/phpextra/unknown)[ RSS](/packages/phpextra-unknown/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (2)Used By (0)

\#UnknownType (PHPExtra\\Type\\UnknownType)

[![Latest Stable Version](https://camo.githubusercontent.com/6f300bdfe5cbd39df130a358e0c77cfd4d919b0e6bc7625a9e6ee4364a694a45/68747470733a2f2f706f7365722e707567782e6f72672f70687065787472612f756e6b6e6f776e2f762f737461626c652e737667)](https://packagist.org/packages/phpextra/unknown)[![Total Downloads](https://camo.githubusercontent.com/171025dfd7612b9bf5ba009e09efb3ba9ab01948c4e9ce050d1f4977c347d698/68747470733a2f2f706f7365722e707567782e6f72672f70687065787472612f756e6b6e6f776e2f646f776e6c6f6164732e737667)](https://packagist.org/packages/phpextra/unknown)[![License](https://camo.githubusercontent.com/43afa2daebcd486867f300bf7b4e57328110a10b5ed59e4ae3f55001ed01965b/68747470733a2f2f706f7365722e707567782e6f72672f70687065787472612f756e6b6e6f776e2f6c6963656e73652e737667)](https://packagist.org/packages/phpextra/unknown)[![Build Status](https://camo.githubusercontent.com/7ebd55cf1f106cc6ab27224bad581462548c9f02f1f590a1bea2cf23c5b1ae4b/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f70687065787472612f756e6b6e6f776e2e737667)](https://travis-ci.org/phpextra/unknown)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/56d0e763773c016294b36c31c59b93c8414b0a13293f9a4f3b37d673902b23a9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687065787472612f756e6b6e6f776e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phpextra/unknown/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/7a7be96439d7ed83f11824de7c15a3e6cd66f3a5cf8b3e0f155e98921ab1d378/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687065787472612f756e6b6e6f776e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phpextra/unknown/?branch=master)[![GitTip](https://camo.githubusercontent.com/0ec766cd3550cb42f0db394a3dc81c594379aba38bdca4d1b31a56d9baae78c3/687474703a2f2f696d672e736869656c64732e696f2f6769747469702f6a6b6f6275732e737667)](https://www.gittip.com/jkobus)

\##Usage

It should not happen but sometimes does - you have a method with many different response types, but want to handle it like a pro:

```
$messedUpResponse = $api->getMeSomeChickens(); // returns "Chicken" **or** "Collection" **of** "Chickens" **or** "no" as an error response :-)

$result = new UnknownType($messedUpResponse);

if($result->isCollection()){
    $result->getAsCollection()->sort($sorter);
    ...
}elseif($result->isException){
    throw $result->getAsException();
    ...
}
```

UnknownType can be extended and customized :-)

Installation (Composer)
-----------------------

[](#installation-composer)

```
{
    "require": {
        "phpextra/unknown":"~1.0"
    }
}
```

\##Changelog

```
No releases yet

```

\##Contributing

All code contributions must go through a pull request. Fork the project, create a feature branch, and send me a pull request. To ensure a consistent code base, you should make sure the code follows the [coding standards](http://symfony.com/doc/2.0/contributing/code/standards.html). If you would like to help take a look at the **list of issues**.

\##Requirements

```
See composer.json for a full list of dependencies.

```

\##Authors

```
Jacek Kobus -

```

License information
-------------------

[](#license-information)

```
See the file LICENSE.txt for copying permission.on.

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1527096?v=4)[Jacek](/maintainers/jkobus)[@jkobus](https://github.com/jkobus)

---

Top Contributors

[![jkobus](https://avatars.githubusercontent.com/u/1527096?v=4)](https://github.com/jkobus "jkobus (5 commits)")

### Embed Badge

![Health badge](/badges/phpextra-unknown/health.svg)

```
[![Health](https://phpackages.com/badges/phpextra-unknown/health.svg)](https://phpackages.com/packages/phpextra-unknown)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
