wxphp/wxphp — pull request #57 by Yogarine (2014-03-26 16:05:24+00:00)
Title: Improvements to interface_generator.php

I plan to do some propotyping with wxphp, but I first wanted to have proper autocompletion and type checking in PhpStorm.
So I modified interface_generator.php with the following goals in mind:
- Creating proper facades of wxWidgets' overloaded functions.
- Type annotations which are as specific as possible.
- Defining the constant with proper values.

So what I did more specifically:
- Combine the different parameter names of overloaded methods by combining them from the different definitions
- Combine the different parameter types of overloaded methods
- Combine the default values for overloaded methods as well as possible
- Also combine the annotations in the PHPdocs as well as posisble
- Make sure the constants contain properly cleaned up values.
- Added __construct() aliases for the constructors
- Prefix the methods with "public"
- Remove the & for all the params of objects since objects are always by reference in PHP.

The code which is now generated creates stubs that nicely match the wxWidget interface as good as possible, while attempting as well as possible to give decent type hinting and context.