<?php
namespace API\InfoLegale\Traits;

trait LegalInformation
{
    public function search(string $search, int $row = 10, int $start = 0, string $tri = '', string $facet = '', string $refine = '', string $exclude = '') :void
    {
        /** @phpstan-ignore-next-line */
        $response = $this->client->post($this->urlApi.'nafs', [
           
                'headers' => [
                    'Authorization' => 'Bearer '. $this->token
                ],

            ]);

        /** @phpstan-ignore-next-line */
        $this->code = $response->getStatusCode();
        /** @phpstan-ignore-next-line */
        $this->header = $response->getHeaderLine('content-type');
        
        $data =  json_decode($response->getBody()->getContents(), true);
    }
}
