Passed
Push — master ( 8cf93f...53adaa )
by Tom
03:43
created
maphper/lib/visibilityoverride.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@  discard block
 block discarded – undo
7 7
 
8 8
 	public function __construct($object) {
9 9
 		if ($object instanceof \stdclass) {
10
-			$this->readClosure = function() use ($object) { return $object;	};
11
-			$this->writeClosure = function ($field, $value) use ($object) { $object->$field = $value; };
10
+			$this->readClosure = function() use ($object) { return $object; };
11
+			$this->writeClosure = function($field, $value) use ($object) { $object->$field = $value; };
12 12
 		}
13 13
 		else {
14 14
 			$this->readClosure = function() {
15 15
 				$data = new \stdClass;
16
-				foreach ($this as $k => $v)	{
16
+				foreach ($this as $k => $v) {
17 17
 					if (is_scalar($v) || is_null($v) || (is_object($v) && $v instanceof \DateTime))	$data->$k = $v;
18 18
 				}
19 19
 				return $data;
20 20
 			};
21 21
 			$this->readClosure = $this->readClosure->bindTo($object, $object);
22 22
 
23
-			$this->writeClosure = function ($field, $value) { $this->$field = $value; };
23
+			$this->writeClosure = function($field, $value) { $this->$field = $value; };
24 24
 			$this->writeClosure = $this->writeClosure->bindTo($object, $object);
25 25
 		}
26 26
 			
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	public function write($data) {
34 34
 		if ($data != null) {
35 35
 			foreach ($data as $key => $value) {
36
-				($this->writeClosure)($key,  $this->processDates($value));
36
+				($this->writeClosure)($key, $this->processDates($value));
37 37
 			}
38 38
 		}
39 39
 	}
Please login to merge, or discard this patch.