Automattic /
jetpack
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Sitemaps (per the protocol) are essentially lists of XML fragments; |
||
| 4 | * lists which are subject to size constraints. The Jetpack_Sitemap_Buffer_Master |
||
| 5 | * extends the Jetpack_Sitemap_Buffer class to represent the master sitemap |
||
| 6 | * buffer. |
||
| 7 | * |
||
| 8 | * @since 5.3.0 |
||
| 9 | * @package Jetpack |
||
| 10 | */ |
||
| 11 | |||
| 12 | /** |
||
| 13 | * A buffer for constructing master sitemap xml files for users without libxml support. |
||
| 14 | * |
||
| 15 | * @since 5.3.0 |
||
| 16 | */ |
||
| 17 | class Jetpack_Sitemap_Buffer_Master extends Jetpack_Sitemap_Buffer_Fallback { |
||
| 18 | |||
| 19 | protected function get_root_element() { |
||
| 20 | |||
| 21 | if ( ! isset( $this->root ) ) { |
||
| 22 | |||
| 23 | $sitemap_index_xsl_url = $this->finder->construct_sitemap_url( 'sitemap-index.xsl' ); |
||
| 24 | $jetpack_version = JETPACK__VERSION; |
||
| 25 | |||
| 26 | $this->root = array( |
||
|
0 ignored issues
–
show
|
|||
| 27 | "<!-- generator='jetpack-{$jetpack_version}' -->" . PHP_EOL |
||
| 28 | . "<?xml-stylesheet type='text/xsl' href='{$sitemap_index_xsl_url}'?>" . PHP_EOL |
||
| 29 | . "<sitemapindex xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>" . PHP_EOL, |
||
| 30 | '</sitemapindex>' |
||
| 31 | ); |
||
| 32 | |||
| 33 | $this->byte_capacity -= strlen( join( '', $this->root ) ); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $this->root; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
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..