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

Ocramius / psl / 7544562643
99%
1.8.x: 99%

Build:
Build:
LAST BUILD BRANCH: feature/#436-coerce-stdClass-to-shape
DEFAULT BRANCH: 1.8.x
Ran 16 Jan 2024 04:26PM UTC
Jobs 1
Files 723
Run time 1min
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

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

Jobs
ID Job ID Ran Files Coverage
1 7544562643.1 16 Jan 2024 04:26PM UTC 723
99.01
GitHub Action Run
Source Files on build 7544562643
  • Tree
  • List 723
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f476f586 on github
  • Delete
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