Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PccContent.php #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
*/
class PccContent extends BasePccContent {

/**
* Smart Component Renderer.
*
* @var SmartComponentRenderer $smartComponentRenderer
*/
protected SmartComponentRenderer $smartComponentRenderer;

/**
* PccContent Plugin constructor.
*
Expand All @@ -36,16 +29,20 @@
* @param SmartComponentRenderer $smartComponentRenderer
* Smart Component Renderer.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, SmartComponentRenderer $smartComponentRenderer) {
public function __construct(array $configuration, $plugin_id, $plugin_definition, protected SmartComponentRenderer $smartComponentRenderer) {

Check notice on line 32 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L32

Avoid excessively long variable names like $smartComponentRenderer. Keep variable name length under 20.

Check notice on line 32 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L32

Expected 2 blank lines before function; 1 found

Check notice on line 32 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L32

Line indented incorrectly; expected 4 spaces, found 2

Check notice on line 32 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L32

Opening brace should be on a new line
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->smartComponentRenderer = $smartComponentRenderer;
}

/**
* {@inheritDoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container->get('pcx_smart_components.renderer'));
return new static(

Check notice on line 40 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L40

Line indented incorrectly; expected at least 8 spaces, found 4
$configuration,

Check notice on line 41 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L41

Multi-line function call not indented correctly; expected 8 spaces but found 6

Check notice on line 41 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L41

Whitespace found at end of line
$plugin_id,

Check notice on line 42 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L42

Line indented incorrectly; expected at least 8 spaces, found 6

Check notice on line 42 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L42

Multi-line function call not indented correctly; expected 8 spaces but found 6

Check notice on line 42 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L42

Whitespace found at end of line
$plugin_definition,

Check notice on line 43 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L43

Line indented incorrectly; expected at least 8 spaces, found 6

Check notice on line 43 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L43

Multi-line function call not indented correctly; expected 8 spaces but found 6

Check notice on line 43 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L43

Whitespace found at end of line
$container->get('pcx_smart_components.renderer')

Check notice on line 44 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L44

Line indented incorrectly; expected at least 8 spaces, found 6

Check notice on line 44 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L44

Multi-line function call not indented correctly; expected 8 spaces but found 6
);

Check notice on line 45 in modules/pcx_smart_components/src/Plugin/views/field/PccContent.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/pcx_smart_components/src/Plugin/views/field/PccContent.php#L45

Line indented incorrectly; expected at least 8 spaces, found 4
}

/**
Expand Down