# Example call:

$requestSecurity = new Operations\GetPetByIdSecurity();
$requestSecurity->apiKey = '<YOUR_API_KEY_HERE>';
$response = $sdk->pet->getPetById($requestSecurity, 504151);
```

The implicit flow is the only OAuth flow currently supported.

### Enums

Speakeasy uses native types in PHP 8 for enums.

```php
enum Status: string
{
  case Available = 'available';
  case Pending = 'pending';
  case Sold = 'sold';
}
```

### Typed parameters

Consider the following example of an array of strings in `openapi.yaml`:

```yaml
/pet/findByTags:
 get:
   operationId: findPetsByTags
   parameters:
      - name: tags
        in: query
        required: false
        explode: true
        schema:
          type: array
          items:
            type: string
```

The PHP SDK types the parameter in a DocBlock.

```php
/** Finds Pets by tags
 * @param  ?array<string>  $tags
 * @return Operations\FindPetsByTagsResponse
 * @throws \OpenAPI\OpenAPI\Models\Errors\SDKException
 */
public function findPetsByTags(?array $tags = null,):   Operations\FindPetsByTagsResponse {
```

You can use `oneOf` in an OpenAPI document like this:

```yaml
Pet:
  type: object
  properties:
    age:
      oneOf:
      - type: integer
      - type: string
```

The `age` property will be typed as a union in PHP:

```php
/**
 *
 * @param  int|string|null  $age
 */
```