-
Notifications
You must be signed in to change notification settings - Fork 42
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
base: bucket/square-payments
Are you sure you want to change the base?
Feat/sync with square #3759
Conversation
There was a problem hiding this 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
protected array $data = []; |
[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()
public function get_id(): string { |
[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()
public function to_array(): array { |
[phpcs] reported by reviewdog πΆSlevomatCodingStandard.Variables.UselessVariable.UselessVariable
Useless variable $data.
$data = $this->set_object_values(); |
[phpcs] reported by reviewdog πΆGeneric.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 34 spaces but found 1 space
$data = $this->set_object_values(); |
[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()
public function get( string $key ) { |
[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
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 1 in 62fce59
<?php |
[phpcs] reported by reviewdog πΆPSR2.Namespaces.NamespaceDeclaration.BlankLineAfter
There must be one blank line after the namespace declaration
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 3 in 62fce59
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
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 6 in 62fce59
class NoChangeNeededException extends Exception { |
[phpcs] reported by reviewdog πΆSquiz.Commenting.ClassComment.Missing
Missing doc comment for class NoChangeNeededException
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 6 in 62fce59
class NoChangeNeededException extends Exception { |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 7 in 62fce59
// Empty |
[phpcs] reported by reviewdog πΆSquiz.Commenting.FileComment.Missing
Missing file doc comment
<?php |
[phpcs] reported by reviewdog πΆSquiz.Commenting.ClassComment.Missing
Missing doc comment for class Ticket_Item
class Ticket_Item extends Item { |
[phpcs] reported by reviewdog πΆSquiz.Commenting.VariableComment.Missing
Missing member variable doc comment
protected array $data = [ |
[phpcs] reported by reviewdog πΆSquiz.PHP.CommentedOutCode.Found
This comment is 72% valid code; is this commented out code?
// 'absent_at_location_ids' => [], |
[phpcs] reported by reviewdog πΆSquiz.PHP.CommentedOutCode.Found
This comment is 67% valid code; is this commented out code?
// 'item_id' => '', |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks
'name' => '', // max 255 |
[phpcs] reported by reviewdog πΆSquiz.PHP.CommentedOutCode.Found
This comment is 50% valid code; is this commented out code?
// 'stockable_conversion' => [ |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'stockable_item_variation_id' => null, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'stockable_item_variation_id' => null, |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'stockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'stockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'nonstockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'nonstockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.VariableComment.Missing
Missing member variable doc comment
protected Ticket_Object $ticket; |
[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
$this->ticket = $ticket; |
[phpcs] reported by reviewdog πΆSquiz.Commenting.FunctionComment.Missing
Missing doc comment for function get_wp_id()
public function get_wp_id(): int { |
[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
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.
'meta_query' => [ |
[phpcs] reported by reviewdog πΆWordPress.DB.SlowDBQuery.slow_db_query_meta_query
Detected usage of meta_query, possible slow query.
'meta_query' => [ |
[phpcs] reported by reviewdog πΆSquiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 2 spaces after parameter type; 1 found
* @param int $event_id The event ID. |
[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
foreach( $tickets as $ticket ) { |
[phpcs] reported by reviewdog πΆWordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited
foreach( $tickets as $ticket ) { |
[phpcs] reported by reviewdog πΆSquiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after FOREACH keyword; 0 found
foreach( $tickets as $ticket ) { |
[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
foreach( $tickets as $ticket ) { |
[phpcs] reported by reviewdog πΆWordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited
foreach( $tickets as $ticket ) { |
[phpcs] reported by reviewdog πΆSquiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after FOREACH keyword; 0 found
foreach( $tickets as $ticket ) { |
[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 { |
There was a problem hiding this 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
protected array $data = []; |
[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()
public function get_id(): string { |
[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()
public function to_array(): array { |
[phpcs] reported by reviewdog πΆSlevomatCodingStandard.Variables.UselessVariable.UselessVariable
Useless variable $data.
$data = $this->set_object_values(); |
[phpcs] reported by reviewdog πΆGeneric.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 34 spaces but found 1 space
$data = $this->set_object_values(); |
[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()
public function get( string $key ) { |
[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
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 1 in 591bbae
<?php |
[phpcs] reported by reviewdog πΆPSR2.Namespaces.NamespaceDeclaration.BlankLineAfter
There must be one blank line after the namespace declaration
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 3 in 591bbae
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
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 6 in 591bbae
class NoChangeNeededException extends Exception { |
[phpcs] reported by reviewdog πΆSquiz.Commenting.ClassComment.Missing
Missing doc comment for class NoChangeNeededException
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 6 in 591bbae
class NoChangeNeededException extends Exception { |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/NoChangeNeededException.php
Line 7 in 591bbae
// Empty |
[phpcs] reported by reviewdog πΆSquiz.Commenting.FileComment.Missing
Missing file doc comment
<?php |
[phpcs] reported by reviewdog πΆSquiz.Commenting.ClassComment.Missing
Missing doc comment for class Ticket_Item
class Ticket_Item extends Item { |
[phpcs] reported by reviewdog πΆSquiz.Commenting.VariableComment.Missing
Missing member variable doc comment
protected array $data = [ |
[phpcs] reported by reviewdog πΆSquiz.PHP.CommentedOutCode.Found
This comment is 72% valid code; is this commented out code?
// 'absent_at_location_ids' => [], |
[phpcs] reported by reviewdog πΆSquiz.PHP.CommentedOutCode.Found
This comment is 67% valid code; is this commented out code?
// 'item_id' => '', |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks
'name' => '', // max 255 |
[phpcs] reported by reviewdog πΆSquiz.PHP.CommentedOutCode.Found
This comment is 50% valid code; is this commented out code?
// 'stockable_conversion' => [ |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'stockable_item_variation_id' => null, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'stockable_item_variation_id' => null, |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'stockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'stockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'nonstockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'nonstockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.VariableComment.Missing
Missing member variable doc comment
protected Ticket_Object $ticket; |
[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
$this->ticket = $ticket; |
[phpcs] reported by reviewdog πΆSquiz.Commenting.FunctionComment.Missing
Missing doc comment for function get_wp_id()
public function get_wp_id(): int { |
[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
There was a problem hiding this 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
// 'stockable_item_variation_id' => null, |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'stockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'stockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆUniversal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// 'nonstockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆSquiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// 'nonstockable_quantity' => 1, |
[phpcs] reported by reviewdog πΆGeneric.Formatting.MultipleStatementAlignment.IncorrectWarning
Equals sign not aligned correctly; expected 1 space but found 5 spaces
$this->ticket = $ticket; |
[phpcs] reported by reviewdog πΆWordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
When a multi-item array uses associative keys, each value should start on a new line.
event-tickets/src/Tickets/Commerce/Gateways/Square/Syncs/Objects/Ticket_Item.php
Line 129 in 7c1ce32
$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
β¦t/sync-with-square
return false; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
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; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
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 ) { |
There was a problem hiding this comment.
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 ) { |
There was a problem hiding this comment.
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 ); | ||
} ); |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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' => [ |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
π« Ticket
[TICKET_ID]
ποΈ Description
π₯ Artifacts
βοΈ Checklist
npm run changelog
to add changelog file(s). More info herewpunit
orintegration
tests.wpunit
orintegration
tests.