A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface

Overview

SMPL

Inspector

A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface.

Packagist Version Packagist PHP Version Support GitHub codecov CircleCI Psalm Level Mutation testing badge

Install

Install via composer.

composer require smplphp/inspector

You must be using at least PHP 8.1.2, due to a bug in earlier versions when reflection enum type classes.

Usage

See the wiki

Contributing

Please see CONTRIBUTING for details.

License

The MIT Licence (MIT). Please see Licence File for more information.

Comments
  • Add interface for types that are absolute

    Add interface for types that are absolute

    Some types map to absolute values, such as false, null and any class type. Types should be updated to support this, taking absolute types into consideration when checking for a match or if it accepts another type.

    enhancement wontfix 
    opened by ollieread 1
  • Add method, property and parameter filters for type match and accept

    Add method, property and parameter filters for type match and accept

    Filter checks for method, property and parameter types have been updated to perform a direct comparison. Support should be added for filtering by accepted types and matched values.

    • [x] #13
    • [x] #14
    enhancement 
    opened by ollieread 0
  • Allow types to specify whether they are nullable

    Allow types to specify whether they are nullable

    Currently, there are a lot of conditional statements hardcoded to throw exceptions when trying to create a nullable type for a type that cannot be nullable.

    Individual types should have a way to report whether they're nullable, and the factory should make use of it.

    enhancement 
    opened by ollieread 0
  • Investigate possibility of improving the handling of 'self' and 'static' types

    Investigate possibility of improving the handling of 'self' and 'static' types

    Currently, the self and static types are mapped to ClassType but they shouldn't be as they each have individual limitations.

    • [ ] Add an additional SelfType that extends ClassType, but only matches itself and parents.
    • [ ] Add an additional StaticType that extends ClassType and matches itself, parents and children.
    bug enhancement 
    opened by ollieread 0
  • Add support for the 'false' type

    Add support for the 'false' type

    There's currently no support for the native PHP type false, this needs to be addressed.

    • [x] Create a new FalseType
    • [x] Mark the type as built-in and primitive
    • [x] Have the type only match the exact value of false
    • [x] Have the type only accept the exact value of false
    enhancement 
    opened by ollieread 0
Releases(v1.1.0-alpha)
Owner
smpl
Simple, modern PHP libraries
smpl
This package provides a simple and intuitive way to work on the Youtube Data API. It provides fluent interface to Youtube features.

Laravel Youtube Client This package provides a simple and intuitive way to work on the Youtube Data API. It provides fluent interface to Youtube featu

Tilson Mateus 6 May 31, 2023
Creating data transfer objects with the power of php objects. No php attributes, no reflection api, and no other under the hook work.

Super Simple DTO Creating data transfer objects with the power of php objects. No php attributes, no reflection api, and no other under the hook work.

Mohammed Manssour 8 Jun 8, 2023
Allows reflection of object attributes, including inherited and non-public ones

sebastian/object-reflector Allows reflection of object attributes, including inherited and non-public ones. Installation You can add this library as a

Sebastian Bergmann 6k Jan 4, 2023
Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

Introduction Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services. It handles almost all of the boilerpl

The Laravel Framework 2.2k Dec 31, 2022
Strings Package provide a fluent, object-oriented interface for working with multibyte string

Strings Package provide a fluent, object-oriented interface for working with multibyte string, allowing you to chain multiple string operations together using a more readable syntax compared to traditional PHP strings functions.

Glowy PHP 14 Mar 12, 2022
A fluent interface for interacting with Netopia's services.

laravel-netopia A fluent interface for interacting with Netopia's services. Info Database It'll create a table named netopia_payments with the followi

Codestage 3 Oct 10, 2022
PHP Standalone Validation Library

Rakit Validation - PHP Standalone Validation Library PHP Standalone library for validating data. Inspired by Illuminate\Validation Laravel. Features A

Rakit Lab 727 Dec 30, 2022
This library provides a collection of native enum utilities (traits) which you almost always need in every PHP project.

This library provides a collection of native enum utilities (traits) which you almost always need in every PHP project.

DIVE 20 Nov 11, 2022
A standalone Amazon S3 (REST) client for PHP 5/CURL

Amazon S3 PHP Class Usage OO method (e,g; $s3->getObject(...)): $s3 = new S3($awsAccessKey, $awsSecretKey); Statically (e,g; S3::getObject(...)): S3::

Donovan Schönknecht 1k Jan 3, 2023
Pat eu cookies law - 🌝 EU Cookie Law Compliance: A Textpattern plugin (or standalone script) for Third-Party Cookies (RGPD compliance)

pat_eu_cookies_law EU Cookie Law Compliance: A Textpattern plugin (or a standalone script) for Third-Party Cookies. A simple solution that respects th

Patrick LEFEVRE 3 Aug 16, 2020
The Pantheon CLI — a standalone utility for performing operations on the Pantheon Platform

terminus : Pantheon's Command-Line Interface Status About Terminus is Pantheon's Command Line Interface (CLI), providing at least equivalent functiona

Pantheon 290 Dec 26, 2022
Exploiting and fixing security vulnerabilities of an old version of E-Class. Project implemented as part of the class YS13 Cyber-Security.

Open eClass 2.3 Development of XSS, CSRF, SQLi, RFI attacks/defences of an older,vulnerable version of eclass. Project implemented as part of the clas

Aristi_Papastavrou 11 Apr 23, 2022
Mage2click toolset to create and manage the Magento Docker development environment with mutagen.io file-sync for macOS and native filesystem mounts on Linux.

Mage2click - Magento Docker Toolset Mage2click toolset is a system-wide command-line tool for creating and managing simultaneously running Magento Doc

Mage2click 69 Nov 28, 2022
This is a Native PHP MVC. If you will build your own PHP project in MVC with router, you can clone this ready to use MVC pattern repo.

Welcome to PHP-Native-MVC-Pattern ?? If you will build your own PHP project in MVC with router, you can clone this ready to use MVC pattern repo. Work

null 2 Jun 6, 2022
Here is the top 100 PHP functions: it is the list of the most often used PHP native functions

Here is the top 100 PHP functions: it is the list of the most often used PHP native functions. If you are a PHP developer, you must know the Top 100 PHP Functions deeply.

Max Base 16 Dec 11, 2022
Native desktop applications with PHP

php-gui php-gui allows you to build desktop ui applications with PHP only. It leverages FFI extension and Tcl/Tk for that, thus you don't need to comp

Alexei Skorobogatko 342 Dec 27, 2022
YogsMAP adalah GIS(Geographic Information System) yang dibangun dengan PHP Native, MapBox API dan Boostrap

YogsMAP adalah GIS(Geographic Information System) yang dibangun dengan PHP Native, MapBox API dan Boostrap. Website ini menampilkan data pada area di yogyakarta, serta bisa menampilkan lokasi-lokasi yang diinginkan.

Krisna Dewa 3 Nov 18, 2022
Enable method chaining or fluent expressions for any value and method.

PHP Pipe Operator A (hopefully) temporary solution to implement the pipe operator in PHP. Table of contents Requirements How to install How to use The

Sebastiaan Luca 268 Dec 26, 2022
Fluent regular expressions in PHP

FLUX (Fluent Regex) 0.5.2 by Selvin Ortiz Description Fluent Regular Expressions in PHP inspired by and largely based on VerbalExpressions:JS by Jesse

Selvin Ortiz 341 Nov 20, 2022