code: public function decode(string $json): array
      {
          $data = guzzle_json_decode($json, true);
  
          $spaceId = $this->extractSpaceId($data);
          $environmentId = $this->extractEnvironmentId($data);
  
          if ($spaceId !== $this->spaceId || $environmentId !== $this->environmentId) {
              throw new \InvalidArgumentException(\sprintf(
                  'Trying to parse and build a JSON structure with a client configured for handling space "%s" and environment "%s", but space "%s" and environment "%s" were detected.',
                  $this->spaceId,
                  $this->environmentId,
                  $spaceId,
                  $environmentId
              ));
          }
  
          return $data;
      }
docs: @param string $json
  
  @return array