@@ -21,6 +21,8 @@ class Dashboard extends Renderer
2121 /**
2222 * @param DirectoryNode $node
2323 * @param string $file
24+ *
25+ * @throws \InvalidArgumentException
2426 */
2527 public function render (DirectoryNode $ node , $ file )
2628 {
@@ -69,7 +71,7 @@ protected function complexity(array $classes, $baseLink)
6971
7072 foreach ($ classes as $ className => $ class ) {
7173 foreach ($ class ['methods ' ] as $ methodName => $ method ) {
72- if ($ className != '* ' ) {
74+ if ($ className !== '* ' ) {
7375 $ methodName = $ className . ':: ' . $ methodName ;
7476 }
7577
@@ -143,9 +145,9 @@ protected function coverageDistribution(array $classes)
143145
144146 foreach ($ classes as $ class ) {
145147 foreach ($ class ['methods ' ] as $ methodName => $ method ) {
146- if ($ method ['coverage ' ] == 0 ) {
148+ if ($ method ['coverage ' ] === 0 ) {
147149 $ result ['method ' ]['0% ' ]++;
148- } elseif ($ method ['coverage ' ] == 100 ) {
150+ } elseif ($ method ['coverage ' ] === 100 ) {
149151 $ result ['method ' ]['100% ' ]++;
150152 } else {
151153 $ key = \floor ($ method ['coverage ' ] / 10 ) * 10 ;
@@ -154,9 +156,9 @@ protected function coverageDistribution(array $classes)
154156 }
155157 }
156158
157- if ($ class ['coverage ' ] == 0 ) {
159+ if ($ class ['coverage ' ] === 0 ) {
158160 $ result ['class ' ]['0% ' ]++;
159- } elseif ($ class ['coverage ' ] == 100 ) {
161+ } elseif ($ class ['coverage ' ] === 100 ) {
160162 $ result ['class ' ]['100% ' ]++;
161163 } else {
162164 $ key = \floor ($ class ['coverage ' ] / 10 ) * 10 ;
@@ -188,10 +190,10 @@ protected function insufficientCoverage(array $classes, $baseLink)
188190 foreach ($ classes as $ className => $ class ) {
189191 foreach ($ class ['methods ' ] as $ methodName => $ method ) {
190192 if ($ method ['coverage ' ] < $ this ->highLowerBound ) {
191- if ($ className != '* ' ) {
193+ $ key = $ methodName ;
194+
195+ if ($ className !== '* ' ) {
192196 $ key = $ className . ':: ' . $ methodName ;
193- } else {
194- $ key = $ methodName ;
195197 }
196198
197199 $ leastTestedMethods [$ key ] = $ method ['coverage ' ];
@@ -248,7 +250,7 @@ protected function projectRisks(array $classes, $baseLink)
248250 foreach ($ class ['methods ' ] as $ methodName => $ method ) {
249251 if ($ method ['coverage ' ] < $ this ->highLowerBound &&
250252 $ method ['ccn ' ] > 1 ) {
251- if ($ className != '* ' ) {
253+ if ($ className !== '* ' ) {
252254 $ key = $ className . ':: ' . $ methodName ;
253255 } else {
254256 $ key = $ methodName ;
0 commit comments