Skip to content

Commit e7ae6a6

Browse files
committed
Make Psalm happy
1 parent 095260f commit e7ae6a6

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Composer-Distributor
22

3+
![Build](https://github.com/phar-io/composer-distributor/workflows/Build/badge.svg)
4+
35
The base-code to create a ComposerPlugin that installs PHAR files
46
instead of the whole source code of a project.
57

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@
5252
<!-- <RawObjectIteration errorLevel="info" />-->
5353

5454
<!-- <InvalidStringClass errorLevel="info" />-->
55+
<RedundantCast errorLevel="info"/>
5556
</issueHandlers>
5657
</psalm>

src/Config/InvalidXML.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class InvalidXML extends RuntimeException
1111
/**
1212
* @param \LibXMLError[] $errors
1313
*/
14-
public static function fromXMLErrors(array $errors): InvalidXml
14+
public static function fromXMLErrors(array $errors): self
1515
{
1616
$message = 'Error loading config file' . PHP_EOL;
1717

src/Config/Mapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function createConfig(DOMDocument $docDocument): Config
2626
);
2727
}
2828

29-
private function validateConfigurationAgainstSchema()
29+
private function validateConfigurationAgainstSchema(): void
3030
{
3131
$original = \libxml_use_internal_errors(true);
3232
$xsdFilename = __DIR__ . '/../../distributor.xsd';

src/PluginBase.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,33 @@ abstract class PluginBase implements PluginInterface, EventSubscriberInterface
1919

2020
protected $io;
2121

22+
/**
23+
* @param Composer $composer
24+
* @param IOInterface $io
25+
* @return void
26+
*/
2227
public function activate(Composer $composer, IOInterface $io)
2328
{
2429
$this->composer = $composer;
2530
$this->io = $io;
2631
}
2732

33+
/**
34+
* @param Composer $composer
35+
* @param IOInterface $io
36+
* @return void
37+
*/
2838
public function deactivate(Composer $composer, IOInterface $io)
2939
{
3040
$this->composer = $composer;
3141
$this->io = $io;
3242
}
3343

44+
/**
45+
* @param Composer $composer
46+
* @param IOInterface $io
47+
* @return void
48+
*/
3449
public function uninstall(Composer $composer, IOInterface $io)
3550
{
3651
$this->composer = $composer;

0 commit comments

Comments
 (0)