cakephp-ide-helper icon indicating copy to clipboard operation
cakephp-ide-helper copied to clipboard

Annotate virtual fields on entities.

Open dereuromark opened this issue 2 years ago • 1 comments

Resolves https://github.com/dereuromark/cakephp-ide-helper/issues/266

A virtual field will be "linked" to the property it handles:


 /**
 * @property-read int|null $expected_type
 */
 class MyEntity ...

     /**
+    * @link $expected_type
     *
     * @return int|null
     */
    protected function _getExpectedType(): ?int

dereuromark avatar Jul 30 '22 03:07 dereuromark

Codecov Report

Merging #278 (3f28577) into master (5a59465) will decrease coverage by 0.69%. The diff coverage is 63.84%.

:exclamation: Current head 3f28577 differs from pull request most recent head 8ffe28a. Consider uploading reports for the commit 8ffe28a to get more accurate results

@@             Coverage Diff              @@
##             master     #278      +/-   ##
============================================
- Coverage     87.87%   87.17%   -0.70%     
- Complexity     1560     1609      +49     
============================================
  Files            98      101       +3     
  Lines          4255     4383     +128     
============================================
+ Hits           3739     3821      +82     
- Misses          516      562      +46     
Impacted Files Coverage Δ
src/Annotation/LinkAnnotation.php 0.00% <0.00%> (ø)
...llbackAnnotatorTask/TableCallbackAnnotatorTask.php 82.97% <ø> (ø)
src/Annotator/CallbackAnnotatorTaskCollection.php 85.71% <ø> (ø)
src/Annotation/SeeAnnotation.php 42.10% <42.10%> (ø)
src/Annotation/AnnotationFactory.php 94.44% <75.00%> (-2.44%) :arrow_down:
...nnotatorTask/VirtualFieldCallbackAnnotatorTask.php 80.72% <80.72%> (ø)
...ackAnnotatorTask/AbstractCallbackAnnotatorTask.php 96.07% <100.00%> (+0.24%) :arrow_up:
.../ClassAnnotatorTask/AbstractClassAnnotatorTask.php 86.51% <100.00%> (ø)
src/Annotator/AbstractAnnotator.php 86.49% <0.00%> (+0.28%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov-commenter avatar Jul 30 '22 03:07 codecov-commenter

Shouldn't this be a @see tag instead of @link?

ADmad avatar Aug 04 '22 02:08 ADmad

The idea here was that right-click + usage in IDE also finds the method to the property So it provides a backlink as well But I checked, and @see seems to have the same effect, thank you

Screenshot from 2022-08-04 12-45-50

dereuromark avatar Aug 04 '22 09:08 dereuromark