Skip to content

Commit 4a35702

Browse files
jblzchriszarate
andauthored
Do not auto-align assignments to the right-most level (#114)
* Standardize on a single space after assignments. Do not auto-align equal signs in assignment statements to the right-most subsequent one. Also, do not right-align associative arrays. * autoformat operator spacing * Revert "autoformat operator spacing" This reverts commit e8c4f34. * reapply the results of composer phpcs-fix * Fix alignment --------- Co-authored-by: chriszarate <[email protected]>
1 parent 589820c commit 4a35702

File tree

78 files changed

+894
-882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+894
-882
lines changed

example/airtable/elden-ring-map/inc/interactivity-store/interactivity-store.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
class InteractivityStore {
1111
public static function get_map_interactive_context( WP_Block $block ): array {
1212
$query_context = [
13-
'blockName' => $block->context[ BlockBindings::$context_name ]['blockName'],
13+
'blockName' => $block->context[ BlockBindings::$context_name ]['blockName'],
1414
'queryInput' => $block->context[ BlockBindings::$context_name ]['queryInput'],
1515
];
16-
$response = BlockBindings::execute_query( $query_context, 'GET Map Coordinates' );
17-
$coordinates = array_map( function ( $value ) {
16+
$response = BlockBindings::execute_query( $query_context, 'GET Map Coordinates' );
17+
$coordinates = array_map( function ( $value ) {
1818
$result = $value['result'];
1919
return [
2020
'name' => $result['map_name']['value'],
21-
'x' => $result['x']['value'],
22-
'y' => $result['y']['value'],
21+
'x' => $result['x']['value'],
22+
'y' => $result['y']['value'],
2323
];
2424
}, $response['results'] );
2525

example/airtable/elden-ring-map/inc/queries/class-airtable-elden-ring-list-locations-query.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public function get_input_schema(): array {
1515

1616
public function get_output_schema(): array {
1717
return [
18-
'root_path' => '$.records[*]',
18+
'root_path' => '$.records[*]',
1919
'is_collection' => true,
20-
'mappings' => [
21-
'id' => [
20+
'mappings' => [
21+
'id' => [
2222
'name' => 'Location ID',
2323
'path' => '$.id',
2424
'type' => 'id',
@@ -28,17 +28,17 @@ public function get_output_schema(): array {
2828
'path' => '$.fields.Name',
2929
'type' => 'string',
3030
],
31-
'title' => [
31+
'title' => [
3232
'name' => 'Name',
3333
'path' => '$.fields.Name',
3434
'type' => 'string',
3535
],
36-
'x' => [
36+
'x' => [
3737
'name' => 'x',
3838
'path' => '$.fields.x',
3939
'type' => 'string',
4040
],
41-
'y' => [
41+
'y' => [
4242
'name' => 'y',
4343
'path' => '$.fields.y',
4444
'type' => 'string',

example/airtable/elden-ring-map/inc/queries/class-airtable-elden-ring-list-maps-query.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public function get_input_schema(): array {
1515

1616
public function get_output_schema(): array {
1717
return [
18-
'root_path' => '$.records[*]',
18+
'root_path' => '$.records[*]',
1919
'is_collection' => true,
20-
'mappings' => [
21-
'id' => [
20+
'mappings' => [
21+
'id' => [
2222
'name' => 'Map ID',
2323
'path' => '$.id',
2424
'type' => 'id',

example/airtable/elden-ring-map/register.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
require_once __DIR__ . '/inc/queries/class-airtable-elden-ring-list-maps-query.php';
1111

1212
function register_airtable_elden_ring_map_block() {
13-
$block_name = 'Elden Ring Location';
13+
$block_name = 'Elden Ring Location';
1414
$access_token = \RemoteDataBlocks\Example\get_access_token( 'airtable_elden_ring' );
1515

1616
if ( empty( $access_token ) ) {
@@ -20,8 +20,8 @@ function register_airtable_elden_ring_map_block() {
2020
}
2121

2222
$elden_ring_data_source = AirtableDataSource::create( $access_token, 'appqI3sJ9R2NcML8Y', [], 'Elden Ring Locations' );
23-
$list_locations_query = new AirtableEldenRingListLocationsQuery( $elden_ring_data_source );
24-
$list_maps_query = new AirtableEldenRingListMapsQuery( $elden_ring_data_source );
23+
$list_locations_query = new AirtableEldenRingListLocationsQuery( $elden_ring_data_source );
24+
$list_maps_query = new AirtableEldenRingListMapsQuery( $elden_ring_data_source );
2525

2626
register_remote_data_block( $block_name, $list_locations_query );
2727
register_remote_data_list_query( $block_name, $list_maps_query );

example/airtable/events/inc/queries/class-airtable-get-event-query.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ class AirtableGetEventQuery extends HttpQueryContext {
88
public function get_input_schema(): array {
99
return [
1010
'record_id' => [
11-
'name' => 'Record ID',
11+
'name' => 'Record ID',
1212
'overrides' => [
1313
[
1414
'target' => 'utm_content',
15-
'type' => 'query_var',
15+
'type' => 'query_var',
1616
],
1717
],
18-
'type' => 'id',
18+
'type' => 'id',
1919
],
2020
];
2121
}
2222

2323
public function get_output_schema(): array {
2424
return [
2525
'is_collection' => false,
26-
'mappings' => [
27-
'id' => [
26+
'mappings' => [
27+
'id' => [
2828
'name' => 'Record ID',
2929
'path' => '$.id',
3030
'type' => 'id',
3131
],
32-
'title' => [
32+
'title' => [
3333
'name' => 'Title',
3434
'path' => '$.fields.Activity',
3535
'type' => 'string',
@@ -39,7 +39,7 @@ public function get_output_schema(): array {
3939
'path' => '$.fields.Location',
4040
'type' => 'string',
4141
],
42-
'type' => [
42+
'type' => [
4343
'name' => 'Type',
4444
'path' => '$.fields.Type',
4545
'type' => 'string',

example/airtable/events/inc/queries/class-airtable-list-events-query.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@
77
class AirtableListEventsQuery extends HttpQueryContext {
88
public function get_output_schema(): array {
99
return [
10-
'root_path' => '$.records[*]',
10+
'root_path' => '$.records[*]',
1111
'is_collection' => true,
12-
'mappings' => [
12+
'mappings' => [
1313
'record_id' => [
1414
'name' => 'Record ID',
1515
'path' => '$.id',
1616
'type' => 'id',
1717
],
18-
'title' => [
18+
'title' => [
1919
'name' => 'Title',
2020
'path' => '$.fields.Activity',
2121
'type' => 'string',
2222
],
23-
'location' => [
23+
'location' => [
2424
'name' => 'Location',
2525
'path' => '$.fields.Location',
2626
'type' => 'string',
2727
],
28-
'type' => [
28+
'type' => [
2929
'name' => 'Type',
3030
'path' => '$.fields.Type',
3131
'type' => 'string',

example/airtable/events/register.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
require_once __DIR__ . '/inc/queries/class-airtable-list-events-query.php';
99

1010
function register_airtable_events_block() {
11-
$block_name = 'Conference Event';
11+
$block_name = 'Conference Event';
1212
$access_token = \RemoteDataBlocks\Example\get_access_token( 'airtable_events' );
1313

14-
$airtable_data_source = AirtableDataSource::create( $access_token, 'appVQ2PAl95wQSo9S', [], 'Conference Events' );
15-
$airtable_get_event_query = new AirtableGetEventQuery( $airtable_data_source );
14+
$airtable_data_source = AirtableDataSource::create( $access_token, 'appVQ2PAl95wQSo9S', [], 'Conference Events' );
15+
$airtable_get_event_query = new AirtableGetEventQuery( $airtable_data_source );
1616
$airtable_list_events_query = new AirtableListEventsQuery( $airtable_data_source );
1717

1818
register_remote_data_block( $block_name, $airtable_get_event_query );

example/github/remote-data-blocks/inc/queries/class-github-get-file-as-html-query.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public function get_input_schema(): array {
1111
'name' => 'File Path',
1212
'type' => 'string',
1313
],
14-
'sha' => [
14+
'sha' => [
1515
'name' => 'SHA',
1616
'type' => 'string',
1717
],
18-
'size' => [
18+
'size' => [
1919
'name' => 'Size',
2020
'type' => 'number',
2121
],
22-
'url' => [
22+
'url' => [
2323
'name' => 'URL',
2424
'type' => 'string',
2525
],
@@ -29,28 +29,28 @@ public function get_input_schema(): array {
2929
public function get_output_schema(): array {
3030
return [
3131
'is_collection' => false,
32-
'mappings' => [
32+
'mappings' => [
3333
'file_content' => [
3434
'name' => 'File Content',
3535
'path' => '$.content',
3636
'type' => 'html',
3737
],
38-
'file_path' => [
38+
'file_path' => [
3939
'name' => 'File Path',
4040
'path' => '$.path',
4141
'type' => 'string',
4242
],
43-
'sha' => [
43+
'sha' => [
4444
'name' => 'SHA',
4545
'path' => '$.sha',
4646
'type' => 'string',
4747
],
48-
'size' => [
48+
'size' => [
4949
'name' => 'Size',
5050
'path' => '$.size',
5151
'type' => 'number',
5252
],
53-
'url' => [
53+
'url' => [
5454
'name' => 'URL',
5555
'path' => '$.url',
5656
'type' => 'string',
@@ -80,11 +80,11 @@ public function get_request_headers( array $input_variables ): array {
8080

8181
public function process_response( string $html_response_data, array $input_variables ): array {
8282
return [
83-
'content' => $html_response_data,
83+
'content' => $html_response_data,
8484
'file_path' => $input_variables['file_path'],
85-
'sha' => $input_variables['sha'],
86-
'size' => $input_variables['size'],
87-
'url' => $input_variables['url'],
85+
'sha' => $input_variables['sha'],
86+
'size' => $input_variables['size'],
87+
'url' => $input_variables['url'],
8888
];
8989
}
9090
}

example/github/remote-data-blocks/inc/queries/class-github-list-files-query.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ public function get_input_schema(): array {
2121

2222
public function get_output_schema(): array {
2323
return [
24-
'root_path' => sprintf( '$.tree[?(@.path =~ /\\.%s$/)]', ltrim( $this->file_extension, '.' ) ),
24+
'root_path' => sprintf( '$.tree[?(@.path =~ /\\.%s$/)]', ltrim( $this->file_extension, '.' ) ),
2525
'is_collection' => true,
26-
'mappings' => [
26+
'mappings' => [
2727
'file_path' => [
2828
'name' => 'File Path',
2929
'path' => '$.path',
3030
'type' => 'string',
3131
],
32-
'sha' => [
32+
'sha' => [
3333
'name' => 'SHA',
3434
'path' => '$.sha',
3535
'type' => 'string',
3636
],
37-
'size' => [
37+
'size' => [
3838
'name' => 'Size',
3939
'path' => '$.size',
4040
'type' => 'number',
4141
],
42-
'url' => [
42+
'url' => [
4343
'name' => 'URL',
4444
'path' => '$.url',
4545
'type' => 'string',

example/github/remote-data-blocks/register.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
function register_github_file_as_html_block() {
1212
$repo_owner = 'Automattic';
13-
$repo_name = 'remote-data-blocks';
14-
$branch = 'trunk';
13+
$repo_name = 'remote-data-blocks';
14+
$branch = 'trunk';
1515

1616
$block_name = sprintf( 'GitHub File As HTML (%s/%s)', $repo_owner, $repo_name );
1717

18-
$github_data_source = GitHubDataSource::create( $repo_owner, $repo_name, $branch );
18+
$github_data_source = GitHubDataSource::create( $repo_owner, $repo_name, $branch );
1919
$github_get_file_as_html_query = new GitHubGetFileAsHtmlQuery( $github_data_source );
20-
$github_get_list_files_query = new GitHubListFilesQuery( $github_data_source, '.md' );
20+
$github_get_list_files_query = new GitHubListFilesQuery( $github_data_source, '.md' );
2121

2222
register_remote_data_block( $block_name, $github_get_file_as_html_query );
2323
register_remote_data_list_query( $block_name, $github_get_list_files_query );

0 commit comments

Comments
 (0)