@@ -225,7 +225,7 @@ public function addArray(string $key, $value, $asObject = false) {
225225 $ prop = $ this ->createProb ($ key , $ value );
226226 $ propType = $ prop ->getType ();
227227
228- if ($ prop !== null && $ propType == JsonTypes::ARR ) {
228+ if ($ propType == JsonTypes::ARR ) {
229229 $ prop ->setAsObject ($ asObject );
230230 $ this ->propsArr [] = $ prop ;
231231
@@ -259,7 +259,7 @@ public function addBoolean($key, $val = true) {
259259 if (!$ this ->updateExisting ($ key , $ val )) {
260260 $ prop = $ this ->createProb ($ key , $ val );
261261
262- if ($ prop !== null && $ prop ->getType () == 'boolean ' ) {
262+ if ($ prop ->getType () == 'boolean ' ) {
263263 $ this ->propsArr [] = $ prop ;
264264
265265 return true ;
@@ -302,7 +302,7 @@ public function addNull(string $key) {
302302 $ prop = $ this ->createProb ($ key , $ nul );
303303 $ propType = $ prop ->getType ();
304304
305- if ($ prop !== null && $ propType == JsonTypes::NUL ) {
305+ if ($ propType == JsonTypes::NUL ) {
306306 $ this ->propsArr [] = $ prop ;
307307
308308 return true ;
@@ -337,7 +337,7 @@ public function addNumber(string $key, $value) {
337337 $ prop = $ this ->createProb ($ key , $ value );
338338 $ propType = $ prop ->getType ();
339339
340- if ($ prop !== null && $ propType == JsonTypes::INT || $ propType == JsonTypes::DOUBLE ) {
340+ if ($ propType == JsonTypes::INT || $ propType == JsonTypes::DOUBLE ) {
341341 $ this ->propsArr [] = $ prop ;
342342
343343 return true ;
@@ -376,7 +376,7 @@ public function addObject(string $key, &$val) {
376376 $ prop = $ this ->createProb ($ key , $ val );
377377 $ propType = $ prop ->getType ();
378378
379- if ($ prop !== null && $ propType == JsonTypes::OBJ ) {
379+ if ($ propType == JsonTypes::OBJ ) {
380380 $ this ->propsArr [] = $ prop ;
381381
382382 return true ;
@@ -406,7 +406,7 @@ public function addString(string $key, $val) {
406406 if (!$ this ->updateExisting ($ key , $ val )) {
407407 $ prop = $ this ->createProb ($ key , $ val );
408408
409- if ($ prop !== null && $ prop ->getType () == JsonTypes::STRING ) {
409+ if ($ prop ->getType () == JsonTypes::STRING ) {
410410 $ this ->propsArr [] = $ prop ;
411411
412412 return true ;
0 commit comments