-
Notifications
You must be signed in to change notification settings - Fork 3
Fix major errors found by PHPStan #39
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
Conversation
| IO::spin('deploying'); | ||
| $config['region'] = $region; | ||
| $deployment = $brefCloud->createDeployment($environment, $config, $gitRef, $gitMessage, $awsAccountName, $region); | ||
| $deployment = $brefCloud->createDeployment($environment, $config, $gitRef, $gitMessage, $awsAccountName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createDeployment has no region parameter
|
|
||
| IO::verbose('Git ref: ' . $gitRef); | ||
| $gitMessageLog = explode("\n", $gitMessage)[0] ?? ''; | ||
| $gitMessageLog = explode("\n", $gitMessage)[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gitMessage comes from the previous explode(), so it is always a string
| $stackResults = preg_match('/stack: (.*)\n/', $infoOutput, $matches); | ||
| $regionResults = preg_match('/region: (.*)\n/', $infoOutput, $matches); | ||
| $stackResults = preg_match('/stack: (.*)\n/', $infoOutput, $stackMatches); | ||
| $regionResults = preg_match('/region: (.*)\n/', $infoOutput, $regionMatches); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there were 3 $matches!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I think this happened after a refactor the code makes no sense indeed
|
Thanks! |
|
btw I'm not sure if you're using Bref or not, but always interested to talk, I might have sometimes needs for someone to jump in and help a few hours of work here and there. You can find me on slack (https://bref.sh/slack) if you want to chat more about it |
|
Glad to contribute. |
@mnapoli Please run PHPStan. Keeps your project running :)