Download the PHP package ixnode/php-checker without Composer

On this page you can find all versions of the php package ixnode/php-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-checker

PHP Checker

Release PHP PHPStan PHPCS LICENSE

A collection of various PHP types check classes.

Introduction

This package is helpful to validate complex data types like complex arrays and to comply with DocBlock declarations (static code analysis tools like PHPStan or Psalm). Uses and throws exceptions from ixnode/php-exception as a "one-liner". Instead of using the following code:

just use this one:

Installation

Usage

Example 1

Example 2

Example 3

Example 4

Available checkers

Class Ixnode\PhpChecker\Checker

Checks general data type specific properties.

Method Expected input Method Parameters Output value (if passed) Exception
checkArray (Alias of CheckerArray::check) array<int\|string, mixed> null Same as input TypeInvalidException checkBoolean bool null Same as input TypeInvalidException
checkClass (Alias of CheckerClass::checkClass) ClassName class-string Same as input TypeInvalidException, ClassInvalidException
checkFloat float null Same as input TypeInvalidException
checkInteger int null Same as input TypeInvalidException
checkIterable iterable null Same as input TypeInvalidException
checkJson (Alias of CheckerJson::check) json-string null Same as input TypeInvalidException
checkObject object null Same as input TypeInvalidException
checkStdClass (Alias of CheckerClass::checkStdClass) stdClass null Same as input TypeInvalidException
checkString string null Same as input TypeInvalidException
checkStringOrNull string\|null null Same as input TypeInvalidException

Class Ixnode\PhpChecker\CheckerArray

Checks array specific properties.

Method Expected input Method Parameters Output value (if passed) Exception
check array<int\|string, mixed> null Same as input TypeInvalidException
checkArray array<int\|tring, array<string, mixed>> null or array<int, string> array<int, array<string, mixed>> TypeInvalidException
checkAssoziative array<string, mixed> null Same as input TypeInvalidException
checkClass array<int\|string, ClassName> class-string Same as input TypeInvalidException
checkFlat array<int\|string, bool\|float\|int\|string\|null> null Same as input TypeInvalidException
checkSequential array<int, mixed> null Same as input TypeInvalidException
checkString array<int\|string, string> null Same as input TypeInvalidException
checkStringOrNull array<int\|string, string\|null> null Same as input TypeInvalidException
checkIndex array<int\|;string, mixed> string mixed (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArray array<int\|string, array<int\|string, mixed>> string array<int\|string, mixed> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArrayArray array<int\|string, array<int\|string, array<string, mixed>>> string, null or array<int, string> array<int, array<string, mixed>> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArrayAssoziative array<int\|string, array<string, mixed>> string array<string, mixed> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArrayClass array<int\|string, array<int\|string, ClassName>> string array<int\|string, ClassName> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArrayFlat array<int\|string, array<int\|string, bool\|float\|int\|string\|null>> string array<int\|string, bool\|float\|int\|string\|null> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArraySequential array<int\|string, array<int, mixed>> string array<int, string> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArrayString array<int\|string, array<int\|string, string>> string array<int\|string, string> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexArrayStringOrNull array<int\|string, array<int\|string, string\|null>> string array<int\|string, string\|null> (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexInteger array<int\|string, int> string int (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexString array<int\|string, string> string string (index of given) TypeInvalidException, ArrayKeyNotFoundException
checkIndexStringOrNull array<int\|string, string\|null> string string\|null (index of given) TypeInvalidException, ArrayKeyNotFoundException

Class Ixnode\PhpChecker\CheckerClass

Checks class specific properties.

Method Expected input Method Parameters Output value (if passed) Exception
checkClass ClassName class-string Same as input TypeInvalidException, ClassInvalidException
checkStdClass stdClass null Same as input TypeInvalidException

Class Ixnode\PhpChecker\CheckerJson

Checks JSON specific properties.

Method Expected input Method Parameters Output value (if passed) Exception
check json-string null Same as input TypeInvalidException
isJson json-string null bool null

Development

License

This tool is licensed under the MIT License - see the LICENSE file for details


All versions of php-checker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ixnode/php-exception Version ^0.1.19
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ixnode/php-checker contains the following files

Loading the files please wait ....