Conditions | 3 |
Paths | 3 |
Total Lines | 26 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public static function get_options() { |
||
18 | // Make sure we only get options from the database and services once per connection. |
||
19 | if ( count( self::$options ) > 0 ) { |
||
20 | return self::$options; |
||
21 | } |
||
22 | |||
23 | $defaults = array( |
||
24 | 'meta' => array( |
||
25 | 'max_upload_size' => 0, |
||
26 | ), |
||
27 | ); |
||
28 | |||
29 | self::$options = Jetpack_Options::get_option( self::$option_name, array() ); |
||
|
|||
30 | self::$options = array_merge( $defaults, self::$options ); |
||
31 | |||
32 | // Make sure that the shadow blog id never comes from the options, but instead uses the |
||
33 | // associated shadow blog id, if videopress is enabled. |
||
34 | self::$options['shadow_blog_id'] = 0; |
||
35 | |||
36 | // Use the Jetpack ID for the shadow blog ID if we have a plan that supports VideoPress |
||
37 | if ( Jetpack::active_plan_supports( 'videopress' ) ) { |
||
38 | self::$options['shadow_blog_id'] = Jetpack_Options::get_option( 'id' ); |
||
39 | } |
||
40 | |||
41 | return self::$options; |
||
42 | } |
||
43 | |||
62 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..