Skip to content

Commit b29a0de

Browse files
committed
Disable noEnvCallsOutsideOfConfig rule
This rule doesn't really apply to a package
1 parent 49b23c6 commit b29a0de

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

phpstan.neon.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ parameters:
1010
tmpDir: build/phpstan
1111
checkOctaneCompatibility: true
1212
checkModelProperties: true
13+
ignoreErrors:
14+
- identifier: larastan.noEnvCallsOutsideOfConfig

src/Http/Client.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ class Client
2626

2727
private array $config;
2828

29-
private int $retryCount = 0;
30-
3129
public function __construct(array $config = [])
3230
{
3331
$this->config = array_merge([
@@ -61,7 +59,7 @@ private function createClient(): GuzzleClient
6159
));
6260

6361
return new GuzzleClient([
64-
'base_uri' => rtrim($this->config['base_url'], '/').'/',
62+
'base_uri' => rtrim($this->config['base_url'], '/') . '/',
6563
'timeout' => $this->config['timeout'],
6664
'connect_timeout' => $this->config['connect_timeout'],
6765
'verify' => $this->config['verify_ssl'],
@@ -278,7 +276,7 @@ private function parseEventStreamLine(string $line): ?array
278276
{
279277
$line = trim($line);
280278

281-
if (empty($line) || $line === '') {
279+
if (empty($line)) {
282280
return null;
283281
}
284282

@@ -325,7 +323,7 @@ private function parseResponse(ResponseInterface $response): array
325323

326324
if (json_last_error() !== JSON_ERROR_NONE) {
327325
throw new LangGraphException(
328-
'Failed to decode JSON response: '.json_last_error_msg(),
326+
'Failed to decode JSON response: ' . json_last_error_msg(),
329327
$response->getStatusCode(),
330328
null,
331329
$response

0 commit comments

Comments
 (0)