Passed
Push — master ( e38a1c...d7a555 )
by smiley
01:43
created
src/SettingsContainerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 /**
16 16
  * a generic container with magic getter and setter
17 17
  */
18
-interface SettingsContainerInterface{
18
+interface SettingsContainerInterface {
19 19
 
20 20
 	/**
21 21
 	 * Retrieve the value of $property
Please login to merge, or discard this patch.
src/SettingsContainerAbstract.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@  discard block
 block discarded – undo
14 14
 
15 15
 use ReflectionClass, ReflectionProperty;
16 16
 
17
-abstract class SettingsContainerAbstract implements SettingsContainerInterface{
17
+abstract class SettingsContainerAbstract implements SettingsContainerInterface {
18 18
 
19 19
 	/**
20 20
 	 * SettingsContainerAbstract constructor.
21 21
 	 *
22 22
 	 * @param iterable|null $properties
23 23
 	 */
24
-	public function __construct(iterable $properties = null){
24
+	public function __construct(iterable $properties = null) {
25 25
 
26
-		if(!empty($properties)){
26
+		if (!empty($properties)) {
27 27
 			$this->fromIterable($properties);
28 28
 		}
29 29
 
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 	protected function construct():void{
40 40
 		$traits = (new ReflectionClass($this))->getTraits();
41 41
 
42
-		foreach($traits as $trait){
42
+		foreach ($traits as $trait) {
43 43
 			$method = $trait->getShortName();
44 44
 
45
-			if(method_exists($this, $method)){
45
+			if (method_exists($this, $method)) {
46 46
 				call_user_func([$this, $method]);
47 47
 			}
48 48
 		}
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	/**
53 53
 	 * @inheritdoc
54 54
 	 */
55
-	public function __get(string $property){
55
+	public function __get(string $property) {
56 56
 
57
-		if($this->__isset($property)){
57
+		if ($this->__isset($property)) {
58 58
 			return $this->{$property};
59 59
 		}
60 60
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function __set(string $property, $value):void{
68 68
 
69
-		if(!property_exists($this, $property) || $this->isPrivate($property)){
69
+		if (!property_exists($this, $property) || $this->isPrivate($property)) {
70 70
 			return;
71 71
 		}
72 72
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function __unset(string $property):void{
98 98
 
99
-		if($this->__isset($property)){
99
+		if ($this->__isset($property)) {
100 100
 			unset($this->{$property});
101 101
 		}
102 102
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function fromIterable(iterable $properties):SettingsContainerInterface{
123 123
 
124
-		foreach($properties as $key => $value){
124
+		foreach ($properties as $key => $value) {
125 125
 			$this->__set($key, $value);
126 126
 		}
127 127
 
Please login to merge, or discard this patch.