or

```php
$verbosity = min(max($verbosity, 1), 3);
```