Skip to content

Commit 171bae4

Browse files
authored
Dep update (#10)
1 parent c319bcd commit 171bae4

File tree

6 files changed

+17
-27
lines changed

6 files changed

+17
-27
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/tests export-ignore
33
.gitattributes export-ignore
44
.gitignore export-ignore
5-
.php_cs export-ignore
5+
.php-cs-fixer.php export-ignore
66
Makefile export-ignore
77
composer-require-checker.json export-ignore
88
phpstan.neon export-ignore

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.idea/
22
coverage/
33
vendor/
4-
.php_cs.cache
4+
.php-cs-fixer.cache
55
.phpunit.result.cache
66
composer.lock
File renamed without changes.

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
},
1616
"require-dev": {
1717
"malukenho/mcbumpface": "^1.1.5",
18-
"phpstan/phpstan": "^0.12.80",
19-
"phpstan/phpstan-phpunit": "^0.12.17",
20-
"phpunit/phpunit": "^9.5.2",
21-
"slam/php-cs-fixer-extensions": "^2.2.0",
18+
"phpstan/phpstan": "^0.12.86",
19+
"phpstan/phpstan-phpunit": "^0.12.18",
20+
"phpunit/phpunit": "^9.5.4",
21+
"slam/php-cs-fixer-extensions": "^3.0.1",
2222
"slam/php-debug-r": "^1.7.0",
2323
"slam/phpstan-extensions": "^5.1.0",
24-
"symfony/console": "^5.2.3"
24+
"symfony/console": "^5.2.7"
2525
},
2626
"extra": {
2727
"mc-bumpface": {

lib/ErrorHandler.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getTerminalWidth(): int
111111
if (null === $this->terminalWidth) {
112112
$width = \getenv('COLUMNS');
113113

114-
if (false === $width && 1 === \preg_match('{rows.(\d+);.columns.(\d+);}i', \exec('stty -a 2> /dev/null | grep columns'), $match)) {
114+
if (false === $width && 1 === \preg_match('{rows.(\d+);.columns.(\d+);}i', (string) \exec('stty -a 2> /dev/null | grep columns'), $match)) {
115115
$width = $match[2]; // @codeCoverageIgnore
116116
}
117117

@@ -344,7 +344,8 @@ public function logException(Throwable $exception): void
344344

345345
$i = 0;
346346
do {
347-
$output = \sprintf('%s%s: %s in %s:%s%s%s',
347+
$output = \sprintf(
348+
'%s%s: %s in %s:%s%s%s',
348349
($i > 0 ? '{PR ' . $i . '} ' : ''),
349350
\get_class($exception),
350351
$exception->getMessage(),
@@ -419,7 +420,8 @@ public function emailException(Throwable $exception): void
419420
}
420421
}
421422

422-
$subject = \sprintf('Error%s: %s',
423+
$subject = \sprintf(
424+
'Error%s: %s',
423425
$username ? \sprintf(' [%s]', $username) : '',
424426
$exception->getMessage()
425427
);

tests/ErrorHandlerTest.php

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,18 @@
1212

1313
final class ErrorHandlerTest extends TestCase
1414
{
15-
/**
16-
* @var string
17-
*/
18-
private $backupErrorLog;
15+
private string $backupErrorLog;
1916

20-
/**
21-
* @var string
22-
*/
23-
private $errorLog;
17+
private string $errorLog;
2418

25-
/**
26-
* @var ErrorException
27-
*/
28-
private $exception;
19+
private ErrorException $exception;
2920

3021
/**
3122
* @var array<int, array<string, string>>
3223
*/
33-
private $emailsSent = [];
24+
private array $emailsSent = [];
3425

35-
/**
36-
* @var ErrorHandler
37-
*/
38-
private $errorHandler;
26+
private ErrorHandler $errorHandler;
3927

4028
protected function setUp(): void
4129
{

0 commit comments

Comments
 (0)