Skip to content

Commit b719ccc

Browse files
authoredDec 29, 2024··
fix: static analysis (#452)
* fix: static analysis * fix: removed warnings * fix: migrated phpunit.xml.dist
1 parent 101ddf0 commit b719ccc

File tree

4 files changed

+37
-38
lines changed

4 files changed

+37
-38
lines changed
 

‎.github/workflows/phpstan.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: PHPStan
33
on:
44
workflow_dispatch:
55
push:
6-
branches-ignore:
7-
- 'dependabot/npm_and_yarn/*'
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
89

910
jobs:
1011
phpstan:

‎phpunit.xml.dist

+33-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
5-
backupGlobals="false"
6-
bootstrap="vendor/autoload.php"
7-
colors="true"
8-
processIsolation="false"
9-
stopOnFailure="false"
10-
executionOrder="random"
11-
failOnWarning="true"
12-
failOnRisky="true"
13-
failOnEmptyTestSuite="true"
14-
beStrictAboutOutputDuringTests="true"
15-
cacheDirectory=".phpunit.cache"
16-
backupStaticProperties="false"
17-
>
18-
<testsuites>
19-
<testsuite name="Native Test Suite">
20-
<directory>tests</directory>
21-
</testsuite>
22-
</testsuites>
23-
<coverage>
24-
<include>
25-
<directory suffix=".php">./src</directory>
26-
</include>
27-
<report>
28-
<html outputDirectory="build/coverage"/>
29-
<text outputFile="build/coverage.txt"/>
30-
<clover outputFile="build/logs/clover.xml"/>
31-
</report>
32-
</coverage>
33-
<logging>
34-
<junit outputFile="build/report.junit.xml"/>
35-
</logging>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
3+
backupGlobals="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
processIsolation="false"
7+
stopOnFailure="false"
8+
executionOrder="random"
9+
failOnWarning="true"
10+
failOnRisky="true"
11+
failOnEmptyTestSuite="true"
12+
beStrictAboutOutputDuringTests="true"
13+
cacheDirectory=".phpunit.cache"
14+
backupStaticProperties="false">
15+
<testsuites>
16+
<testsuite name="Native Test Suite">
17+
<directory>tests</directory>
18+
</testsuite>
19+
</testsuites>
20+
<coverage>
21+
<report>
22+
<html outputDirectory="build/coverage"/>
23+
<text outputFile="build/coverage.txt"/>
24+
<clover outputFile="build/logs/clover.xml"/>
25+
</report>
26+
</coverage>
27+
<logging>
28+
<junit outputFile="build/report.junit.xml"/>
29+
</logging>
30+
<source>
31+
<include>
32+
<directory suffix=".php">./src</directory>
33+
</include>
34+
</source>
3635
</phpunit>

‎src/Fakes/PowerMonitorFake.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function assertGetSystemIdleState(int|Closure $key): void
6464
$hit = empty(
6565
array_filter(
6666
$this->getSystemIdleStateCalls,
67-
fn (string $keyIteration) => $key($keyIteration) === true
67+
fn (int $keyIteration) => $key($keyIteration) === true
6868
)
6969
) === false;
7070

‎tests/ChildProcess/ChildProcessTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use Illuminate\Http\Client\Request;
44
use Illuminate\Support\Facades\Http;
5-
use Mockery;
65
use Native\Laravel\ChildProcess as ChildProcessImplement;
76
use Native\Laravel\Client\Client;
87
use Native\Laravel\Facades\ChildProcess;

0 commit comments

Comments
 (0)
Please sign in to comment.