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

ESET - Inno/move elementor abstracts to common #2070

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Camwyn
Copy link
Member

@Camwyn Camwyn commented Apr 8, 2024

This was me noodling about moving the base classes to common - to make them extendable in ET+, etc w/o requiring TEC

required: the-events-calendar/the-events-calendar#4528

@Camwyn Camwyn added hold Status: on hold–do not proceed with other status items. innovation Project associated with 20% time innovations. labels Apr 8, 2024
@Camwyn Camwyn requested a review from bordoni April 8, 2024 14:20
* Which widget instance is being used for this template engine.
*
* @since TBD
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.VariableComment.MissingVar
Missing @var tag in member variable comment

$this->set_template_folder_lookup( true );
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.MissingParamTag
Doc comment for parameter "$widget" missing

/**
* Factory method to create a new instance of the Template Engine.
*
* @param $widget The widget instance to set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.MissingParamType
Missing parameter type

return $instance;
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.MissingParamTag
Doc comment for parameter "$widget" missing

*
* @since TBD
*
* @param $widget The widget instance to set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.MissingParamType
Missing parameter type

@Camwyn Camwyn changed the title Inno/move elementor abstracts to common ESET - Inno/move elementor abstracts to common Apr 10, 2024
@Camwyn Camwyn changed the base branch from bucket/event-single-elementor-template-integration to master May 3, 2024 14:37
return (string) apply_filters( 'tec_elementor_widget_slug_prefix', $prefix, $trim, $this );
}

public function create_slug( $slug ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function create_slug()

return $this->template;
}

public function get_template_prefix( $file = '' ): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function get_template_prefix()

* @param int $accepted_args The number of arguments the filter accepts.
*/
protected function set_template_filter( string $on, ?callable $callback = null, int $priority = 10, int $accepted_args = 1 ): void {
$hook_name = $this->get_template_prefix( $this->trim_slug() );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.Formatting.MultipleStatementAlignment.IncorrectWarning
Equals sign not aligned correctly; expected 1 space but found 5 spaces

* @return string
*/
public function get_asset_file_name( $suffix = 'css' ) {
$file = static::get_asset_base_path() . static::trim_slug();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

* @return string
*/
public function get_asset_handle( $suffix = 'css' ) {
$handle = static::get_asset_prefix() . static::trim_slug();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

);
}

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose
Function closing brace must go on the next line following the body; found 1 blank lines before brace

*/
public function get_output(): string {
$template = $this->get_template();
$output = $template->template( 'widgets/base', $this->get_template_args(), false );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold Status: on hold–do not proceed with other status items. innovation Project associated with 20% time innovations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants