propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 399 forks source link

Adjust return type of Query::find methods #1876

Closed mringler closed 2 years ago

mringler commented 2 years ago

I started to work with the new type hints in Propel (very nice!), but ran into some problems with return types:

Particularly the last two are pretty menial, but it cannot hurt to adjust it.

Also fixed an error from phpstan, where a string was used as a class name without check if the class exists.

codecov-commenter commented 2 years ago

Codecov Report

Merging #1876 (e928d95) into master (ba9abb9) will decrease coverage by 20.64%. The diff coverage is 100.00%.

@@              Coverage Diff              @@
##             master    #1876       +/-   ##
=============================================
- Coverage     87.61%   66.96%   -20.65%     
- Complexity     7807     7809        +2     
=============================================
  Files           227      227               
  Lines         21144    21060       -84     
=============================================
- Hits          18525    14103     -4422     
- Misses         2619     6957     +4338     
Flag Coverage Δ
5-max 66.96% <100.00%> (-20.65%) :arrow_down:
7.4 66.96% <100.00%> (-20.65%) :arrow_down:
agnostic 66.96% <100.00%> (+<0.01%) :arrow_up:
mysql ?
pgsql ?
sqlite ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Propel/Runtime/ActiveQuery/ModelCriteria.php 55.12% <ø> (-41.18%) :arrow_down:
src/Propel/Generator/Builder/Om/ObjectBuilder.php 84.64% <100.00%> (-9.47%) :arrow_down:
src/Propel/Generator/Builder/Om/QueryBuilder.php 87.81% <100.00%> (-2.18%) :arrow_down:
...c/Propel/Runtime/ActiveQuery/BaseModelCriteria.php 75.00% <100.00%> (-13.47%) :arrow_down:
src/Propel/Runtime/ActiveQuery/PropelQuery.php 0.00% <0.00%> (-100.00%) :arrow_down:
...el/Runtime/Validator/Constraints/DateValidator.php 0.00% <0.00%> (-100.00%) :arrow_down:
...nerator/Builder/Om/TableMapLoaderScriptBuilder.php 0.00% <0.00%> (-100.00%) :arrow_down:
...ggregateColumn/AggregateColumnRelationBehavior.php 0.00% <0.00%> (-97.30%) :arrow_down:
...e/ActiveQuery/SqlBuilder/InsertQuerySqlBuilder.php 0.00% <0.00%> (-96.16%) :arrow_down:
...rtable/SortableBehaviorTableMapBuilderModifier.php 0.00% <0.00%> (-95.66%) :arrow_down:
... and 127 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ba9abb9...e928d95. Read the comment docs.