The whole hunk
from line 780, old and new numbered
/
lines
from line 780
780780
781781 // Parse the JSON response from Claude. The SDK decodes each content block
782782 // into its concrete class, so find the TextBlock before reading the text.
783 $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock)
783 $textBlock = array_find($response->content, fn ($block) => $block instanceof \Anthropic\Messages\TextBlock)
784784 ?? throw new RuntimeException('Expected a text block in the response.');
785785 $assessment = json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR);
786786
from line 1333
13331333
13341334 // Parse the JSON response from Claude. The SDK decodes each content block
13351335 // into its concrete class, so find the TextBlock before reading the text.
1336 $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock)
1336 $textBlock = array_find($response->content, fn ($block) => $block instanceof \Anthropic\Messages\TextBlock)
13371337 ?? throw new RuntimeException('Expected a text block in the response.');
13381338 $assessment = json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR);
13391339
from line 2073
20732073
20742074 // Parse the JSON response from Claude. The SDK decodes each content block
20752075 // into its concrete class, so find the TextBlock before reading the text.
2076 $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock)
2076 $textBlock = array_find($response->content, fn ($block) => $block instanceof \Anthropic\Messages\TextBlock)
20772077 ?? throw new RuntimeException('Expected a text block in the response.');
20782078 $assessment = json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR);
20792079
from line 2648
26482648
26492649 // Parse the JSON response from Claude. The SDK decodes each content block
26502650 // into its concrete class, so find the TextBlock before reading the text.
2651 $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock)
2651 $textBlock = array_find($response->content, fn ($block) => $block instanceof \Anthropic\Messages\TextBlock)
26522652 ?? throw new RuntimeException('Expected a text block in the response.');
26532653
26542654 return json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR);