davetorres / dbc-php
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/davetorres/dbc-php
Requires
- php: ^7.1.3
This package is auto-updated.
Last update: 2025-12-17 12:14:47 UTC
README
Note: Much of this code was taken from another repo. I've lost the link to the original, so I can't reference the original. If you know where this originated please let me know.
Design by Contract Function
This is used to check that functions and methods are given the correct number of arguments
function myMethod(string $arg1, int $arg2, array $arg3 = null) { assert(check_num_args()); // continue with your code }
If $arg1 or $arg2 are not supplied you will get an assert error.
Since the $arg3 argument is optional it can be left out without error