• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ocramius / psl
99%
1.8.x: 99%

Build:
Build:
LAST BUILD BRANCH: feature/#436-coerce-stdClass-to-shape
DEFAULT BRANCH: 1.8.x
Repo Added 03 Sep 2021 03:28PM UTC
Token Cjoo0IiksmqF1EODa2UFkUfkTJHGOI8A4 regen
Build 13 Last
Files 723
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH feature/#436-coerce-stdClass-to-shape
branch: feature/#436-coerce-stdClass-to-shape
CHANGE BRANCH
x
Reset
Sync Branches
  • feature/#436-coerce-stdClass-to-shape
  • feature/benchmarks-and-performance-improvements

16 Jan 2024 04:26PM UTC coverage: 99.013%. First build
7544562643

push

github

Ocramius
Added support for coercing `stdClass` to `array<TKey, TValue>`

Fixes #436

This change is useful when decoding JSON hashmaps into PHP hashmaps, since PHP keeps
JSON-decoded data as an `stdClass` unless explicitly told to do so.

Also note that preserving JSON structures as `stdClass` is sometimes very much required,
since an empty hashmap is a lossy conversion to `[]` performed by `json_decode()`, when
using `associative: true`. This patch makes preserving JSON data structures a bit easier.

This adds some very minimal overhead to `ShapeType#coerce()`, which should be imperceptible.

4213 of 4255 relevant lines covered (99.01%)

49.47 hits per line

Relevant lines Covered
Build:
Build:
4255 RELEVANT LINES 4213 COVERED LINES
49.47 HITS PER LINE
Source Files on feature/#436-coerce-stdClass-to-shape
  • Tree
  • List 723
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
7544562643 feature/#436-coerce-stdClass-to-shape Added support for coercing `stdClass` to `array<TKey, TValue>` Fixes #436 This change is useful when decoding JSON hashmaps into PHP hashmaps, since PHP keeps JSON-decoded data as an `stdClass` unless explicitly told to do so. Also note that pr... push 16 Jan 2024 04:26PM UTC Ocramius github
99.01
See All Builds (6)

Badge your Repo: psl

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc