Failed Conditions
Push — develop ( 92bd22...eb46eb )
by Remco
06:33
created

MakePotCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 23
dl 0
loc 32
ccs 0
cts 27
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 31 1
1
<?php
0 ignored issues
show
Coding Style introduced by
This file is missing a doc comment.
Loading history...
2
3
namespace Pronamic\WordPress\Pay;
4
5
class MakePotCommand extends \WP_CLI\I18n\MakePotCommand {
1 ignored issue
show
Bug introduced by
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...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
6
	public function __construct() {
0 ignored issues
show
Coding Style Documentation introduced by
Missing function doc comment
Loading history...
7
		parent::__construct();
8
9
		// https://github.com/wp-cli/i18n-command/blob/v2.0.1/src/MakePotCommand.php#L36-L44
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
10
		$this->exclude = array_diff(
1 ignored issue
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
			$this->exclude,
12
			array(
13
				'vendor',
14
			)
15
		);
16
17
		$this->exclude = array_merge(
18
			$this->exclude,
19
			array(
20
				'build',
21
				'deploy',
22
				'documentation',
23
				'etc',
24
				'repositories',
25
				'wordpress',
26
				'wp-content',
27
			)
28
		);
29
30
		$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...
31
			'admin',
32
			'includes',
33
			'templates',
34
			'vendor',
35
			'views',
36
			'*.php',
37
		);
38
	}
39
}
40
41
// https://github.com/wp-cli/i18n-command/blob/v2.0.1/i18n-command.php
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
42
\WP_CLI::add_command( 'pronamic i18n make-pot', '\Pronamic\WordPress\Pay\MakePotCommand' );
0 ignored issues
show
Bug introduced by
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...
43
// wp pronamic i18n make-pot . languages/pronamic_ideal.pot --slug="pronamic-ideal"
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
Coding Style introduced by
There should be no blank line after an inline comment.
Loading history...
44