Failed Conditions
Push — develop ( 42492c...9389f9 )
by Remco
09:37 queued 03:13
created

MakePotCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 17
nc 1
nop 0
dl 0
loc 24
ccs 0
cts 20
cp 0
c 0
b 0
f 0
cc 1
crap 2
rs 9.7
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( $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...
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Coding Style introduced by
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
11
			'vendor',
12
		) );
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
13
14
		$this->exclude = array_merge( $this->exclude, array(
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Coding Style introduced by
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
15
			'build',
16
			'deploy',
17
			'documentation',
18
			'etc',
19
			'repositories',
20
			'wordpress',
21
			'wp-content',
22
		) );
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
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
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
35
\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...
36
// 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...
37