Conditions | 7 |
Paths | 5 |
Total Lines | 24 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | protected function process_output( $output, $value ) { |
||
25 | if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) { |
||
26 | return; |
||
27 | } |
||
28 | $output = wp_parse_args( |
||
29 | $output, array( |
||
|
|||
30 | 'media_query' => 'global', |
||
31 | 'prefix' => '', |
||
32 | 'units' => '', |
||
33 | 'suffix' => '', |
||
34 | ) |
||
35 | ); |
||
36 | if ( is_array( $value ) ) { |
||
37 | if ( isset( $output['choice'] ) && $output['choice'] ) { |
||
38 | $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value[ $output['choice'] ] ) . $output['units'] . $output['suffix']; |
||
39 | return; |
||
40 | } |
||
41 | if ( isset( $value['url'] ) ) { |
||
42 | $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value['url'] ) . $output['units'] . $output['suffix']; |
||
43 | return; |
||
44 | } |
||
45 | return; |
||
46 | } |
||
47 | $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value ) . $output['units'] . $output['suffix']; |
||
48 | } |
||
50 |
For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this: