Skip to content

Conversation

@gustavofreze
Copy link
Member

No description provided.

@gustavofreze gustavofreze merged commit ccf5e8b into main Jan 17, 2026
6 checks passed
@gustavofreze gustavofreze deleted the develop branch January 17, 2026 12:28
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa52e1313c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +25 to +28
foreach ($this->elements as $element) {
if ($first) {
$result = $element;
$first = false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Cast first element to string before returning

The new manual join assigns the first element directly to $result and returns it when the iterable has only one element. With declare(strict_types=1), returning a non-string (e.g., Collection::createFrom([1])->joinToString(','), [null], or an object without __toString) will throw a TypeError, whereas the previous implode() behavior always produced a string. Casting the first element to string (or using implode on a built array) would preserve the prior behavior for single-element collections.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants