Mercurial > hg > isophonics-drupal-site
annotate vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneObjectStructurePerFileStandard.xml @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | |
children |
rev | line source |
---|---|
Chris@18 | 1 <documentation title="One Object Structure Per File"> |
Chris@18 | 2 <standard> |
Chris@18 | 3 <![CDATA[ |
Chris@18 | 4 There should only be one class or interface or trait defined in a file. |
Chris@18 | 5 ]]> |
Chris@18 | 6 </standard> |
Chris@18 | 7 <code_comparison> |
Chris@18 | 8 <code title="Valid: Only one object structure in the file."> |
Chris@18 | 9 <![CDATA[ |
Chris@18 | 10 <?php |
Chris@18 | 11 <em>trait Foo</em> |
Chris@18 | 12 { |
Chris@18 | 13 } |
Chris@18 | 14 ]]> |
Chris@18 | 15 </code> |
Chris@18 | 16 <code title="Invalid: Multiple object structures defined in one file."> |
Chris@18 | 17 <![CDATA[ |
Chris@18 | 18 <?php |
Chris@18 | 19 <em>trait Foo</em> |
Chris@18 | 20 { |
Chris@18 | 21 } |
Chris@18 | 22 |
Chris@18 | 23 <em>class Bar</em> |
Chris@18 | 24 { |
Chris@18 | 25 } |
Chris@18 | 26 ]]> |
Chris@18 | 27 </code> |
Chris@18 | 28 </code_comparison> |
Chris@18 | 29 </documentation> |