A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / parser / UninitializedVariableHandler.java
index f19dd61..f68c8c6 100644 (file)
@@ -6,37 +6,41 @@ public class UninitializedVariableHandler {
 
        private class Function {
                private int count;
+
                private String name;
 
                public Function(String name, int count) {
-                       this.name=name;
-                       this.count=count;
+                       this.name = name;
+                       this.count = count;
                }
        }
 
-       private String functionName=null;
-       private int argumentCount=0;
-       private ArrayList functions=new ArrayList();
+       private String functionName = null;
+
+       private int argumentCount = 0;
+
+       private ArrayList functions = new ArrayList();
 
        public UninitializedVariableHandler() {
-               add("ereg",3);
-               add("eregi",3);
-               add("fsockopen",3);
-               add("preg_match",3);
-               add("preg_match_all",3);
-               add("preg_replace",5);
-               add("preg_replace_callback",5);
+               add("ereg", 3);
+               add("eregi", 3);
+               add("fsockopen", 3);
+               add("preg_match", 3);
+               add("preg_match_all", 3);
+               add("preg_replace", 5);
+               add("preg_replace_callback", 5);
        }
 
        private void add(String name, int countFrom) {
-               functions.add(new Function(name,countFrom));
+               functions.add(new Function(name, countFrom));
        }
 
        protected boolean reportError() {
-               if (functionName!=null) {
-                       for (int i=0; i<functions.size();i++) {
-                               Function function=(Function) functions.get(i);
-                               if (functionName.equalsIgnoreCase(function.name) && argumentCount>=function.count) {
+               if (functionName != null) {
+                       for (int i = 0; i < functions.size(); i++) {
+                               Function function = (Function) functions.get(i);
+                               if (functionName.equalsIgnoreCase(function.name)
+                                               && argumentCount >= function.count) {
                                        return false;
                                }
                        }
@@ -45,7 +49,7 @@ public class UninitializedVariableHandler {
        }
 
        public void setFunctionName(String functionName) {
-               this.functionName=functionName;
+               this.functionName = functionName;
        }
 
        public void incrementArgumentCount() {