Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Yii Framework 2 apidoc extension Change Log
- Enh #196: Added support for PHPDoc inline links (arogachev)
- Enh #147: Added feature of viewing method source code without external links (arogachev)
- Bug #168: Fixed handling of inheritance (arogachev)
- Bug #240: Fixed a bug when a "virtual" / "magic" property's full description was displayed instead of preview in
properties list (arogachev)
- Bug #239: Do not show a "virtual" / "magic" methods's full description if it matches short description (arogachev)


Expand Down
4 changes: 3 additions & 1 deletion models/TypeDoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ public function __construct($reflector = null, $context = null, $config = [])
}

if ($tag instanceof Property || $tag instanceof PropertyRead || $tag instanceof PropertyWrite) {
$shortDescription = $tag->getDescription() ? BaseDoc::extractFirstSentence($tag->getDescription()): '';

$property = new PropertyDoc(null, $context, [
'sourceFile' => $this->sourceFile,
'name' => '$' . $tag->getVariableName(),
Expand All @@ -209,7 +211,7 @@ public function __construct($reflector = null, $context = null, $config = [])
'definedBy' => $this->name,
'type' => (string) $tag->getType(),
'types' => $this->splitTypes($tag->getType()),
'shortDescription' => $tag->getDescription(),
'shortDescription' => $shortDescription,
'description' => $tag->getDescription(),
]);

Expand Down