Skip to content

Commit 059ad37

Browse files
committed
chore: merge upstream changes
2 parents 6ef78da + 0caf83b commit 059ad37

File tree

6 files changed

+39
-5
lines changed

6 files changed

+39
-5
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ test export-ignore
33
.gitattributes export-ignore
44
phpunit.xml* export-ignore
55
phpcs.xml export-ignore
6+
.github export-ignore

.github/workflows/tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests
2+
on:
3+
pull_request:
4+
branches:
5+
- '**.x'
6+
push:
7+
branches:
8+
- '**.x'
9+
jobs:
10+
testing:
11+
name: PHP ${{ matrix.php }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
php: [7.2, 7.3, 7.4]
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP with composer
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
tools: composer
25+
26+
- name: Install dependencies
27+
run: composer install
28+
29+
- name: Lint syntax / code convention
30+
run: composer lint
31+
32+
- name: Run unit tests
33+
run: composer test

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"test": "vendor/bin/phpunit",
3232
"test-coverage-clover": "vendor/bin/phpunit --coverage-clover=coverage.clover.xml",
3333
"test-coverage-html": "vendor/bin/phpunit --coverage-html=test/coverage",
34-
"lint": "vendor/bin/phpcs --standard=phpcs.xml src/*"
34+
"lint": "vendor/bin/phpcs -v --standard=phpcs.xml src/*"
3535
},
3636
"scripts-descriptions": {
3737
"test": "Runs the phpunit testsuite",

src/TestCase/SetupTargetTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private function setupTarget(): void
129129
$nameParts = explode(' ', $this->getName());
130130
$name = reset($nameParts);
131131
$set = end($nameParts);
132-
$set = '#' == $set{0} || '"' == $set{0} ? trim($set, '"') : '';
132+
$set = '#' == $set[0] || '"' == $set[0] ? trim($set, '"') : '';
133133

134134
foreach ($specs as $spec) {
135135
$for = isset($spec['for']) ? (array) $spec['for'] : ['*'];

src/Utils/Instance.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function create($fqcn, ...$arguments): object
7575
);
7676
}
7777

78-
if ('!' == $fqcn{0}) {
78+
if ('!' == $fqcn[0]) {
7979
return self::reflection(substr($fqcn, 1));
8080
}
8181

@@ -143,7 +143,7 @@ public static function withMappedArguments($fqcn, $arguments, ?object $context =
143143
break;
144144

145145
// '@function'
146-
case is_string($value) && '@' == $value{0}:
146+
case is_string($value) && '@' == $value[0]:
147147
$callback = ltrim($value, '@');
148148
break;
149149

src/Utils/Target.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static function get(
6969
return $target;
7070
}
7171

72-
if (!$forceObject && is_string($target) && '!' != $target{0}) {
72+
if (!$forceObject && is_string($target) && '!' != $target[0]) {
7373
return $target;
7474
}
7575

0 commit comments

Comments
 (0)