1 | <?php |
||
2 | class Stub_Kernel extends Intraface_Kernel |
||
3 | { |
||
4 | public $intranet; |
||
5 | public $user; |
||
6 | public $setting; |
||
7 | public $session_id; |
||
8 | |||
9 | function __construct($session_id = 'notreallyauniquesessionid') |
||
21 | /* |
||
|
|||
22 | function useShared() |
||
23 | { |
||
24 | throw new Exception('kernel->useShared should not be used in classes. Please rewrite the method'); |
||
25 | } |
||
26 | |||
27 | function module() |
||
28 | { |
||
29 | throw new Exception('kernel->module should not be used in classes. Please rewrite the method!'); |
||
30 | } |
||
31 | |||
32 | function useModule() |
||
33 | { |
||
34 | throw new Exception('kernel->useModule should not be used in classes. Please rewrite the method!'); |
||
35 | } |
||
36 | |||
37 | function getModule() |
||
38 | { |
||
39 | throw new Exception('kernel->getModule should not be used in classes. Please rewrite the method!'); |
||
40 | } |
||
41 | */ |
||
42 | |||
43 | public function getSessionId() |
||
47 | |||
48 | function getSetting() |
||
52 | } |
||
53 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.