File tree Expand file tree Collapse file tree 6 files changed +54
-5
lines changed Expand file tree Collapse file tree 6 files changed +54
-5
lines changed Original file line number Diff line number Diff line change 6767|  phpmnd.ignore-funcs |  _ null_  |  PHP Magic Number Detector |  List (comma separate) of function to ignore | 
6868|  phpmnd.ignore-strings |  _ null_  |  PHP Magic Number Detector |  List (comma separate) of strings value to ignore | 
6969|  phpmnd.strings |  ` false `  |  PHP Magic Number Detector |  Activate the strings literal analysis | 
70+ |  phpca.since |  _ null_  |  PhpCodeAnalyzer |  Only include extensions not included since version | 
71+ |  phpca.extension |  _ null_  |  PhpCodeAnalyzer |  Look for usage of a specific extension | 
7072
7173## How to contribute  
7274
Original file line number Diff line number Diff line change 2525    "require-dev" : {
2626        "povils/phpmnd" : " ^2.0" 
2727        "rskuipers/php-assumptions" : " ^0.7.0" 
28-         "wapmorgan/php-code-analyzer" : " dev-master " 
28+         "wapmorgan/php-code-analyzer" : " ^1.0.5 " 
2929    },
3030    "suggest" : {
3131        "povils/phpmnd" : " PHP Magic Number Detector" 
Original file line number Diff line number Diff line change @@ -39,4 +39,10 @@ public static function getCliName();
3939     * @return string 
4040     */ 
4141    public  static  function  getInternalClass ();
42+ 
43+     /** 
44+      * Return the global tool settings. 
45+      * @return array 
46+      */ 
47+     public  static  function  getToolSettings ();
4248}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function __invoke()
4646     */ 
4747    public  static  function  getComposer ()
4848    {
49-         return  static ::$ SETTINGS 'composer ' ];
49+         return  static ::getToolSettings () ['composer ' ];
5050    }
5151
5252    /** 
@@ -87,6 +87,16 @@ public static function getCliName()
8787     */ 
8888    public  static  function  getInternalClass ()
8989    {
90-         return  static ::$ SETTINGS 'internalClass ' ];
90+         return  static ::getToolSettings ()['internalClass ' ];
91+     }
92+ 
93+     /** 
94+      * Return the global tool settings. 
95+      * 
96+      * @return array 
97+      */ 
98+     public  static  function  getToolSettings ()
99+     {
100+         return  self ::$ SETTINGS 
91101    }
92102}
Original file line number Diff line number Diff line change @@ -28,6 +28,17 @@ public function __invoke()
2828            $ args'output ' ] = $ this options ->rawFile ('php-code-analyzer.xml ' );
2929        }
3030
31+         $ sinceVersion$ this config ->value ('phpca.since ' );
32+         $ extension$ this config ->value ('phpca.extension ' );
33+ 
34+         if  ($ sinceVersionnull ) {
35+             $ args'since-version ' ] = $ sinceVersion
36+         }
37+ 
38+         if  ($ extensionnull ) {
39+             $ args'extension ' ] = $ extension
40+         }
41+ 
3142        return  $ args
3243    }
3344
@@ -81,4 +92,14 @@ public static function getInternalClass()
8192    {
8293        return  'wapmorgan\PhpCodeAnalyzer\PhpCodeAnalyzer ' ;
8394    }
95+ 
96+     /** 
97+      * Return the global tool settings. 
98+      * 
99+      * @return array 
100+      */ 
101+     public  static  function  getToolSettings ()
102+     {
103+         return  self ::$ SETTINGS 
104+     }
84105}
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public function __invoke()
7272     */ 
7373    public  static  function  getComposer ()
7474    {
75-         return  static ::$ SETTINGS 'composer ' ];
75+         return  static ::getToolSettings () ['composer ' ];
7676    }
7777
7878    /** 
@@ -113,6 +113,16 @@ public static function getCliName()
113113     */ 
114114    public  static  function  getInternalClass ()
115115    {
116-         return  static ::$ SETTINGS 'internalClass ' ];
116+         return  static ::getToolSettings ()['internalClass ' ];
117+     }
118+ 
119+     /** 
120+      * Return the global tool settings. 
121+      * 
122+      * @return array 
123+      */ 
124+     public  static  function  getToolSettings ()
125+     {
126+         return  self ::$ SETTINGS 
117127    }
118128}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments