Skip to content

Commit af68245

Browse files
committed
Merge branch 'development'
2 parents 56ab135 + 430b72f commit af68245

File tree

10 files changed

+35
-32
lines changed

10 files changed

+35
-32
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11-
[*.{md, rst}]
11+
[*.{md,rst}]
1212
trim_trailing_whitespace = false
1313

1414
[*.yml]

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
vendor/bin/phpstan analyse -vvv
5151

5252
- name: PHPUnit
53-
run: vendor/bin/phpunit --verbose
53+
run: vendor/bin/phpunit
5454

5555
- name: Upload coverage results to Coveralls
5656
env:
@@ -68,7 +68,7 @@ jobs:
6868
strategy:
6969
fail-fast: true
7070

71-
name: PHP 8.2 - Last
71+
name: PHP Latest
7272

7373
steps:
7474
- name: Checkout
@@ -77,7 +77,7 @@ jobs:
7777
- name: Setup PHP
7878
uses: shivammathur/setup-php@v2
7979
with:
80-
php-version: 8.2
80+
php-version: latest
8181
tools: composer
8282
coverage: xdebug
8383

@@ -88,4 +88,4 @@ jobs:
8888
composer update
8989

9090
- name: PHPUnit
91-
run: vendor/bin/phpunit --verbose
91+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build/
44
raw-tests/
55
vendor/
66
.php-cs-fixer.cache
7+
.phpunit.cache
78
.phpunit.result.cache
89
composer.lock
910
composer.phar

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ test:php:
3030
- build/docs/
3131
coverage: '/^\s*Lines:\s*\d+.\d+\%/'
3232

33-
test:php-last:
34-
image: registry.gitlab.com/aplus-framework/images/base:3
33+
test:php-latest:
34+
image: registry.gitlab.com/aplus-framework/images/base:latest
3535
stage: test
3636
timeout: 10 minutes
3737
cache:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
},
4040
"require-dev": {
4141
"ext-xdebug": "*",
42-
"aplus/coding-standard": "^1.14",
42+
"aplus/coding-standard": "^2.1",
4343
"ergebnis/composer-normalize": "^2.25",
4444
"jetbrains/phpstorm-attributes": "^1.0",
4545
"phpmd/phpmd": "^2.13",
4646
"phpstan/phpstan": "^1.7",
47-
"phpunit/phpunit": "^9.5"
47+
"phpunit/phpunit": "^10.5"
4848
},
4949
"minimum-stability": "dev",
5050
"prefer-stable": true,

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ services:
77
volumes:
88
- .:/package
99
tty: true
10-
package-last:
11-
image: registry.gitlab.com/aplus-framework/images/package:3
12-
container_name: package-cli-last
10+
package-latest:
11+
image: registry.gitlab.com/aplus-framework/images/package:latest
12+
container_name: package-cli-latest
1313
working_dir: /package
1414
volumes:
1515
- .:/package

phpunit.xml.dist

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false"
3-
bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true"
4-
convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false"
5-
stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
7-
<coverage processUncoveredFiles="true">
8-
<include>
9-
<directory suffix=".php">src</directory>
10-
</include>
3+
bootstrap="vendor/autoload.php" colors="true" stopOnError="false" stopOnFailure="false"
4+
stopOnIncomplete="false" stopOnSkipped="false"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
6+
cacheDirectory=".phpunit.cache">
7+
<coverage>
118
<report>
129
<clover outputFile="build/coverage/clover.xml"/>
1310
<html outputDirectory="build/coverage"/>
@@ -21,4 +18,9 @@
2118
<php>
2219
<const name="TESTING" value="true"/>
2320
</php>
21+
<source>
22+
<include>
23+
<directory suffix=".php">src</directory>
24+
</include>
25+
</source>
2426
</phpunit>

src/CLI.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public static function getWidth(int $default = 80) : int
371371
return $default;
372372
}
373373
$width = (int) \shell_exec('tput cols');
374-
if ( ! $width) {
374+
if (!$width) {
375375
return $default;
376376
}
377377
return $width;
@@ -509,7 +509,7 @@ public static function liveLine(string $text, bool $finalize = false) : void
509509
{
510510
// See: https://stackoverflow.com/a/35190285
511511
$string = '';
512-
if ( ! static::isWindows()) {
512+
if (!static::isWindows()) {
513513
$string .= "\33[2K";
514514
}
515515
$string .= "\r";
@@ -548,7 +548,7 @@ public static function box(
548548
) : void {
549549
$width = static::getWidth();
550550
$width -= 2;
551-
if ( ! \is_array($lines)) {
551+
if (!\is_array($lines)) {
552552
$lines = [
553553
$lines,
554554
];
@@ -688,7 +688,7 @@ public static function table(array $tbody, array $thead = []) : void
688688
// All the rows in the table will be here until the end
689689
$tableRows = [];
690690
// We need only indexes and not keys
691-
if ( ! empty($thead)) {
691+
if (!empty($thead)) {
692692
$tableRows[] = \array_values($thead);
693693
}
694694
foreach ($tbody as $tr) {
@@ -712,7 +712,7 @@ public static function table(array $tbody, array $thead = []) : void
712712
// If the current column does not have a value among the larger ones
713713
// or the value of this is greater than the existing one
714714
// then, now, this assumes the maximum length
715-
if ( ! isset($maxColsLengths[$column])
715+
if (!isset($maxColsLengths[$column])
716716
|| $allColsLengths[$row][$column] > $maxColsLengths[$column]) {
717717
$maxColsLengths[$column] = $allColsLengths[$row][$column];
718718
}
@@ -746,7 +746,7 @@ public static function table(array $tbody, array $thead = []) : void
746746
// Set the vertical borders
747747
$table .= '| ' . \implode(' | ', $value) . ' |' . \PHP_EOL;
748748
// Set the thead and table borders-bottom
749-
if (($row === 0 && ! empty($thead)) || $row + 1 === $totalRows) {
749+
if (($row === 0 && !empty($thead)) || $row + 1 === $totalRows) {
750750
$table .= $line . \PHP_EOL;
751751
}
752752
}

src/Commands/Index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ protected function getUser() : string
116116
return $this->console->getLanguage()->render('cli', 'friend');
117117
}
118118
$info = \posix_getpwnam($username);
119-
if ( ! $info) {
119+
if (!$info) {
120120
return $username;
121121
}
122122
$gecos = $info['gecos'] ?? '';
123-
if ( ! $gecos) {
123+
if (!$gecos) {
124124
return $username;
125125
}
126126
$length = \strpos($gecos, ',') ?: \strlen($gecos);

src/Console.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function getCommands() : array
197197
{
198198
$commands = $this->commands;
199199
foreach ($commands as $name => $command) {
200-
if ( ! $command->isActive()) {
200+
if (!$command->isActive()) {
201201
unset($commands[$name]);
202202
}
203203
}
@@ -349,7 +349,7 @@ public static function commandToArgs(string $command) : array
349349
$inSQuote = false;
350350
for ($i = 0; $i < $charCount; $i++) {
351351
$char = $command[$i];
352-
if ($char === ' ' && ! $inDQuote && ! $inSQuote) {
352+
if ($char === ' ' && !$inDQuote && !$inSQuote) {
353353
if ($arg !== '') {
354354
$argv[] = $arg;
355355
}
@@ -364,11 +364,11 @@ public static function commandToArgs(string $command) : array
364364
$inDQuote = false;
365365
continue;
366366
}
367-
if ($char === '"' && ! $inSQuote) {
367+
if ($char === '"' && !$inSQuote) {
368368
$inDQuote = true;
369369
continue;
370370
}
371-
if ($char === "'" && ! $inDQuote) {
371+
if ($char === "'" && !$inDQuote) {
372372
$inSQuote = true;
373373
continue;
374374
}

0 commit comments

Comments
 (0)