Skip to content

Commit

Permalink
Merge pull request #29 from openfoodfacts/openfoodfacts-php-25
Browse files Browse the repository at this point in the history
openfoodfacts-php-25 Improve performance of Document:class
  • Loading branch information
Dwarfex authored Nov 10, 2020
2 parents dcf9e61 + 0dd4a40 commit e48e090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Document
*/
public function __construct(array $data, string $api = null)
{
$this->recursiveSortArray($data);
$this->data = $data;
$this->api = $api;
}
Expand All @@ -54,7 +55,6 @@ public function __isset(string $name):bool
*/
public function getData(): array
{
$this->recursiveSortArray($this->data);
return $this->data;
}

Expand Down

0 comments on commit e48e090

Please sign in to comment.