ReviewOS

also looking at this

meemalabs/meema-client-php

Remove "data" in array response

#47
Merged glennmichael123 wants to merge remove-data-array into main
5 files +40 -34
src/Client.phpmodified+8-2
Changes to src/Client.php
@@ -46,7 +46,7 @@ class Client
4646 */
4747 public function initializeEnv()
4848 {
49 if (! file_exists(dirname(__DIR__)).'.env') {
49 if (! file_exists(__DIR__.'/../.env')) {
5050 return;
5151 }
5252
@@ -72,7 +72,13 @@ class Client
7272 ->getBody()
7373 ->getContents();
7474
75 return json_decode($content, true);
75 $body = json_decode($content, true);
76
77 if ($body && $body['data']) {
78 return $body['data'];
79 }
80
81 return $body;
7682 }
7783
7884 /**