PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Properties/ConstantVisibilityStandard.xml

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Properties/ConstantVisibilityStandard.xml   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Properties/ConstantVisibilityStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: 2 days ago
Size: 694 bytes
 

Contents

Class file image Download
<documentation title="Constant Visibility"> <standard> <![CDATA[ Visibility must be declared on all class constants if your project PHP minimum version supports constant visibilities (PHP 7.1 or later). The term "class" refers to all classes, interfaces, enums and traits. ]]> </standard> <code_comparison> <code title="Valid: Constant visibility declared."> <![CDATA[ class Foo { <em>private const</em> BAR = 'bar'; } ]]> </code> <code title="Invalid: Constant visibility not declared."> <![CDATA[ class Foo { <em>const</em> BAR = 'bar'; } ]]> </code> </code_comparison> </documentation>