Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed a bug when a "virtual" / "magic" property's full description was displayed instead of preview in properties list #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
samdark merged 3 commits into yiisoft:master from arogachev:240-virtual-property-preview
Dec 8, 2021
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
View file Open in desktop
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
View file Open in desktop
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

AltStyle によって変換されたページ (->オリジナル) /