updated registerInspected method
Fix type hint.
Merge pull request #5210 from gayanhewa/patch-2

updated registerInspected method
Merge branch '4.2'