Skip to content

Commit 83a969c

Browse files
committed
fix(collectors): Fix typo in ExceptionBasicCollector.php
- Fix typo in ExceptionBasicCollector.php where getMessage() and getFile() were not capitalized
1 parent 6abcf6c commit 83a969c

File tree

6 files changed

+17
-10
lines changed

6 files changed

+17
-10
lines changed

src/Collectors/ApplicationCollector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class ApplicationCollector extends Collector
1818
{
19-
/** @var \Illuminate\Foundation\Application|\Laravel\Lumen\Application */
19+
/**
20+
* @var \Illuminate\Foundation\Application|\Laravel\Lumen\Application
21+
*/
2022
protected Container $container;
2123

2224
public function __construct(Container $container)

src/Collectors/ExceptionBasicCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public function collect(): array
2323
{
2424
return [
2525
'class' => \get_class($this->exception),
26-
'message' => $this->exception->getmessage(),
26+
'message' => $this->exception->getMessage(),
2727
'code' => $this->exception->getCode(),
28-
'file' => $this->exception->getfile(),
28+
'file' => $this->exception->getFile(),
2929
'line' => $this->exception->getLine(),
3030
];
3131
}

src/Collectors/RequestHeaderCollector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public function __construct(Request $request)
2323
$this->request = $request;
2424
}
2525

26+
/**
27+
* @noinspection PhpUndefinedMethodInspection
28+
*/
2629
public function collect(): array
2730
{
2831
return $this->request->headers();

src/ExceptionNotifyManager.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ public function getDefaultDriver()
110110

111111
/**
112112
* @throws BindingResolutionException
113-
*
114-
* @noinspection MultipleReturnStatementsInspection
115113
*/
116114
protected function shouldntReport(\Throwable $throwable): bool
117115
{

src/Macros/CollectionMacro.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class CollectionMacro
1919
{
2020
public function reduceWithKeys(): callable
2121
{
22-
return fn (callable $callback, $carry = null) => array_reduce_with_keys($this->items, $callback, $carry);
22+
return fn (callable $callback, $carry = null) => array_reduce_with_keys(
23+
$this->items,
24+
$callback,
25+
$carry
26+
);
2327
}
2428
}

src/Support/JsonFixer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ private function padObject(string $tmpJson): string
319319
$tmpJson .= '"';
320320
}
321321

322-
$tmpJson = $this->padIf($tmpJson, ':');
322+
$tmpJson = $this->padIf($tmpJson);
323323
$tmpJson .= $this->missingValue;
324324

325325
if ('"' === $this->lastToken()) {
@@ -351,10 +351,10 @@ private function padString(string $string): ?string
351351
// @codeCoverageIgnoreEnd
352352
}
353353

354-
private function padIf(string $string, string $substr): string
354+
private function padIf(string $string): string
355355
{
356-
if (substr($string, -\strlen($substr)) !== $substr) {
357-
return $string.$substr;
356+
if (':' !== substr($string, -\strlen(':'))) {
357+
return $string.':';
358358
}
359359

360360
return $string;

0 commit comments

Comments
 (0)