Skip to content

Commit e79ff5c

Browse files
committed
[PHPStan] Add rule to forbid empty() usage and replace all existing empty() calls
1 parent 980b911 commit e79ff5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Bridge/Anthropic/ModelClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function request(Model $model, array|string $payload, array $options = []
4747
$options['tool_choice'] = ['type' => 'auto'];
4848
}
4949

50-
if (isset($options['beta_features']) && \is_array($options['beta_features']) && !empty($options['beta_features'])) {
50+
if (isset($options['beta_features']) && \is_array($options['beta_features']) && \count($options['beta_features']) > 0) {
5151
$headers['anthropic-beta'] = implode(',', $options['beta_features']);
5252
unset($options['beta_features']);
5353
}

0 commit comments

Comments
 (0)