Skip to content

Commit 307bef0

Browse files
committed
formatting fixes
1 parent 0b336f6 commit 307bef0

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

inc/Integrations/Airtable/AirtableIntegration.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@ public static function init(): void {
1010
}
1111

1212
public static function register_blocks(): void {
13-
$data_source_configs = DataSourceCrud::get_configs_by_service( REMOTE_DATA_BLOCKS_AIRTABLE_SERVICE );
13+
$data_source_configs = DataSourceCrud::get_configs_by_service(
14+
REMOTE_DATA_BLOCKS_AIRTABLE_SERVICE
15+
);
1416

1517
foreach ( $data_source_configs as $config ) {
1618
$data_source = AirtableDataSource::from_array( $config );
1719
self::register_block_for_airtable_data_source( $data_source );
1820
}
1921
}
2022

21-
public static function register_block_for_airtable_data_source( AirtableDataSource $data_source, array $block_overrides = [] ): void {
23+
public static function register_block_for_airtable_data_source(
24+
AirtableDataSource $data_source,
25+
array $block_overrides = []
26+
): void {
2227
register_remote_data_block(
2328
array_merge(
2429
[
@@ -38,7 +43,10 @@ public static function register_block_for_airtable_data_source( AirtableDataSour
3843
);
3944
}
4045

41-
public static function register_loop_block_for_airtable_data_source( AirtableDataSource $data_source, array $block_overrides = [] ): void {
46+
public static function register_loop_block_for_airtable_data_source(
47+
AirtableDataSource $data_source,
48+
array $block_overrides = []
49+
): void {
4250
register_remote_data_block(
4351
array_merge(
4452
[

inc/Integrations/Google/Sheets/GoogleSheetsDataSource.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ protected static function get_service_config_schema(): array {
5252
protected static function map_service_config( array $service_config ): array {
5353
return [
5454
'display_name' => $service_config['display_name'],
55-
'endpoint' => sprintf( 'https://sheets.googleapis.com/v4/spreadsheets/%s', $service_config['spreadsheet']['id'] ),
55+
'endpoint' => sprintf(
56+
'https://sheets.googleapis.com/v4/spreadsheets/%s',
57+
$service_config['spreadsheet']['id']
58+
),
5659
'request_headers' => function () use ( $service_config ): array {
5760
$access_token = GoogleAuth::generate_token_from_service_account_key(
5861
$service_config['credentials'],
@@ -88,7 +91,6 @@ public function ___temp_get_query(): HttpQuery {
8891
],
8992
];
9093

91-
9294
foreach ( $service_config['sheets'][0]['output_query_mappings'] as $mapping ) {
9395
$mapping_key = $mapping['key'];
9496
$output_schema['type'][ $mapping_key ] = [
@@ -126,7 +128,6 @@ public function ___temp_get_list_query(): HttpQuery {
126128
],
127129
];
128130

129-
130131
foreach ( $service_config['sheets'][0]['output_query_mappings'] as $mapping ) {
131132
$mapping_key = $mapping['key'];
132133
$output_schema['type'][ $mapping_key ] = [

inc/Integrations/Google/Sheets/GoogleSheetsIntegration.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ public static function init(): void {
1010
}
1111

1212
public static function register_blocks(): void {
13-
$data_source_configs = DataSourceCrud::get_configs_by_service( REMOTE_DATA_BLOCKS_GOOGLE_SHEETS_SERVICE );
13+
$data_source_configs = DataSourceCrud::get_configs_by_service(
14+
REMOTE_DATA_BLOCKS_GOOGLE_SHEETS_SERVICE
15+
);
1416

1517
foreach ( $data_source_configs as $config ) {
1618
$data_source = GoogleSheetsDataSource::from_array( $config );
1719
self::register_block_for_google_sheets_data_source( $data_source );
1820
self::register_loop_block_for_google_sheets_data_source( $data_source );
1921
}
2022
}
21-
public static function register_block_for_google_sheets_data_source( GoogleSheetsDataSource $data_source, array $block_overrides = [] ): void {
23+
24+
public static function register_block_for_google_sheets_data_source(
25+
GoogleSheetsDataSource $data_source,
26+
array $block_overrides = []
27+
): void {
2228
register_remote_data_block(
2329
array_merge(
2430
[
@@ -38,7 +44,10 @@ public static function register_block_for_google_sheets_data_source( GoogleSheet
3844
);
3945
}
4046

41-
public static function register_loop_block_for_google_sheets_data_source( GoogleSheetsDataSource $data_source, array $block_overrides = [] ): void {
47+
public static function register_loop_block_for_google_sheets_data_source(
48+
GoogleSheetsDataSource $data_source,
49+
array $block_overrides = []
50+
): void {
4251
register_remote_data_block(
4352
array_merge(
4453
[

0 commit comments

Comments
 (0)