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

Fix problems reported by PHPStan #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

szepeviktor
Copy link

@szepeviktor szepeviktor commented Dec 26, 2022

Please see comments 👇🏻

@@ -2,7 +2,7 @@

namespace Gosuperscript\ZeroDowntimeEventReplays\Exceptions;

class CreateReplayException extends \Exception
final class CreateReplayException extends \Exception
Copy link
Author

Choose a reason for hiding this comment

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

Protect static in line number 9.

})->each(function ($defaultValue) use ($model, $ghostConnectionTable, &$statements) {
})->each(function ($defaultValue) use ($ghostConnectionTable, &$statements) {
Copy link
Author

Choose a reason for hiding this comment

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

$model is not used.

@@ -62,17 +62,17 @@ public function removeConnection(): void
return $model->getConnectionName();
})->each(function ($models, $connection) {
$tables = [];
$statements = [];
Copy link
Author

Choose a reason for hiding this comment

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

Is it en error or $statements array should be emptied in each iteration?

return parent::register(); // TODO: Change the autogenerated stub
parent::register(); // TODO: Change the autogenerated stub
Copy link
Author

Choose a reason for hiding this comment

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

register() should not return anything.

There is an error in ./vendor/spatie/laravel-package-tools/src/PackageServiceProvider.php too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant