Skip to content

Commit c861fcb

Browse files
committed
Fix indentation
1 parent 45b183d commit c861fcb

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/Monolog/Handler/ElasticsearchHandler.php

+31-31
Original file line numberDiff line numberDiff line change
@@ -155,35 +155,35 @@ protected function bulkSend(array $records): void
155155
throw new RuntimeException('Error sending messages to Elasticsearch', 0, $e);
156156
}
157157
}
158-
}
159-
160-
/**
161-
* Creates elasticsearch exception from responses array
162-
*
163-
* Only the first error is converted into an exception.
164-
*
165-
* @param array $responses returned by $this->client->bulk()
166-
*/
167-
protected function createExceptionFromResponses(array $responses): ElasticsearchRuntimeException
168-
{
169-
foreach ($responses['items'] ?? [] as $item) {
170-
if (isset($item['index']['error'])) {
171-
return $this->createExceptionFromError($item['index']['error']);
172-
}
173-
}
174-
175-
return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.');
176-
}
177-
178-
/**
179-
* Creates elasticsearch exception from error array
180-
*
181-
* @param array $error
182-
*/
183-
protected function createExceptionFromError(array $error): ElasticsearchRuntimeException
184-
{
185-
$previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null;
186-
187-
return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous);
188-
}
158+
}
159+
160+
/**
161+
* Creates elasticsearch exception from responses array
162+
*
163+
* Only the first error is converted into an exception.
164+
*
165+
* @param array $responses returned by $this->client->bulk()
166+
*/
167+
protected function createExceptionFromResponses(array $responses): ElasticsearchRuntimeException
168+
{
169+
foreach ($responses['items'] ?? [] as $item) {
170+
if (isset($item['index']['error'])) {
171+
return $this->createExceptionFromError($item['index']['error']);
172+
}
173+
}
174+
175+
return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.');
176+
}
177+
178+
/**
179+
* Creates elasticsearch exception from error array
180+
*
181+
* @param array $error
182+
*/
183+
protected function createExceptionFromError(array $error): ElasticsearchRuntimeException
184+
{
185+
$previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null;
186+
187+
return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous);
188+
}
189189
}

0 commit comments

Comments
 (0)