Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 02 - Editing/01 - Completion/1.3. Type hinting.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// $person->

// 2. We can solve this!
// Find the $people = array(); and add a PHPDoc comment: /** @var Person[] */ - this tells PhpStorm the array contains Person objects.
// Find the $people = array(); and add a PHPDoc comment: /** @var $people Person[] */ - this tells PhpStorm the array contains Person objects.
//
// Type $person-> and see for yourself that we now have autocompletion.

Expand All @@ -36,4 +36,4 @@
// Note PhpStorm also supports @method, @type, @property, @deprecated, @global, @name, @param, @static, @since, @link, @mixin, ...

// $person->A
}
}