Passed
Push — master ( 491d6e...b6634d )
by Patrick
02:04
created
bin/trap_in.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 try
18 18
 {
19 19
        
20
-    $trap = new Trap($icingaweb2Etc);
21
-    //$trap = new Trap($icingaweb2Etc,4,'display'); // For debug
22
-    //$trap = new Trap($icingaweb2Etc,4,'syslog'); // For debug
23
-    //$trap->setLogging(4,'syslog'); 
20
+	$trap = new Trap($icingaweb2Etc);
21
+	//$trap = new Trap($icingaweb2Etc,4,'display'); // For debug
22
+	//$trap = new Trap($icingaweb2Etc,4,'syslog'); // For debug
23
+	//$trap->setLogging(4,'syslog'); 
24 24
     
25
-    // TODO : tranfer this to reset_trap cli command
26
-    $trap->eraseOldTraps();
25
+	// TODO : tranfer this to reset_trap cli command
26
+	$trap->eraseOldTraps();
27 27
 
28 28
 	$trap->read_trap('php://stdin');
29 29
 
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
 }
37 37
 catch (Exception $e) 
38 38
 {
39
-    if ($trap == null)
40
-    {  // Exception in trap creation : log in display & syslog
41
-        $logging = new Logging();
42
-        $logging->log("Caught exception creating Trap class",2);
43
-    }
44
-    else
45
-    {
39
+	if ($trap == null)
40
+	{  // Exception in trap creation : log in display & syslog
41
+		$logging = new Logging();
42
+		$logging->log("Caught exception creating Trap class",2);
43
+	}
44
+	else
45
+	{
46 46
 	   $trap->logging->log("Exception : ". $e->getMessage(),2,0);
47
-    }
47
+	}
48 48
 }
49 49
 
50 50
 //end
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use Trapdirector\Trap;
5 5
 
6 6
 // start
7
-$time1 = microtime(true);
7
+$time1=microtime(true);
8 8
 
9 9
 require_once ('trap_class.php');
10 10
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 try
18 18
 {
19 19
        
20
-    $trap = new Trap($icingaweb2Etc);
20
+    $trap=new Trap($icingaweb2Etc);
21 21
     //$trap = new Trap($icingaweb2Etc,4,'display'); // For debug
22 22
     //$trap = new Trap($icingaweb2Etc,4,'syslog'); // For debug
23 23
     //$trap->setLogging(4,'syslog'); 
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
 {
39 39
     if ($trap == null)
40 40
     {  // Exception in trap creation : log in display & syslog
41
-        $logging = new Logging();
42
-        $logging->log("Caught exception creating Trap class",2);
41
+        $logging=new Logging();
42
+        $logging->log("Caught exception creating Trap class", 2);
43 43
     }
44 44
     else
45 45
     {
46
-	   $trap->logging->log("Exception : ". $e->getMessage(),2,0);
46
+	   $trap->logging->log("Exception : ".$e->getMessage(), 2, 0);
47 47
     }
48 48
 }
49 49
 
Please login to merge, or discard this patch.