contao/module-core — pull request #1 by leofeyer (2014-07-28 12:22:42+00:00)
Title: [WIP] Improve the IDE compatibility

The PR includes some exemplary changes to improve the IDE compatibility, which @aschempp has shown me at the Austriaday. @contao/developers I don't know if it were worth the effort to add this kind of information everywhere?

During my tests, I have noticed two limitations (there might be more):

```php
* @return Collection|null The model collection or null
```

This should be replaced with `@return static`, so the IDE can e.g. return `MemberModel` instead of just `Model`. However, this does only work with `@return static`, not with `@return static|null`, although the latter is actually the correct one. Does the IDE compatibility weigh more in this case`

```php
/** @var Database_Result $result */
$result = $db->query("SELECT * FROM tl_content WHERE id=2");

echo $result->headline;
echo $result->text;
```

The IDE will always show the "property accessed via magic method" notice in this case, because it is impossible for the `Database_Result` class to know its properties.