1 | <?php |
||
8 | class WordAds_API { |
||
9 | |||
10 | private static $wordads_status = null; |
||
11 | |||
12 | /** |
||
13 | * Returns site's WordAds status |
||
14 | * @return array boolean values for 'approved' and 'active' |
||
15 | * |
||
16 | * @since 4.5.0 |
||
17 | */ |
||
18 | public static function get_wordads_status() { |
||
45 | |||
46 | /** |
||
47 | * Returns the ads.txt content needed to run WordAds. |
||
48 | * @return array string contents of the ads.txt file. |
||
49 | * |
||
50 | * @since 6.1.0 |
||
51 | */ |
||
52 | public static function get_wordads_ads_txt() { |
||
63 | |||
64 | /** |
||
65 | * Returns status of WordAds approval. |
||
66 | * @return boolean true if site is WordAds approved |
||
67 | * |
||
68 | * @since 4.5.0 |
||
69 | */ |
||
70 | public static function is_wordads_approved() { |
||
77 | |||
78 | /** |
||
79 | * Returns status of WordAds active. |
||
80 | * @return boolean true if ads are active on site |
||
81 | * |
||
82 | * @since 4.5.0 |
||
83 | */ |
||
84 | public static function is_wordads_active() { |
||
91 | |||
92 | /** |
||
93 | * Returns status of WordAds house ads. |
||
94 | * @return boolean true if WP.com house ads should be shown |
||
95 | * |
||
96 | * @since 4.5.0 |
||
97 | */ |
||
98 | public static function is_wordads_house() { |
||
105 | |||
106 | /** |
||
107 | * Grab WordAds status from WP.com API and store as option |
||
108 | * |
||
109 | * @since 4.5.0 |
||
110 | */ |
||
111 | static function update_wordads_status_from_api() { |
||
119 | } |
||
120 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.