Multiple Statement Alignment

When declaring arrays, there should be one space on either side of a double arrow operator used to assign a value to a key.

Valid: correct spacing between the key and value.

$foo = array( 'cat'<em> => </em>22 ); $bar = array( 'year'<em> => </em>$current_year );

Invalid: No or incorrect spacing between the key and value.

$foo = array( 'cat'<em>=></em>22 ); $bar = array( 'year'<em>=> </em>$current_year );
In the case of a block of related assignments, it is recommended to align the arrows to promote readability.

Valid: Double arrow operators aligned

$args = array( 'cat'<em> => </em>22, 'year'<em> => </em>$current_year, 'monthnum'<em> => </em>$current_month, );

Invalid: Not aligned; harder to read

$args = array( 'cat' <em>=></em> 22, 'year' <em>=></em> $current_year, 'monthnum' <em>=></em> $current_month, );