@var tag to document the “Type” of properties,

In Magento

**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

?>

<?php /** @var MjwebHidepriceBlockHiderealprice $block */ ?>
<?php

 

Syntax

@var [“Type”] [$element_name] [<description>]

Description

The @var tag defines which type of data is represented by the value of a property.

The @var tag MUST contain the name of the element it documents. An exception to this is when property declarations only refer to a single property. In this case the name of the property MAY be omitted.

This is used when compound statements are used to define a series of properties. Such a compound statement can only have one DocBlock while several items are represented.

Examples

class Foo
{
  /** @var string|null Should contain a description */
  protected $description = null;
}


Leave a Comment