PHP Classes

File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml

Recommend this page to a friend!
  Classes of Simo   CodeIgniter Plugin for Z-Ray   zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml   Download  
File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CodeIgniter Plugin for Z-Ray
Show CodeIgniter application information in Z-Ray
Author: By
Last change:
Date: 2 years ago
Size: 1,193 bytes
 

Contents

Class file image Download
<documentation title="Method Declarations"> <standard> <![CDATA[ Method names should not be prefixed with an underscore to indicate visibility. The static keyword, when present, should come after the visibility declaration, and the final and abstract keywords should come before. ]]> </standard> <code_comparison> <code title="Valid: Correct method naming."> <![CDATA[ class Foo { private function <em>bar</em>() { } } ]]> </code> <code title="Invalid: An underscore prefix used to indicate visibility."> <![CDATA[ class Foo { private function <em>_bar</em>() { } } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Correct ordering of method prefixes."> <![CDATA[ class Foo { <em>final public static</em> function <em>bar</em>() { } } ]]> </code> <code title="Invalid: static keyword used before visibility and final used after."> <![CDATA[ class Foo { <em>static public final</em> function <em>bar</em>() { } } ]]> </code> </code_comparison> </documentation>