Mercurial > hg > isophonics-drupal-site
annotate vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Keywords/ShortFormTypeKeywordsStandard.xml @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@17 | 1 <documentation title="Short Form Type Keywords"> |
Chris@17 | 2 <standard> |
Chris@17 | 3 <![CDATA[ |
Chris@17 | 4 Short form of type keywords MUST be used i.e. bool instead of boolean, int instead of integer etc. |
Chris@17 | 5 ]]> |
Chris@17 | 6 </standard> |
Chris@17 | 7 <code_comparison> |
Chris@17 | 8 <code title="Valid: Short form type used."> |
Chris@17 | 9 <![CDATA[ |
Chris@17 | 10 $foo = (bool) $isValid; |
Chris@17 | 11 ]]> |
Chris@17 | 12 </code> |
Chris@17 | 13 <code title="Invalid: Long form type type used."> |
Chris@17 | 14 <![CDATA[ |
Chris@17 | 15 $foo = <em>(boolean)</em> $isValid; |
Chris@17 | 16 ]]> |
Chris@17 | 17 </code> |
Chris@17 | 18 </code_comparison> |
Chris@17 | 19 </documentation> |