Skip to content

Commit

Permalink
remove enabled node
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrajodas committed Jan 4, 2021
1 parent 7ec4630 commit 6894a0e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions src/Configuration/ConfigDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ protected function getParametersDefinition(): ArrayNodeDefinition
->isRequired()
->cannotBeEmpty()
->end()
->booleanNode('enabled')
->defaultValue(true)
->end()
->arrayNode('header')
->addDefaultsIfNotSet()
->children()
Expand Down
4 changes: 0 additions & 4 deletions src/Extractor/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ public function run(array $sheets): array
$exceptionHandler = new ExceptionHandler();

foreach ($sheets as $sheet) {
if (!$sheet['enabled']) {
continue;
}

try {
$spreadsheet = $this->driveApi->getSpreadsheet($sheet['fileId']);
$this->logger->info('Obtained spreadsheet metadata');
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ protected function makeConfig(array $testFile): array
'sheetId' => $testFile['sheets'][0]['properties']['sheetId'],
'sheetTitle' => $testFile['sheets'][0]['properties']['title'],
'outputTable' => $this->testFileName,
'enabled' => true,
];

return $config;
Expand Down
7 changes: 0 additions & 7 deletions tests/phpunit/Extractor/ExceptionHandleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function provideExceptionsForGetSpreadsheet(): array
'sheetTitle' => 'Title XXXXXX',
'outputTable' => 'table',
'header' => ['rows' => 1, 'columns' => []],
'enabled' => true,
],
],
'http404' => [
Expand All @@ -70,7 +69,6 @@ public function provideExceptionsForGetSpreadsheet(): array
'sheetTitle' => 'Title XXXXXX',
'outputTable' => 'table',
'header' => ['rows' => 1, 'columns' => []],
'enabled' => true,
],
],
'other request exception without description' => [
Expand All @@ -90,7 +88,6 @@ public function provideExceptionsForGetSpreadsheet(): array
'sheetTitle' => 'Title XXXXXX',
'outputTable' => 'table',
'header' => ['rows' => 1, 'columns' => []],
'enabled' => true,
],
],
'other request exception with description' => [
Expand All @@ -111,7 +108,6 @@ public function provideExceptionsForGetSpreadsheet(): array
'sheetTitle' => 'Title XXXXXX',
'outputTable' => 'table',
'header' => ['rows' => 1, 'columns' => []],
'enabled' => true,
],
],
'other random exception' => [
Expand All @@ -128,7 +124,6 @@ public function provideExceptionsForGetSpreadsheet(): array
'sheetTitle' => 'Title XXXXXX',
'outputTable' => 'table',
'header' => ['rows' => 1, 'columns' => []],
'enabled' => true,
],
],
'exception with another response array ' => [
Expand All @@ -150,7 +145,6 @@ public function provideExceptionsForGetSpreadsheet(): array
'sheetTitle' => 'Title XXXXXX',
'outputTable' => 'table',
'header' => ['rows' => 1, 'columns' => []],
'enabled' => true,
],
],
];
Expand Down Expand Up @@ -192,7 +186,6 @@ public function provideExceptionsForExport(): array
'sheetTitle' => 'Title XXXXXX',
'outputTable' => 'table',
'header' => ['rows' => 1, 'columns' => []],
'enabled' => true,
],
],
];
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"sheetId": null,
"sheetTitle": null,
"outputTable": null,
"enabled": true,
"header": {
"rows": 1
}
Expand Down

0 comments on commit 6894a0e

Please sign in to comment.