Hi Sam,

Am Freitag, den 04.01.2008, 12:11 -0500 schrieb Sam Barrow:
[...]
> Exactly. I just added the "mixed" type hint which is the same as using
> no type hint. The new patch is attached.
[...]

To make your patch better you should add a bunch of test cases. Just a
test brainstorming:
      * Current behaviour (no type hinting) works as expected
      * Current behaviour for class type hinting works
      * Scalar type hints are enforced to be lowercase ("Int" hints a
        class, "int" a primitive)
      * All new type hints work
      * All new type hint aliases work
      * All new type hints throw errors if wrong types are passed
      * Meta type hints (like "mixed", "num", etc.) work
      * Reflections on type hints work (foo(string $str);
        ReflectionParam::getType() => "string",
        ReflectionParam::isArray() => false and the like)

There are already a few test cases for type hinting in
tests/classes/type_hinting_*.phpt for you to look at.

cu, Lars

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to