@@ -75,10 +75,10 @@ |
||
75 | 75 | |
76 | 76 | public function equals($o): bool |
77 | 77 | { |
78 | - return $this->getid() == $o->getid() |
|
79 | - && $this->getName() == $o->getName() |
|
80 | - && $this->getSurname() == $o->getSurname() |
|
81 | - && $this->getLogin() == $o->getLogin(); |
|
78 | + return $this->getid() == $o->getid() |
|
79 | + && $this->getName() == $o->getName() |
|
80 | + && $this->getSurname() == $o->getSurname() |
|
81 | + && $this->getLogin() == $o->getLogin(); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | public function __toString() |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | if ( ! array_key_exists($key, $actual)) { |
12 | 12 | $message = "Keys: Expected ($key) not found in Actual"; |
13 | 13 | return false; |
14 | - } elseif ( ! $this->AssertsArrayIsASubsetOf($expected[$key], $actual[$key], $message)){ |
|
14 | + } elseif ( ! $this->AssertsArrayIsASubsetOf($expected[$key], $actual[$key], $message)) { |
|
15 | 15 | $message .= " with key ($key)"; |
16 | 16 | return false; |
17 | 17 | } |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | { |
28 | 28 | if (is_array($expected) && is_array($actual)) { |
29 | 29 | foreach ($actual as $key => $value) { |
30 | - if (!array_key_exists($key, $expected)) { |
|
30 | + if ( ! array_key_exists($key, $expected)) { |
|
31 | 31 | $message = "Keys: Actual ($key) unexpected"; |
32 | 32 | return false; |
33 | - } elseif (!$this->AssertsReverseArrayIsASubsetOf($actual[$key], $expected[$key], $message)) { |
|
33 | + } elseif ( ! $this->AssertsReverseArrayIsASubsetOf($actual[$key], $expected[$key], $message)) { |
|
34 | 34 | $message .= " in key ($key)"; |
35 | 35 | return false; |
36 | 36 | } |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | if (gettype($expected) != gettype($actual)) { |
48 | 48 | $message = "Mismatched Types: Expected (gettype($expected)) != Actual (gettype($actual))"; |
49 | 49 | return false; |
50 | - } elseif (gettype($expected) == 'object' ) { |
|
51 | - if( ! $expected->equals($actual) ) { |
|
50 | + } elseif (gettype($expected) == 'object') { |
|
51 | + if ( ! $expected->equals($actual)) { |
|
52 | 52 | $message = "Objects: Expected ($expected) != Actual ($actual)"; |
53 | 53 | return false; |
54 | 54 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | public function __set($name, $value) |
45 | 45 | { |
46 | - if( ! $this->isPropertyAllowed($name) ) { |
|
46 | + if ( ! $this->isPropertyAllowed($name)) { |
|
47 | 47 | $trace = debug_backtrace(); |
48 | 48 | trigger_error( |
49 | 49 | 'Disallowed property ' . $name . |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | public function __get($name) |
60 | 60 | { |
61 | - if( ! $this->isPropertyAllowed($name) ) { |
|
61 | + if ( ! $this->isPropertyAllowed($name)) { |
|
62 | 62 | $trace = debug_backtrace(); |
63 | 63 | trigger_error( |
64 | 64 | 'Disallowed property ' . $name . |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | return null; |
69 | 69 | } |
70 | 70 | |
71 | - if( ! $this->isDefined($name)) { |
|
71 | + if ( ! $this->isDefined($name)) { |
|
72 | 72 | $trace = debug_backtrace(); |
73 | 73 | trigger_error( |
74 | 74 | 'Undefined property ' . $name . |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | public function __isset($name) |
85 | 85 | { |
86 | - if( ! $this->isPropertyAllowed($name) ) { |
|
86 | + if ( ! $this->isPropertyAllowed($name)) { |
|
87 | 87 | $trace = debug_backtrace(); |
88 | 88 | trigger_error( |
89 | 89 | 'Disallowed property ' . $name . |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | return null; |
94 | 94 | } |
95 | 95 | |
96 | - if( ! $this->isDefined($name)) { |
|
96 | + if ( ! $this->isDefined($name)) { |
|
97 | 97 | $trace = debug_backtrace(); |
98 | 98 | trigger_error( |
99 | 99 | 'Undefined property ' . $name . |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | public function __unset($name) |
110 | 110 | { |
111 | - if( ! $this->isPropertyAllowed($name) ) { |
|
111 | + if ( ! $this->isPropertyAllowed($name)) { |
|
112 | 112 | $trace = debug_backtrace(); |
113 | 113 | trigger_error( |
114 | 114 | 'Disallowed property ' . $name . |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return null; |
119 | 119 | } |
120 | 120 | |
121 | - if( ! $this->isDefined($name)) { |
|
121 | + if ( ! $this->isDefined($name)) { |
|
122 | 122 | $trace = debug_backtrace(); |
123 | 123 | trigger_error( |
124 | 124 | 'Undefined property ' . $name . |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public function __call($name, $arguments) |
26 | 26 | { |
27 | - if( ! $this->isSetterAllowed($name) ) { |
|
27 | + if ( ! $this->isSetterAllowed($name)) { |
|
28 | 28 | $trace = debug_backtrace(); |
29 | 29 | trigger_error( |
30 | 30 | 'Disallowed getter/setter ' . $name . |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | $attribute = strtolower(substr($name, 3)); |
38 | - if($this->isSetter($name)){ |
|
38 | + if ($this->isSetter($name)) { |
|
39 | 39 | $this->$attribute = $arguments[0]; |
40 | - } elseif( $this->isGetter($name) ) { |
|
40 | + } elseif ($this->isGetter($name)) { |
|
41 | 41 | return $this->$attribute; |
42 | 42 | } else { |
43 | 43 | $name(...$arguments); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | |
47 | 47 | public function equals($o): bool |
48 | 48 | { |
49 | - foreach ($this->setters as $getter){ |
|
50 | - if( $this->isGetter($getter) ) |
|
49 | + foreach ($this->setters as $getter) { |
|
50 | + if ($this->isGetter($getter)) |
|
51 | 51 | { |
52 | - if( $this->$getter() != $o->$getter() ) |
|
52 | + if ($this->$getter() != $o->$getter()) |
|
53 | 53 | return false; |
54 | 54 | } |
55 | 55 | } |