[Phpmyadmin-devel] Help about issues reported by scrutinizer

Madhura Jayaratne madhura.cj at gmail.com
Tue Jun 23 15:33:09 CEST 2015

On Tue, Jun 23, 2015 at 2:52 AM, Nisarg Jhaveri <nisargjhaveri at gmail.com>

> Hello,
> Please look at this link,
> https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/inspections/b0f631e5-6575-4ac6-8030-7d888fde084d/issues/
> 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?
> 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)
> --
> Nisarg Jhaveri
> નિસર્ગ ઝવેરી
> Hi Nisarg,

Appreciate that you are making an effort to fix issues reported by

Regarding issue [1], you are accessing property hiddenCount 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.

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.

Issue [5] can be resolved by properly defining the type [6]


Thanks and Regards,

Madhura Jayaratne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20150623/506409d9/attachment.html>

More information about the Developers mailing list