@@ -144,18 +144,18 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
144144 $ classElement ->appendChild ($ classLinesElement );
145145
146146 foreach ($ class ['methods ' ] as $ methodName => $ method ) {
147- if ($ method[ ' executableLines ' ] === 0 ) {
147+ if ($ method-> executableLines === 0 ) {
148148 continue ;
149149 }
150150
151- preg_match ("/\((.*?)\)/ " , $ method[ ' signature ' ] , $ signature );
151+ preg_match ("/\((.*?)\)/ " , $ method-> signature , $ signature );
152152
153- $ linesValid = $ method[ ' executableLines ' ] ;
154- $ linesCovered = $ method[ ' executedLines ' ] ;
153+ $ linesValid = $ method-> executableLines ;
154+ $ linesCovered = $ method-> executedLines ;
155155 $ lineRate = $ linesCovered / $ linesValid ;
156156
157- $ branchesValid = $ method[ ' executableBranches ' ] ;
158- $ branchesCovered = $ method[ ' executedBranches ' ] ;
157+ $ branchesValid = $ method-> executableBranches ;
158+ $ branchesCovered = $ method-> executedBranches ;
159159 $ branchRate = $ branchesValid === 0 ? 0 : ($ branchesCovered / $ branchesValid );
160160
161161 $ methodElement = $ document ->createElement ('method ' );
@@ -164,13 +164,13 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
164164 $ methodElement ->setAttribute ('signature ' , $ signature [1 ]);
165165 $ methodElement ->setAttribute ('line-rate ' , (string ) $ lineRate );
166166 $ methodElement ->setAttribute ('branch-rate ' , (string ) $ branchRate );
167- $ methodElement ->setAttribute ('complexity ' , (string ) $ method[ ' ccn ' ] );
167+ $ methodElement ->setAttribute ('complexity ' , (string ) $ method-> ccn );
168168
169169 $ methodLinesElement = $ document ->createElement ('lines ' );
170170
171171 $ methodElement ->appendChild ($ methodLinesElement );
172172
173- foreach (range ($ method[ ' startLine ' ] , $ method[ ' endLine ' ] ) as $ line ) {
173+ foreach (range ($ method-> startLine , $ method-> endLine ) as $ line ) {
174174 if (!isset ($ coverageData [$ line ])) {
175175 continue ;
176176 }
@@ -217,23 +217,23 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
217217 $ functions = $ item ->functions ();
218218
219219 foreach ($ functions as $ functionName => $ function ) {
220- if ($ function[ ' executableLines ' ] === 0 ) {
220+ if ($ function-> executableLines === 0 ) {
221221 continue ;
222222 }
223223
224- $ complexity += $ function[ ' ccn ' ] ;
225- $ packageComplexity += $ function[ ' ccn ' ] ;
226- $ functionsComplexity += $ function[ ' ccn ' ] ;
224+ $ complexity += $ function-> ccn ;
225+ $ packageComplexity += $ function-> ccn ;
226+ $ functionsComplexity += $ function-> ccn ;
227227
228- $ linesValid = $ function[ ' executableLines ' ] ;
229- $ linesCovered = $ function[ ' executedLines ' ] ;
228+ $ linesValid = $ function-> executableLines ;
229+ $ linesCovered = $ function-> executedLines ;
230230 $ lineRate = $ linesCovered / $ linesValid ;
231231
232232 $ functionsLinesValid += $ linesValid ;
233233 $ functionsLinesCovered += $ linesCovered ;
234234
235- $ branchesValid = $ function[ ' executableBranches ' ] ;
236- $ branchesCovered = $ function[ ' executedBranches ' ] ;
235+ $ branchesValid = $ function-> executableBranches ;
236+ $ branchesCovered = $ function-> executedBranches ;
237237 $ branchRate = $ branchesValid === 0 ? 0 : ($ branchesCovered / $ branchesValid );
238238
239239 $ functionsBranchesValid += $ branchesValid ;
@@ -242,16 +242,16 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
242242 $ methodElement = $ document ->createElement ('method ' );
243243
244244 $ methodElement ->setAttribute ('name ' , $ functionName );
245- $ methodElement ->setAttribute ('signature ' , $ function[ ' signature ' ] );
245+ $ methodElement ->setAttribute ('signature ' , $ function-> signature );
246246 $ methodElement ->setAttribute ('line-rate ' , (string ) $ lineRate );
247247 $ methodElement ->setAttribute ('branch-rate ' , (string ) $ branchRate );
248- $ methodElement ->setAttribute ('complexity ' , (string ) $ function[ ' ccn ' ] );
248+ $ methodElement ->setAttribute ('complexity ' , (string ) $ function-> ccn );
249249
250250 $ methodLinesElement = $ document ->createElement ('lines ' );
251251
252252 $ methodElement ->appendChild ($ methodLinesElement );
253253
254- foreach (range ($ function[ ' startLine ' ] , $ function[ ' endLine ' ] ) as $ line ) {
254+ foreach (range ($ function-> startLine , $ function-> endLine ) as $ line ) {
255255 if (!isset ($ coverageData [$ line ])) {
256256 continue ;
257257 }
0 commit comments