Fix PHPStan level 9 errors #148
code-quality.yml
on: pull_request
code-quality
/
Lint GitHub Actions workflows
6s
code-quality
/
Lint PHP files
18s
code-quality
/
Lint Gherkin Feature files
15s
code-quality
/
Spell check
4s
code-quality
/
PHPCS
20s
code-quality
/
PHPStan
29s
Annotations
12 errors and 1 warning
|
code-quality / PHPCS
Process completed with exit code 1.
|
|
code-quality / PHPCS
Process completed with exit code 2.
|
|
code-quality / PHPStan:
src/WP_Export_WXR_Formatter.php#L142
Expression "$oxymel->tag('wp:category')->contains->tag('wp:term_id', $category->term_id)->tag('wp:category_nicename', $category->slug)->tag('wp:category_parent', $category->parent_slug)->optional_cdata('wp:cat_name', $category->name)->optional_cdata('wp:category_description', $category->description)->end" on a separate line does not do anything.
|
|
code-quality / PHPStan:
src/WP_Export_WXR_Formatter.php#L124
Expression "$oxymel->tag('wp:author')->contains->tag('wp:author_id', $author->ID)->tag('wp:author_login', $author->user_login)->tag('wp:author_email', $author->user_email)->tag('wp:author_display_name')->contains->cdata($author->display_name)->end->tag('wp:author_first_name')->contains->cdata($author->user_firstname)->end->tag('wp:author_last_name')->contains->cdata($author->user_lastname)->end->end" on a separate line does not do anything.
|
|
code-quality / PHPStan:
src/WP_Export_WXR_Formatter.php#L108
Call to an undefined method Oxymel::title().
|
|
code-quality / PHPStan:
src/WP_Export_WXR_Formatter.php#L87
Access to private property Oxymel::$xml.
|
|
code-quality / PHPStan:
src/WP_Export_Query.php#L125
Parameter #1 $args of function get_terms expects array{taxonomy?: array<string>|string, object_ids?: array<int>|int, orderby?: string, order?: string, hide_empty?: bool|int, include?: array<int>|string, exclude?: array<int>|string, exclude_tree?: array<int>|string, ...}, array<string, string> given.
|
|
code-quality / PHPStan:
src/WP_Export_Oxymel.php#L13
Expression "$this->{$tag_name}->contains->cdata($contents)->end" on a separate line does not do anything.
|
|
code-quality / PHPStan:
src/Export_Command.php#L424
Call to deprecated function get_users_of_blog():
3.1.0 Use get_users()
|
|
code-quality / PHPStan:
src/Export_Command.php#L199
Parameter #1 $args of function wp_export expects array{filters?: array, format?: class-string<WP_Export_WXR_Formatter>, writer?: class-string<WP_Export_Returner>, writer_args?: mixed}, array{filters: non-empty-array, writer: 'WP_Export_Split_Files_Writer', writer_args: array{max_file_size: mixed, destination_directory: mixed, filename_template: mixed, include_once: mixed}} given.
|
|
code-quality / PHPStan:
src/Export_Command.php#L191
Parameter #1 $args of function wp_export expects array{filters?: array, format?: class-string<WP_Export_WXR_Formatter>, writer?: class-string<WP_Export_Returner>, writer_args?: mixed}, array{filters: non-empty-array, writer: 'WP_Export_File_Writer', writer_args: 'php://output'} given.
|
|
code-quality / PHPStan:
src/Export_Command.php#L184
Call to deprecated function WP_CLI\Utils\wp_clear_object_cache():
1.5.0
|
|
code-quality / PHPCS:
src/WP_Export_WXR_Formatter.php#L67
Detected heredoc without interpolation or expressions. Use nowdoc syntax instead
|