src/Domain/Messaging/MetaData.php
protected function isValid($value): bool
    {
        $type = gettype($value);
        switch ($type) {
            case 'string':
            case 'integer':
            case 'double':
            case 'boolean':
            case 'NULL':
                return true;
                break;
            case 'array':
                return ArrayCollection::create($value)->every(function ($v) {
                    return $this->isValid($v);
                });
                break;
            default:
                break;
        }

        return false;
    }
protected function isValid($value): bool
    {
        $type = gettype($value);
        switch ($type) {
            case 'string':
            case 'integer':
            case 'double':
            case 'boolean':
            case 'NULL':
                return true;
                break;
            case 'array':
                return ArrayCollection::create($value)->every(function ($v) {
                    return $this->isValid($v);
                });
                break;
            default:
                break;
        }

        return false;
    }
protected function isValid ( $ value ) : bool { $ type = gettype ( $ value ) ; switch ( $ type ) { case 'string' : case 'integer' : case 'double' : case 'boolean' : case 'NULL' : return true ; break ; case 'array' : return ArrayCollection :: create ( $ value ) -> every ( function ( $ v ) { return $ this -> isValid ( $ v ) ; } ) ; break ; default : break ; } return false ; }
Checks if a value is valid

@param mixed $value The value

@return bool
Checks if a value is valid