-
Notifications
You must be signed in to change notification settings - Fork 41
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
SL-150 #3130
SL-150 #3130
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 🐶NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine
There should be a comma after the last array item in a multi-line array.
'error' => 'Invalid request body' |
[phpcs] reported by reviewdog 🐶SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma
Multi-line arrays must have a trailing comma after the last element.
'error' => 'Invalid request body' |
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 🐶Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
Tabs must be used to indent lines; spaces are not allowed
); |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine
There should be a comma after the last array item in a multi-line array.
'error' => 'Invalid request body' |
[phpcs] reported by reviewdog 🐶SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma
Multi-line arrays must have a trailing comma after the last element.
'error' => 'Invalid request body' |
[phpcs] reported by reviewdog 🐶WordPress.PHP.YodaConditions.NotYoda
Use Yoda Condition checks, you must.
if ( $updated_seat_types === false ) { |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine
There should be a comma after the last array item in a multi-line array.
'error' => 'Failed to update the seat types from the service.' |
[phpcs] reported by reviewdog 🐶SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma
Multi-line arrays must have a trailing comma after the last element.
'error' => 'Failed to update the seat types from the service.' |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine
There should be a comma after the last array item in a multi-line array.
'error' => 'Nonce verification failed' |
[phpcs] reported by reviewdog 🐶SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma
Multi-line arrays must have a trailing comma after the last element.
'error' => 'Nonce verification failed' |
[phpcs] reported by reviewdog 🐶Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space
$body = $this->get_request_body(); |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine
There should be a comma after the last array item in a multi-line array.
'error' => 'Invalid request body' |
[phpcs] reported by reviewdog 🐶SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma
Multi-line arrays must have a trailing comma after the last element.
'error' => 'Invalid request body' |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine
There should be a comma after the last array item in a multi-line array.
'error' => 'Invalid request body' |
[phpcs] reported by reviewdog 🐶SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma
Multi-line arrays must have a trailing comma after the last element.
'error' => 'Invalid request body' |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
Tabs must be used to indent lines; spaces are not allowed
Seat_Types_Table::truncate() !== false; |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function __construct()
public function __construct( array $post_types ) { |
[phpcs] reported by reviewdog 🐶Universal.WhiteSpace.PrecisionAlignment.Found
Found precision alignment of 3 spaces.
->get_ids( true ) as $post_id |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
Tabs must be used to indent lines; spaces are not allowed
->get_ids( true ) as $post_id |
[phpcs] reported by reviewdog 🐶Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
Stand-alone post-increment statement found. Use pre-increment instead: ++$total_updated .
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement
Expected no spaces between $total_updated and the increment operator; 1 found
$total_updated ++; |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ 'seats' => $seats, ], |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ 'id' => $layout_id, ], |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ '%d', ], |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ '%s', ] |
[phpcs] reported by reviewdog 🐶Squiz.Classes.SelfMemberReference.NotUsed
Must use "self::" for local static member reference
Layouts::invalidate_cache( false ); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
Tabs must be used to indent lines; spaces are not allowed
->first_id(); |
[phpcs] reported by reviewdog 🐶Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
Stand-alone post-increment statement found. Use pre-increment instead: ++$total_updated .
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement
Expected no spaces between $total_updated and the increment operator; 1 found
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Squiz.Strings.DoubleQuoteUsage.NotRequired
String "UPDATE %i SET name = %s, seats = %d WHERE id = %s" does not require double quotes; use single quotes instead
"UPDATE %i SET name = %s, seats = %d WHERE id = %s", |
[phpcs] reported by reviewdog 🐶WordPress.PHP.YodaConditions.NotYoda
Use Yoda Condition checks, you must.
if ( $updated === false ) { |
[phpcs] reported by reviewdog 🐶WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen
Space after opening control structure is required
if( empty( $updates ) ) { |
[phpcs] reported by reviewdog 🐶WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited
if( empty( $updates ) ) { |
[phpcs] reported by reviewdog 🐶Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after IF keyword; 0 found
if( empty( $updates ) ) { |
[phpcs] reported by reviewdog 🐶Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
Stand-alone post-increment statement found. Use pre-increment instead: ++$total_updated .
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement
Expected no spaces between $total_updated and the increment operator; 1 found
$total_updated ++; |
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 🐶Universal.WhiteSpace.PrecisionAlignment.Found
Found precision alignment of 3 spaces.
->get_ids( true ) as $post_id |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
Tabs must be used to indent lines; spaces are not allowed
->get_ids( true ) as $post_id |
[phpcs] reported by reviewdog 🐶Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
Stand-alone post-increment statement found. Use pre-increment instead: ++$total_updated .
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement
Expected no spaces between $total_updated and the increment operator; 1 found
$total_updated ++; |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ 'seats' => $seats, ], |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ 'id' => $layout_id, ], |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ '%d', ], |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.CommaAfterLast.FoundSingleLine
A comma after the last array item in a single-line array is not allowed.
[ '%s', ] |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
Tabs must be used to indent lines; spaces are not allowed
->first_id(); |
[phpcs] reported by reviewdog 🐶Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
Stand-alone post-increment statement found. Use pre-increment instead: ++$total_updated .
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement
Expected no spaces between $total_updated and the increment operator; 1 found
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Squiz.Strings.DoubleQuoteUsage.NotRequired
String "UPDATE %i SET name = %s, seats = %d WHERE id = %s" does not require double quotes; use single quotes instead
"UPDATE %i SET name = %s, seats = %d WHERE id = %s", |
[phpcs] reported by reviewdog 🐶WordPress.PHP.YodaConditions.NotYoda
Use Yoda Condition checks, you must.
if ( $updated === false ) { |
[phpcs] reported by reviewdog 🐶WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen
Space after opening control structure is required
if( empty( $updates ) ) { |
[phpcs] reported by reviewdog 🐶WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
No space before opening parenthesis is prohibited
if( empty( $updates ) ) { |
[phpcs] reported by reviewdog 🐶Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after IF keyword; 0 found
if( empty( $updates ) ) { |
[phpcs] reported by reviewdog 🐶Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
Stand-alone post-increment statement found. Use pre-increment instead: ++$total_updated .
$total_updated ++; |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement
Expected no spaces between $total_updated and the increment operator; 1 found
$total_updated ++; |
|
||
$total_updated = 0; | ||
|
||
$ticketable_post_types = (array) tribe_get_option( 'ticket-enabled-post-types', [] ); |
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.
Let's use this maybe:
event-tickets/src/Tribe/Main.php
Line 1044 in a968f03
public function post_types() { |
Co-authored-by: Rafsun Chowdhury <[email protected]>
*/ | ||
export async function handleReservationsUpdatedFollowingSeatTypes(updated) { | ||
if (!updated || Object.keys(updated).length === 0) { | ||
return 0; |
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.
return 0; | |
return false; |
Ticket: SL-150
Related PR on service
This PR udpates the code to handle the seat type and reservation updates following a layout edit operation.
Demos: