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

Update app code #218

Merged
merged 6 commits into from Feb 20, 2024
Merged

Conversation

kenjis
Copy link
Contributor

@kenjis kenjis commented Oct 29, 2023

Needs #221

  • use return instead of echo
  • replace $heroes with $dungeons
  • add codeigniter/phpstan-codeigniter

@coveralls
Copy link

coveralls commented Oct 29, 2023

Pull Request Test Coverage Report for Build 7923616178

Details

  • -4 of 4 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 88.727%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/Controllers/HeroController.php 0 1 0.0%
app/Controllers/DungeonController.php 0 3 0.0%
Totals Coverage Status
Change from base Build 7923612731: 0.0%
Covered Lines: 244
Relevant Lines: 275

💛 - Coveralls

@kenjis
Copy link
Contributor Author

kenjis commented Oct 29, 2023

@paulbalandan Do you know why this error is reported?

 ------ -------------------------------------------------------------------- 
  Line   tests/database/FakerTest.php                                        
 ------ -------------------------------------------------------------------- 
  49     Call to method PHPUnit\Framework\Assert::assertInstanceOf() with    
         'App\\Entities\\Dungeon' and array<int, App\Entities\Dungeon> will  
         always evaluate to false.                                           
         💡 Because the type is coming from a PHPDoc, you can turn off this   
            check by setting treatPhpDocTypesAsCertain: false in your        
            phpstan.neon.dist.                                               
 ------ -------------------------------------------------------------------- 

https://github.com/codeigniter4projects/playground/actions/runs/6680594906/job/18153864260?pr=218

Copy link
Collaborator

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

Thanks! Some of this is very very old 😳

@MGatner
Copy link
Collaborator

MGatner commented Nov 4, 2023

Oops! I missed the pipeline failures. My guess is that somewhere the array return type of find() is taking precedence over the single-value ID lookup version. I think this is a core issue with the method, violating single-responsibility, but I don't see in the framework what would cause this so hopefully @paulbalandan knows the source in his library. In the meantime we could ignore this or change it to where(...)->first().

@kenjis kenjis marked this pull request as ready for review February 15, 2024 23:22
@kenjis kenjis merged commit dc7977b into codeigniter4projects:develop Feb 20, 2024
29 checks passed
@kenjis kenjis deleted the update-app-code branch February 20, 2024 22:08
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.

None yet

3 participants