kenny1911 / typed-properties-helper
Set of helper functions to working with typed class properties.
Installs: 2 060
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.4 | ^8.0
Requires (Dev)
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2025-04-29 01:21:59 UTC
README
TypedPropertiesHelper
is a set of helper function to working with typed class properties.
Installation
composer require kenny1911/typed-properties-helper
Usage
Check, that object property initialized:
use function Kenny1911\TypedProperties\is_initialized; $obj = new class { public int $init = 123; public int $notInit; }; is_initialized($obj, 'init'); // True is_initialized($obj, 'notInit'); // False
Check, that object property typed:
use function Kenny1911\TypedProperties\is_typed; $obj = new class { public int $typed; public $notTyped; }; is_typed($obj, 'typed'); // True is_typed($obj, 'notTyped'); // False