Skip to content

Feat/sync with square #3759

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

Draft
wants to merge 38 commits into
base: bucket/square-payments
Choose a base branch
from
Draft

Conversation

dpanta94
Copy link
Member

🎫 Ticket

[TICKET_ID]

πŸ—’οΈ Description

πŸŽ₯ Artifacts

βœ”οΈ Checklist

  • Ran npm run changelog to add changelog file(s). More info here
  • Code is covered by NEW wpunit or integration tests.
  • Code is covered by EXISTING wpunit or integration tests.
  • Are all the required tests passing?
  • Automated code review comments are addressed.
  • Have you added Artifacts?
  • Check the base branch for your PR.
  • Add your PR to the project board for the release.

Copy link
Contributor

@tec-bot tec-bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

phpcs

[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FileComment.Missing
Missing file doc comment


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.ClassComment.Missing
Missing doc comment for class Item

abstract class Item implements JsonSerializable {


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.VariableComment.Missing
Missing member variable doc comment


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

abstract public function get_wp_id(): int;


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

abstract protected function set_object_values(): array;


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


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

public function jsonSerialize(): array {


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


[phpcs] reported by reviewdog 🐢
SlevomatCodingStandard.Variables.UselessVariable.UselessVariable
Useless variable $data.


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


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

public function set( string $key, $value ): void {


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


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

public function set_item_data( string $key, $value ): void {


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

public function get_item_data( string $key ) {


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

protected function register_hooks(): void {


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

public function on_ticket_id_mapping( string $square_object_id ): void {


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

public function on_sync_object( array $square_object ): void {


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FileComment.Missing
Missing file doc comment


[phpcs] reported by reviewdog 🐢
PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter
There must be one blank line after the namespace declaration

namespace TEC\Tickets\Commerce\Gateways\Square\Syncs\Objects;


[phpcs] reported by reviewdog 🐢
StellarWP.Classes.ValidClassName.NotSnakeCase
Class name "NoChangeNeededException" is not in Capitalized_Snake_Case format


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.ClassComment.Missing
Missing doc comment for class NoChangeNeededException


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FileComment.Missing
Missing file doc comment


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.ClassComment.Missing
Missing doc comment for class Ticket_Item


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.VariableComment.Missing
Missing member variable doc comment


[phpcs] reported by reviewdog 🐢
Squiz.PHP.CommentedOutCode.Found
This comment is 72% valid code; is this commented out code?


[phpcs] reported by reviewdog 🐢
Squiz.PHP.CommentedOutCode.Found
This comment is 67% valid code; is this commented out code?


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks


[phpcs] reported by reviewdog 🐢
Squiz.PHP.CommentedOutCode.Found
This comment is 50% valid code; is this commented out code?


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.VariableComment.Missing
Missing member variable doc comment


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

public function __construct( Ticket_Object $ticket ) {


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


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


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

public function get_ticket(): Ticket_Object {


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

protected function set_object_values(): array {


[phpcs] reported by reviewdog 🐢
WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
When a multi-item array uses associative keys, each value should start on a new line.

$this->set_item_data( 'price_money', [ 'amount' => $this->ticket->price * 100, 'currency' => 'USD' ] );


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FileComment.Missing
Missing file doc comment


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.ClassComment.Missing
Missing doc comment for class Remote_Objects


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

public function transform( array $batch ): array {


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

public function transform_batch( array $batch ): array {


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

public function transform_inventory_batch( array $batch ): array {


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter
Expected 1 space after "=>"; 0 found

foreach ( $batch as $post_id =>$tickets ) {


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

public function cache_remote_object_state( array $batch ): void {


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

$ticket_item = new Ticket_Item( $ticket );


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

$cache_key = 'square_sync_object_state_' . $count['catalog_object_id'] . '_' . $count['location_id'];


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

protected function get_location_ids(): array {


[phpcs] reported by reviewdog 🐢
Squiz.PHP.CommentedOutCode.Found
This comment is 67% valid code; is this commented out code?

// $merchant->get_pos_location_id( $event_id ),


[phpcs] reported by reviewdog 🐢
PSR2.Files.EndFileNewline.NoneFound
Expected 1 newline at end of file; 0 found


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


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 2 spaces after parameter type; 1 found

* @param int $ticket_id The ticket ID.


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 2 spaces after parameter type; 1 found

* @param int $timestamp The timestamp.


[phpcs] reported by reviewdog 🐢
Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound
It is recommended not to use reserved keyword "parent" as function parameter name. Found: $parent

public function schedule_ticket_sync_on_date_start( int $ticket_id, bool $its_happening, int $timestamp, WP_Post $parent ): void {


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


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 2 spaces after parameter type; 1 found

* @param int $ticket_id The ticket ID.


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 2 spaces after parameter type; 1 found

* @param int $timestamp The timestamp.


[phpcs] reported by reviewdog 🐢
Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound
It is recommended not to use reserved keyword "parent" as function parameter name. Found: $parent

public function schedule_ticket_sync_on_date_end( int $ticket_id, bool $its_happening, int $timestamp, WP_Post $parent ): void {


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

public function sync_inventory( string $ticket_able_post_type ): void {


[phpcs] reported by reviewdog 🐢
WordPress.DB.SlowDBQuery.slow_db_query_meta_query
Detected usage of meta_query, possible slow query.


[phpcs] reported by reviewdog 🐢
WordPress.DB.SlowDBQuery.slow_db_query_meta_query
Detected usage of meta_query, possible slow query.


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 2 spaces after parameter type; 1 found


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

public function sync_events_inventory( int $event_id, bool $execute = true ): array {


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

protected function process_inventory_batch( array $batch ): void {


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen
Space after opening control structure is required

foreach( $rejected_objects as $post_id => $tickets ) {


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited

foreach( $rejected_objects as $post_id => $tickets ) {


[phpcs] reported by reviewdog 🐢
Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after FOREACH keyword; 0 found

foreach( $rejected_objects as $post_id => $tickets ) {


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen
Space after opening control structure is required


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited


[phpcs] reported by reviewdog 🐢
Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after FOREACH keyword; 0 found


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen
Space after opening control structure is required

foreach( $batch as $post_id => $tickets ) {


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited

foreach( $batch as $post_id => $tickets ) {


[phpcs] reported by reviewdog 🐢
Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after FOREACH keyword; 0 found

foreach( $batch as $post_id => $tickets ) {


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen
Space after opening control structure is required


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited


[phpcs] reported by reviewdog 🐢
Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after FOREACH keyword; 0 found


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

protected function clean_up_synced_meta( int $object_id ): void {


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

protected function process_batch( array $batch ): void {


[phpcs] reported by reviewdog 🐢
WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
When a multi-item array uses associative keys, each value should start on a new line.

do_action( 'tribe_log', 'error', 'Square Sync', [ 'idempotency_key' => $idempotency_key, 'response' => $response ] );


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

protected function fire_sync_object_hooks( array $object ): void {


[phpcs] reported by reviewdog 🐢
Universal.NamingConventions.NoReservedKeywordParameterNames.objectFound
It is recommended not to use reserved keyword "object" as function parameter name. Found: $object

protected function fire_sync_object_hooks( array $object ): void {


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

protected function sync_is_in_progress(): bool {


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

protected function fire_sync_completed_hook(): void {


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

protected function sync_is_completed(): bool {

Copy link
Contributor

@tec-bot tec-bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

phpcs

[phpcs] reported by reviewdog 🐢
Squiz.Commenting.VariableComment.Missing
Missing member variable doc comment


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

abstract public function get_wp_id(): int;


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

abstract protected function set_object_values(): array;


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


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

public function jsonSerialize(): array {


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


[phpcs] reported by reviewdog 🐢
SlevomatCodingStandard.Variables.UselessVariable.UselessVariable
Useless variable $data.


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


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

public function set( string $key, $value ): void {


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


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

public function set_item_data( string $key, $value ): void {


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

public function get_item_data( string $key ) {


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

protected function register_hooks(): void {


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

public function on_ticket_id_mapping( string $square_object_id ): void {


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

public function on_sync_object( array $square_object ): void {


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FileComment.Missing
Missing file doc comment


[phpcs] reported by reviewdog 🐢
PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter
There must be one blank line after the namespace declaration

namespace TEC\Tickets\Commerce\Gateways\Square\Syncs\Objects;


[phpcs] reported by reviewdog 🐢
StellarWP.Classes.ValidClassName.NotSnakeCase
Class name "NoChangeNeededException" is not in Capitalized_Snake_Case format


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.ClassComment.Missing
Missing doc comment for class NoChangeNeededException


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.FileComment.Missing
Missing file doc comment


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.ClassComment.Missing
Missing doc comment for class Ticket_Item


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.VariableComment.Missing
Missing member variable doc comment


[phpcs] reported by reviewdog 🐢
Squiz.PHP.CommentedOutCode.Found
This comment is 72% valid code; is this commented out code?


[phpcs] reported by reviewdog 🐢
Squiz.PHP.CommentedOutCode.Found
This comment is 67% valid code; is this commented out code?


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks


[phpcs] reported by reviewdog 🐢
Squiz.PHP.CommentedOutCode.Found
This comment is 50% valid code; is this commented out code?


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.VariableComment.Missing
Missing member variable doc comment


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

public function __construct( Ticket_Object $ticket ) {


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


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


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

public function get_ticket(): Ticket_Object {


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

protected function set_object_values(): array {


[phpcs] reported by reviewdog 🐢
WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
When a multi-item array uses associative keys, each value should start on a new line.

$this->set_item_data( 'price_money', [ 'amount' => $this->ticket->price * 100, 'currency' => 'USD' ] );


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter
Expected 1 space after "=>"; 0 found

foreach ( $batch as $post_id =>$tickets ) {


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

$ticket_item = new Ticket_Item( $ticket );


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

$cache_key = 'square_sync_object_state_' . $count['catalog_object_id'] . '_' . $count['location_id'];


[phpcs] reported by reviewdog 🐢
PSR2.Files.EndFileNewline.NoneFound
Expected 1 newline at end of file; 0 found

Copy link
Contributor

@tec-bot tec-bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

phpcs

[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


[phpcs] reported by reviewdog 🐢
Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed


[phpcs] reported by reviewdog 🐢
Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation


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


[phpcs] reported by reviewdog 🐢
WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
When a multi-item array uses associative keys, each value should start on a new line.

$this->set_item_data( 'price_money', [ 'amount' => $this->ticket->price * 100, 'currency' => 'USD' ] );


[phpcs] reported by reviewdog 🐢
WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter
Expected 1 space after "=>"; 0 found

foreach ( $batch as $post_id =>$tickets ) {


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

$ticket_item = new Ticket_Item( $ticket );


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

$cache_key = 'square_sync_object_state_' . $count['catalog_object_id'] . '_' . $count['location_id'];


[phpcs] reported by reviewdog 🐢
PSR2.Files.EndFileNewline.NoneFound
Expected 1 newline at end of file; 0 found

return 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 🐢
Squiz.Commenting.FunctionComment.MissingParamTag
Doc comment for parameter "$new_options" missing

return 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 🐢
Squiz.Commenting.FunctionComment.MissingParamTag
Doc comment for parameter "$post_type" missing

unset( $settings[ self::OPTION_SYNC_LATEST_TIMESTAMP ] );
}

add_action( 'tec_shutdown', function () use ( $settings, $post_type ) {
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 🐢
PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket
Opening parenthesis of a multi-line function call must be the last content on the line

unset( $settings[ self::OPTION_SYNC_LATEST_TIMESTAMP ] );
}

add_action( 'tec_shutdown', function () use ( $settings, $post_type ) {
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 🐢
PEAR.Functions.FunctionCallSignature.MultipleArguments
Only one argument is allowed per line in a multi-line function call

* @param string $post_type The post type.
*/
do_action( 'tec_tickets_commerce_square_sync_post_reset_status', $post_type );
} );
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 🐢
PEAR.Functions.FunctionCallSignature.CloseBracketLine
Closing parenthesis of a multi-line function call must be on a line by itself

* @since TBD
*
* @param Container $container The container.
* @param Settings $settings The settings.
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.SpacingAfterParamType
Expected 2 spaces after parameter type; 1 found

'posts_per_page' => $schedule_events_to_delete_at_once, // Most servers will be able to handle 1000 ids at a time and at the same time it will cover most cases all in one go.
'post_status' => 'publish',
'fields' => 'ids',
'meta_query' => [
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 🐢
WordPress.DB.SlowDBQuery.slow_db_query_meta_query
Detected usage of meta_query, possible slow query.

*
* @since TBD
*
* @param int $post_id The post ID.
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.SpacingAfterParamType
Expected 1 spaces after parameter type; 3 found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants