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

Bugfix/do not use same variable name inside and outside of loop #1812

Closed mringler closed 2 years ago

mringler commented 2 years ago

@dereuromark found this weird thing I did, where the same variable name is used inside and outside the loop:

        foreach ($value as $key => $value) {
            ...
        }

Interestingly enough, this actually works (there is an explanation here), but it is clearly poor form.

codecov-commenter commented 2 years ago

Codecov Report

Merging #1812 (2f38b72) into master (431b8d0) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1812   +/-   ##
=========================================
  Coverage     87.85%   87.85%           
  Complexity     7816     7816           
=========================================
  Files           281      281           
  Lines         22710    22710           
=========================================
  Hits          19951    19951           
  Misses         2759     2759           
Flag Coverage Δ
5-max 87.85% <100.00%> (ø)
7.4 87.85% <100.00%> (ø)
agnostic 68.54% <100.00%> (ø)
mysql 70.55% <100.00%> (ø)
pgsql 70.43% <100.00%> (ø)
sqlite 68.47% <100.00%> (ø)

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

Impacted Files Coverage Δ
...rc/Propel/Generator/Builder/Om/TableMapBuilder.php 95.06% <100.00%> (ø)

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 431b8d0...2f38b72. Read the comment docs.