[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/splitbrain/lesserphp/src/Utils/ -> Asserts.php (summary)

(no description)

File Size: 81 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Asserts:: (4 methods):
  assertArgs()
  assertMinArgs()
  assertNumber()
  assertColor()


Class: Asserts  - X-Ref

assertArgs($value, $expectedArgs, $name = '')   X-Ref
Check that the number of arguments is correct and return them


assertMinArgs($value, $expectedMinArgs, $name = '')   X-Ref
Check that the number of arguments is at least the expected number and return them


assertNumber(array $value, string $error = 'expecting number')   X-Ref
Checks that the value is a number and returns it as float

param: array $value The parsed value triplet
param: string $error The error message to throw

assertColor(array $value, $error = 'expected color value')   X-Ref