Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8a3a64

Browse files
committed
Fix PHPStan warnings.
1 parentb4d4413 commitd8a3a64

File tree

6 files changed

+38
-2
lines changed

6 files changed

+38
-2
lines changed

‎src/Exporter/Dependencies.php‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
class Dependenciesextends Exporter
1111
{
12+
/**
13+
* {@inheritdoc}
14+
*/
1215
publicfunctionexportToArray():array
1316
{
1417
$data =$this->getEvent()->getComposer()->getLocker()->getLockData();
@@ -34,6 +37,10 @@ public function exportToArray(): array
3437
returncompact('packageDeps','regex');
3538
}
3639

40+
/**
41+
* @param array<string> $carry
42+
* @param \Composer\Package\PackageInterface $package
43+
*/
3744
protectedfunctiongetDependenciesOf(array &$carry,PackageInterface$package):void
3845
{
3946
foreach (array_keys($package->getRequires())as$key) {
@@ -49,6 +56,11 @@ protected function getDependenciesOf(array &$carry, PackageInterface $package):
4956
}
5057
}
5158

59+
/**
60+
* @param array<string, array> $packages
61+
*
62+
* @return array<string, array<int, string>>
63+
*/
5264
privatefunctionbuildRegex(array$packages):array
5365
{
5466
$groups = [];

‎src/Exporter/Directories.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
class Directoriesextends Exporter
1010
{
11+
/**
12+
* {@inheritdoc}
13+
*/
1114
publicfunctionexportToArray():array
1215
{
1316
$data =$this->getEvent()->getComposer()->getLocker()->getLockData();
@@ -34,6 +37,11 @@ public function exportToArray(): array
3437
returncompact('directories','regex');
3538
}
3639

40+
/**
41+
* @param array<string, string> $packages
42+
*
43+
* @return array<string, array<int, string>>
44+
*/
3745
privatefunctionbuildRegex(array$packages):array
3846
{
3947
$groups = [];

‎src/Exporter/ExporterInterface.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface ExporterInterface
1212
/**
1313
* Export the data into an array.
1414
*
15-
* @return array
15+
* @return array<string>
1616
*/
1717
publicfunctionexportToArray():array;
1818

‎src/Exporter/Packages.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
class Packagesextends Exporter
88
{
9+
/**
10+
* {@inheritdoc}
11+
*/
912
publicfunctionexportToArray():array
1013
{
1114
$data =$this->getEvent()->getComposer()->getLocker()->getLockData();
@@ -33,6 +36,11 @@ static function (array $data) {
3336
return [];
3437
}
3538

39+
/**
40+
* @param array<string, array> $packages
41+
*
42+
* @return array<string, array<int, string>>
43+
*/
3644
privatefunctionbuildRegex(array$packages):array
3745
{
3846
$groups = [];

‎src/Exporter/Versions.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
class Versionsextends Exporter
88
{
9+
/**
10+
* {@inheritdoc}
11+
*/
912
publicfunctionexportToArray():array
1013
{
1114
$data =$this->getEvent()->getComposer()->getLocker()->getLockData();
@@ -40,6 +43,11 @@ static function (array $data) {
4043
return [];
4144
}
4245

46+
/**
47+
* @param array<string, string> $versions
48+
*
49+
* @return array<string, array<int, string>>
50+
*/
4351
privatefunctionbuildRegex(array$versions):array
4452
{
4553
$groups = [];

‎src/Plugin.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function activate(Composer $composer, IOInterface $io): void
2525
}
2626

2727
/**
28-
*{@inheritdoc}
28+
*@return array<string, string>
2929
*/
3030
publicstaticfunctiongetSubscribedEvents():array
3131
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp