Failed Conditions
Push — develop ( 347a72...fd986e )
by Reüel
05:04
created

src/i18n-make-pot.php (4 issues)

1
<?php
2
3
namespace Pronamic\WordPress\Pay;
4
5
class MakePotCommand extends \WP_CLI\I18n\MakePotCommand {
1 ignored issue
show
The type WP_CLI\I18n\MakePotCommand was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
	public function __construct() {
7
		parent::__construct();
8
9
		// https://github.com/wp-cli/i18n-command/blob/v2.0.1/src/MakePotCommand.php#L36-L44
10
		$this->exclude = array_diff( $this->exclude, array(
0 ignored issues
show
Bug Best Practice introduced by
The property exclude does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
11
			'vendor',
12
		) );
13
14
		$this->exclude = array_merge( $this->exclude, array(
15
			'build',
16
			'deploy',
17
			'documentation',
18
			'etc',
19
			'repositories',
20
			'wordpress',
21
			'wp-content',
22
		) );
23
24
		$this->include = array(
1 ignored issue
show
Bug Best Practice introduced by
The property include does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
25
			'admin',
26
			'includes',
27
			'templates',
28
			'vendor',
29
			'views',
30
		);
31
	}
32
}
33
34
// https://github.com/wp-cli/i18n-command/blob/v2.0.1/i18n-command.php
35
\WP_CLI::add_command( 'pronamic i18n make-pot', '\Pronamic\WordPress\Pay\MakePotCommand' );
0 ignored issues
show
The type WP_CLI was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
36
// wp pronamic i18n make-pot . languages/pronamic_ideal.pot --slug="pronamic-ideal"
37