@@ -109,45 +109,33 @@ function ($t) {
109109
110110 // check givenName
111111 if (
112- isset ($ contact ['givenName ' ])
113- && (
114- empty ($ contact ['givenName ' ])
115- || !is_string ($ contact ['givenName ' ])
116- )
112+ isset ($ contact ['givenName ' ]) &&
113+ (empty ($ contact ['givenName ' ]) || !is_string ($ contact ['givenName ' ]))
117114 ) {
118115 throw new \InvalidArgumentException ('"givenName" must be a string and cannot be empty. ' );
119116 }
120117
121118 // check surName
122119 if (
123- isset ($ contact ['surName ' ])
124- && (
125- empty ($ contact ['surName ' ])
126- || !is_string ($ contact ['surName ' ])
127- )
120+ isset ($ contact ['surName ' ]) &&
121+ (empty ($ contact ['surName ' ]) || !is_string ($ contact ['surName ' ]))
128122 ) {
129123 throw new \InvalidArgumentException ('"surName" must be a string and cannot be empty. ' );
130124 }
131125
132126 // check company
133127 if (
134- isset ($ contact ['company ' ])
135- && (
136- empty ($ contact ['company ' ])
137- || !is_string ($ contact ['company ' ])
138- )
128+ isset ($ contact ['company ' ]) &&
129+ (empty ($ contact ['company ' ]) || !is_string ($ contact ['company ' ]))
139130 ) {
140131 throw new \InvalidArgumentException ('"company" must be a string and cannot be empty. ' );
141132 }
142133
143134 // check emailAddress
144135 if (isset ($ contact ['emailAddress ' ])) {
145136 if (
146- empty ($ contact ['emailAddress ' ])
147- || !(
148- is_string ($ contact ['emailAddress ' ])
149- || is_array ($ contact ['emailAddress ' ])
150- )
137+ empty ($ contact ['emailAddress ' ]) ||
138+ !(is_string ($ contact ['emailAddress ' ]) || is_array ($ contact ['emailAddress ' ]))
151139 ) {
152140 throw new \InvalidArgumentException ('"emailAddress" must be a string or an array and cannot be empty. ' );
153141 }
@@ -163,11 +151,8 @@ function ($t) {
163151 // check telephoneNumber
164152 if (isset ($ contact ['telephoneNumber ' ])) {
165153 if (
166- empty ($ contact ['telephoneNumber ' ])
167- || !(
168- is_string ($ contact ['telephoneNumber ' ])
169- || is_array ($ contact ['telephoneNumber ' ])
170- )
154+ empty ($ contact ['telephoneNumber ' ]) ||
155+ !(is_string ($ contact ['telephoneNumber ' ]) || is_array ($ contact ['telephoneNumber ' ]))
171156 ) {
172157 throw new \InvalidArgumentException (
173158 '"telephoneNumber" must be a string or an array and cannot be empty. '
0 commit comments