PHPackages                             jaytaph/typearray - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jaytaph/typearray

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jaytaph/typearray
=================

Typed Array

v0.0.5(3y ago)310.8kBSD-3-ClausePHPPHP &gt;=8.0.2

Since Dec 11Pushed 3y ago2 watchersCompare

[ Source](https://github.com/jaytaph/typearray)[ Packagist](https://packagist.org/packages/jaytaph/typearray)[ RSS](/packages/jaytaph-typearray/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

Typed Array
===========

[](#typed-array)

Simple wrapper around property-accessor to fetch elements in a typed way. This package is created because I was fiddling around with a lot of json-arrays that were not typed and phpstan had a big issue with that.

So, instead of having `mixed[] $myarray`, we can use `TypeArray`, and fetch elements with:

```
$arr = new TypeArray(['foo' => 'string', 'bar' => 4 ]);

$arr->getString('[foo]');  // always returns a string
$arr->getString('[notexists]', 'defaultval');   // Returns default val when not found

$arr->getInt('[bar]');  // returns int(4)
$arr->getInt('[foo]');  // Returns InvalidTypeException as this element is a string, not an int

```

See symfony propertyaccess component for the path syntax used.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

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.

###  Release Activity

Cadence

Every ~45 days

Total

5

Last Release

1112d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/19b14ca62f80ce8c77ae749ddf04e2d4077451db9f701f3bd37dec1dc950c76b?d=identicon)[JayTaph](/maintainers/JayTaph)

---

Top Contributors

[![jaytaph](https://avatars.githubusercontent.com/u/241458?v=4)](https://github.com/jaytaph "jaytaph (11 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jaytaph-typearray/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[symfony/ux-autocomplete

JavaScript Autocomplete functionality for Symfony

635.5M36](/packages/symfony-ux-autocomplete)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

53675.5k15](/packages/solspace-craft-freeform)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

318117.1k1](/packages/cognesy-instructor-php)[api-platform/symfony

Symfony API Platform integration

354.0M110](/packages/api-platform-symfony)[symfony/ai-platform

PHP library for interacting with AI platform provider.

521.2M216](/packages/symfony-ai-platform)

PHPackages © 2026

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