Skip to content

Course: Filter courses by access URL if multiple URLs enabled #5694

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

Merged

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jul 27, 2024

Codecov Report

Attention: Patch coverage is 5.26316% with 18 lines in your changes missing coverage. Please review.

Project coverage is 38.53%. Comparing base (6e368ec) to head (ea18bb5).

Files Patch % Lines
.../DataProvider/Extension/CourseRelUserExtension.php 5.26% 18 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5694      +/-   ##
============================================
- Coverage     38.54%   38.53%   -0.02%     
- Complexity    11182    11185       +3     
============================================
  Files           886      886              
  Lines         46177    46195      +18     
============================================
+ Hits          17799    17800       +1     
- Misses        28378    28395      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryItemExtensionInterface;

final class CourseRelUserExtension implements QueryCollectionExtensionInterface // , QueryItemExtensionInterface
final class CourseRelUserExtension implements QueryCollectionExtensionInterface

Choose a reason for hiding this comment

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

Missing class doc comment

{
public function __construct(
private readonly Security $security
private readonly Security $security,

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

{
public function __construct(
private readonly Security $security
private readonly Security $security,
private readonly AccessUrlHelper $accessUrlHelper

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

)
->andWhere('url_rel.url = :access_url_id')
->setParameter('access_url_id', $accessUrl->getId());
} else {

Choose a reason for hiding this comment

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

The method applyToCollection uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.

Copy link

Code Climate has analyzed commit ea18bb5 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 3
Clarity 2

View more on Code Climate.

@christianbeeznest christianbeeznest merged commit 84c71eb into chamilo:master Aug 2, 2024
4 of 9 checks passed
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