Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock file maintenance, minor improvements to static analysis #107

Merged
merged 5 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bin/laminas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use Laminas\Cli\ContainerResolver;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

/** @psalm-suppress MissingFile */
if (file_exists($a = __DIR__ . '/../../../autoload.php')) {
require $a;
} elseif (file_exists($a = __DIR__ . '/../vendor/autoload.php')) {
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
"laminas/laminas-mvc": "^3.5.0",
"laminas/laminas-servicemanager": "^3.19",
"laminas/laminas-mvc": "^3.6",
"laminas/laminas-servicemanager": "^3.20",
"mikey179/vfsstream": "2.0.x-dev",
"phpunit/phpunit": "^9.5.25",
"psalm/plugin-phpunit": "^0.18.0",
"vimeo/psalm": "^5.0"
"phpunit/phpunit": "^9.5.28",
"psalm/plugin-phpunit": "^0.18.4",
"vimeo/psalm": "^5.6"
},
"autoload": {
"psr-4": {
Expand Down
89 changes: 44 additions & 45 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedPsalmSuppress="true"
findUnusedCode="false"
findUnusedBaselineEntry="true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooooooooh :O

errorLevel="1"
errorBaseline="psalm-baseline.xml"
>
Expand Down
6 changes: 4 additions & 2 deletions src/Input/AbstractInputParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,15 @@ public function isRequired(): bool

/**
* @param mixed $defaultValue
* @psalm-suppress LessSpecificImplementedReturnType
* @return $this
*/
public function setDefault($defaultValue): InputParamInterface
{
$this->default = $defaultValue;
return $this;
}

/** @return $this */
public function setDescription(string $description): InputParamInterface
{
$this->description = $description;
Expand All @@ -116,7 +117,7 @@ public function setDescription(string $description): InputParamInterface

/**
* @param null|string|string[] $shortcut
* @psalm-suppress LessSpecificImplementedReturnType
* @return $this
*/
public function setShortcut($shortcut): InputParamInterface
{
Expand All @@ -125,6 +126,7 @@ public function setShortcut($shortcut): InputParamInterface
return $this;
}

/** @return $this */
public function setRequiredFlag(bool $required): InputParamInterface
{
$this->required = $required;
Expand Down
2 changes: 2 additions & 0 deletions src/Input/IntParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ static function (mixed $value) use ($min, $max): int {
return $question;
}

/** @return $this */
public function setMin(?int $min): self
{
$this->min = $min;
return $this;
}

/** @return $this */
public function setMax(?int $max): self
{
$this->max = $max;
Expand Down