PHP Classes

File: vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.xml

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.xml   Download  
File: vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.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: Yesterday
Size: 909 bytes
 

Contents

Class file image Download
<?xml version="1.0"?> <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd" title="Cast Structure Spacing" > <standard> <![CDATA[ A type cast should be preceded by whitespace. There is only one exception to this rule: when the cast is preceded by the spread operator there should be no space between the spread operator and the cast. ]]> </standard> <code_comparison> <code title="Valid: space before typecast."> <![CDATA[ $a =<em> </em>(int) '420'; // No space between spread operator and cast. $a = function_call( <em>...(array)</em> $mixed ); ]]> </code> <code title="Invalid: no space before typecast."> <![CDATA[ $a <em>=(</em>int) '420'; ]]> </code> </code_comparison> </documentation>