class Bar in Coder 8.2
Same name in this branch
Same name and namespace in other branches
Class declaration.
Classes can have a multiline comment.
Hierarchy
- class \Bar
Expanded class hierarchy of Bar
1 string reference to 'Bar'
File
- coder_sniffer/
Drupal/ Test/ good/ good.php, line 581 - This file contains all the valid notations for the drupal coding standard.
View source
class Bar {
/**
* Private properties have no prefix.
*
* @var int
*/
private $secret = 1;
/**
* Protected properties also don't have a prefix.
*
* @var int
*/
protected $foo = 1;
/**
* Longer properties use camelCase naming.
*
* @var int
*/
public $barProperty = 1;
/**
* Public static variables use camelCase, too.
*
* @var string
*/
public static $basePath = NULL;
/**
* {@inheritdoc}
*/
protected $modules = [
'node',
'user',
];
/**
* Enter description here ...
*/
public function foo() {
}
/**
* Enter description here ...
*/
protected function barMethod() {
}
/**
* Test the ++ and -- operator.
*/
public function incDecTest() {
$this->foo++;
$this->foo--;
--$this->foo;
++$this->foo;
}
/**
* It is allowed to leave out param docs on methods.
*/
public function noParamDocs($a, $b) {
}
/**
* Param comments with references are found correctly.
*
* @param string $a
* Parameter one.
* @param array $b
* Parameter two.
*/
public function test($a, array &$b) {
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Bar:: |
public | property | Longer properties use camelCase naming. | |
Bar:: |
public static | property | Public static variables use camelCase, too. | |
Bar:: |
protected | property | Protected properties also don't have a prefix. | |
Bar:: |
protected | property | ||
Bar:: |
private | property | Private properties have no prefix. | |
Bar:: |
protected | function | Enter description here ... | |
Bar:: |
public | function | Enter description here ... | |
Bar:: |
public | function | Test the ++ and -- operator. | |
Bar:: |
public | function | It is allowed to leave out param docs on methods. | |
Bar:: |
public | function | Param comments with references are found correctly. |