something like this?

```php
if (count($values) === 1) {
    $data[] = array_shift($values);
} else {
    throw new RuntimeException();
}
```