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

Fixed issues reported by phpstan #53

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Fixed issues reported by phpstan #53

merged 2 commits into from
Oct 3, 2023

Conversation

adamwojs
Copy link
Member

@adamwojs adamwojs commented Oct 2, 2023

Question Answer
JIRA issue -
Type bug
Target Ibexa version v4.5+
BC breaks no

Fixed issues reported by phpstan in https://github.com/ibexa/solr/actions/runs/6377398486/job/17305988985?pr=51

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (main for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping for example @ibexa/php-dev for back-end changes and/or @ibexa/javascript-dev for front-end changes).

Comment on lines 52 to 54
if ($this->container === null) {
return new BoostFactorProvider();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not having a container set at this point indicates an error. LogicException should be preferred in my opinion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 4de3f25

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
13.3% 13.3% Duplication

@Steveb-p Steveb-p merged commit c40d411 into 4.5 Oct 3, 2023
@Steveb-p Steveb-p deleted the fixed_phpstan_issues branch October 3, 2023 07:38
@Steveb-p
Copy link
Contributor

Steveb-p commented Oct 3, 2023

Merged.

Also merged into main in 3344bea.

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.

4 participants