src/Serializer/NativeJsonSerializer.php
private function createGateway($assoc, $decodedJson)
    {
        if ($assoc === true) {
            $instance = new NativeArrayGateway($decodedJson);
        } else {
            $instance = new NativeObjectGateway($decodedJson);
        }

        return $instance;
    }
private function createGateway($assoc, $decodedJson)
    {
        if ($assoc === true) {
            $instance = new NativeArrayGateway($decodedJson);
        } else {
            $instance = new NativeObjectGateway($decodedJson);
        }

        return $instance;
    }
private function createGateway ( $ assoc , $ decodedJson ) { if ( $ assoc === true ) { $ instance = new NativeArrayGateway ( $ decodedJson ) ; } else { $ instance = new NativeObjectGateway ( $ decodedJson ) ; } return $ instance ; }
Creates the correct gateway based on assoc being true or false.

The information if we need assoc could also be determined by looking
at the type of $decodedJson, but we thing a boolean is faster and the
decision has already been made before.

@author Mario Mueller

@param boolean         $assoc Should we use assoc?
@param array|\stdClass $decodedJson

@return \Elastification\Client\Serializer\Gateway\GatewayInterface
Creates the correct gateway based on assoc being true or false .