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

Change iterable hard return type to array soft return type #17

Open
wants to merge 8 commits into
base: 1.x
Choose a base branch
from

Conversation

koriym
Copy link
Member

@koriym koriym commented Jul 13, 2020

RowInterfaceの戻り値をiterableからphpdocのarray型にします。

pros

  • 配列アクセスの警告が出ない
  • PHPレベルでは互換性維持
  • function Foo(iterable $list)にも値を渡せる

cons

  • QAツールでエラー
    • array()キャストでredundantの警告エラーが出ます。

@koriym koriym changed the title Run psalm on tests Change iterable hard return type to array soft return type Jul 13, 2020
@codecov
Copy link

codecov bot commented Jan 30, 2021

Codecov Report

Merging #17 (95ef480) into 1.x (fe95426) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##                1.x      #17   +/-   ##
=========================================
  Coverage     93.06%   93.06%           
  Complexity       57       57           
=========================================
  Files            10       10           
  Lines           202      202           
=========================================
  Hits            188      188           
  Misses           14       14           
Impacted Files Coverage Δ Complexity Δ
src/SqlQueryModule.php 100.00% <100.00%> (ø) 6.00 <0.00> (ø)
src/SqlQueryRow.php 100.00% <100.00%> (ø) 3.00 <2.00> (ø)
src/SqlQueryRowList.php 95.45% <100.00%> (ø) 8.00 <7.00> (ø)
src/WebQuery.php 100.00% <100.00%> (ø) 3.00 <2.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 fe95426...95ef480. Read the comment docs.

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