Skip to content

Commit f0bc083

Browse files
committed
Merge branch 'master' into uis
2 parents 1be52da + 67b54fe commit f0bc083

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/Sdmx/api/client/SdmxClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getCodes($codelist, $agency, $version);
5151
* $options = array(
5252
* 'startPeriod' => 'string', //Start time of the observations to be gathered
5353
* 'endPeriod' => 'string', //End time of the observations to be gathered
54-
* 'seriesKeyOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
54+
* 'seriesKeysOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
5555
* 'lastNObservations' => 'integer' //The last 'n' observations to return for each matched series.
5656
* )
5757
* ```
@@ -70,7 +70,7 @@ public function getTimeSeries(Dataflow $dataflow, DataflowStructure $dsd, $resou
7070
* $options = array(
7171
* 'startPeriod' => 'string', //Start time of the observations to be gathered
7272
* 'startPeriod' => 'string', //End time of the observations to be gathered
73-
* 'seriesKeyOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
73+
* 'seriesKeysOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
7474
* 'lastNObservations' => 'integer' //The last 'n' observations to return for each matched series.
7575
* )
7676
* ```

src/Sdmx/api/client/rest/RestSdmxClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function getCodes($codelist, $agency, $version)
156156
* $options = array(
157157
* 'startPeriod' => 'string', //Start time of the observations to be gathered
158158
* 'endPeriod' => 'string', //End time of the observations to be gathered
159-
* 'seriesKeyOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
159+
* 'seriesKeysOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
160160
* 'lastNObservations' => 'integer' //The last 'n' observations to return for each matched series.
161161
* )
162162
* ```
@@ -167,7 +167,7 @@ public function getTimeSeries(Dataflow $dataflow, DataflowStructure $dsd, $resou
167167
$query = $this->queryBuilder->getDataQuery($dataflow, $resource, $options);
168168
$response = $this->httpClient->get($query);
169169

170-
$containsData = array_key_exists('seriesKeyOnly', $options) ? !$options['seriesKeyOnly'] : true;
170+
$containsData = array_key_exists('seriesKeysOnly', $options) ? !$options['seriesKeysOnly'] : true;
171171

172172
return $this->dataParser->parse($response, $dsd, $dataflow->getId(), $containsData);
173173
}
@@ -182,7 +182,7 @@ public function getTimeSeries(Dataflow $dataflow, DataflowStructure $dsd, $resou
182182
* $options = array(
183183
* 'startPeriod' => 'string', //Start time of the observations to be gathered
184184
* 'endPeriod' => 'string', //End time of the observations to be gathered
185-
* 'seriesKeyOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
185+
* 'seriesKeysOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
186186
* 'lastNObservations' => 'integer' //The last 'n' observations to return for each matched series.
187187
* )
188188
* ```

src/Sdmx/api/client/rest/query/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getCodelistQuery($codelist, $agency, $version);
4040
* $options = array(
4141
* 'startPeriod' => 'string', //Start time of the observations to be gathered
4242
* 'endPeriod' => 'string', //End time of the observations to be gathered
43-
* 'seriesKeyOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
43+
* 'seriesKeysOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
4444
* 'lastNObservations' => 'integer' //The last 'n' observations to return for each matched series.
4545
* )
4646
* ```

src/Sdmx/api/client/rest/query/SdmxV21QueryBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function getCodelistQuery($codelist, $agency, $version)
7171
* $options = array(
7272
* 'startPeriod' => 'string', //Start time of the observations to be gathered
7373
* 'endPeriod' => 'string', //End time of the observations to be gathered
74-
* 'seriesKeyOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
74+
* 'seriesKeysOnly' => 'boolean', //Flag for disabling data and attributes processing (usually for getting the only dataflow contents)
7575
* 'lastNObservations' => 'integer' //The last 'n' observations to return for each matched series.
7676
* )
7777
* ```
@@ -102,9 +102,9 @@ private function prepareOptions(array $options)
102102
$copy[$key] = $value;
103103
}
104104

105-
if (array_key_exists('seriesKeyOnly', $copy) && $copy['seriesKeyOnly'] === true) {
106-
unset($copy['seriesKeyOnly']);
107-
$copy['detail'] = 'serieskeyonly';
105+
if (array_key_exists('seriesKeysOnly', $copy) && $copy['seriesKeysOnly'] === true) {
106+
unset($copy['seriesKeysOnly']);
107+
$copy['detail'] = 'serieskeysonly';
108108
}
109109

110110
return $copy;

tests/Sdmx/Tests/api/client/rest/RestSdmxClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public function testGetTimeSeriesOnlyKeys()
376376
$flow->setId('EDU_REGION');
377377
$dsd = new DataflowStructure();
378378
$resource = 'a.b.c';
379-
$options = ['seriesKeyOnly' => true];
379+
$options = ['seriesKeysOnly' => true];
380380

381381
$generatedQuery = 'SomeQuery';
382382
$this->queryBuilderMock

tests/Sdmx/Tests/api/client/rest/query/SdmxV21QueryBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ public function testGetDataQueryWithParams()
8080
$df->setId('EDU_FINANCE');
8181
$df->setAgency('UNESCO');
8282
$df->setVersion('1.0');
83-
$query = $this->sdmxQueryBuilder->getDataQuery($df, 'a.b.c.d', array('startPeriod' => '2000', 'endPeriod' => '2010', 'seriesKeyOnly' => true));
83+
$query = $this->sdmxQueryBuilder->getDataQuery($df, 'a.b.c.d', array('startPeriod' => '2000', 'endPeriod' => '2010', 'seriesKeysOnly' => true));
8484

85-
$expected = self::BASE_URL . '/data/UNESCO,EDU_FINANCE,1.0/a.b.c.d?startPeriod=2000&endPeriod=2010&detail=serieskeyonly';
85+
$expected = self::BASE_URL . '/data/UNESCO,EDU_FINANCE,1.0/a.b.c.d?startPeriod=2000&endPeriod=2010&detail=serieskeysonly';
8686
$this->assertEquals($expected, $query);
8787
}
8888
}

0 commit comments

Comments
 (0)