<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 23, 2015 at 2:52 AM, Nisarg Jhaveri <span dir="ltr"><<a href="mailto:nisargjhaveri@gmail.com" target="_blank">nisargjhaveri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>Please look at this link, </div><a href="https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/" target="_blank">https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/</a><div><br></div><div>All the three issues reported are more or less similar. And I believe that I've already done what it is suggesting. But still, it classifies these issues as bug, and one of them as major bug. Is it a false alarm or I am doing something wrong?</div><div><br></div><div>Also, is there any better way to achieve what i'm trying to do? (To implement a method same way in more then one subclasses, without duplicating code)<span class=""><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Nisarg Jhaveri</div><div>નિસર્ગ ઝવેરી<br></div></div></div>
</font></span></div></div>
<br></blockquote><div>Hi Nisarg,</div><div><br></div><div>Appreciate that you are making an effort to fix issues reported by Scrutinizer.</div><div><br></div><div>Regarding issue [1], you are accessing property <span style="color:rgb(51,51,51);font-family:Monaco,Menlo,Consolas,'Courier New',monospace;font-size:13px;line-height:20px;background-color:initial">hiddenCount</span> in Node which is only defined in Node_Database about which the scrutinizer complains. It's true that you have done an instanceof check, but this is generally an anti pattern, and you can resolve this easily using inheritance. See [2] to how this can be resolved.</div><div><br></div><div>Issue [3] is somewhat similar. This can be resolved by moving the related logic to Node_DatabaseChild class and by changing the semantics of the class a bit [4] (I am referring to the change in class description). If we could not change the semantics of the class, we could have added a parent class to achieve the same. </div><div><br></div><div>Issue [5] can be resolved by properly defining the type [6]</div><div><br></div><div>[1] <a href="https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/files/libraries/navigation/Nodes/Node.class.php?status=new&selectedSeverities%5B0%5D=10&orderField=path&order=asc">https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/files/libraries/navigation/Nodes/Node.class.php?status=new&selectedSeverities%5B0%5D=10&orderField=path&order=asc</a></div><div>[2] <a href="https://github.com/phpmyadmin/phpmyadmin/commit/312d1599229a615405400b208798ba97b3ccd74b">https://github.com/phpmyadmin/phpmyadmin/commit/312d1599229a615405400b208798ba97b3ccd74b</a></div><div>[3] <a href="https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/files/libraries/navigation/Nodes/Node.class.php?status=new&selectedSeverities%5B0%5D=5&orderField=path&order=asc">https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/files/libraries/navigation/Nodes/Node.class.php?status=new&selectedSeverities%5B0%5D=5&orderField=path&order=asc</a></div><div>[4] <a href="https://github.com/phpmyadmin/phpmyadmin/commit/789d9aa01885d48ca2d00d30fe2386fb1ab8cd01">https://github.com/phpmyadmin/phpmyadmin/commit/789d9aa01885d48ca2d00d30fe2386fb1ab8cd01</a></div><div>[5] <a href="https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/files/libraries/navigation/NavigationTree.class.php?status=new&orderField=path&order=asc">https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/files/libraries/navigation/NavigationTree.class.php?status=new&orderField=path&order=asc</a></div><div>[6] <a href="https://github.com/phpmyadmin/phpmyadmin/commit/67a94c222c202b467e1b2d545e98d71d012e6175">https://github.com/phpmyadmin/phpmyadmin/commit/67a94c222c202b467e1b2d545e98d71d012e6175</a></div></div><div><br></div>-- <br><div class="gmail_signature">Thanks and Regards,<div><br></div><div>Madhura Jayaratne<br><div><br></div></div></div>
</div></div>