protected function prepareArrayFieldOfQuery(array $value): array
    {
        foreach (['$in', '$nin'] as $operator) {
            if (isset($value[$operator]) &&
                is_array($value[$operator])
            ) {
                foreach ($value[$operator] as $index => $id) {
                    if (ObjectIdUtils::isObjectId($id)) {
                        $value[$operator][$index] = new ObjectId($id);
                    }
                }
            }
        }

        return $value;
    }
protected function prepareArrayFieldOfQuery(array $value): array
    {
        foreach (['$in', '$nin'] as $operator) {
            if (isset($value[$operator]) &&
                is_array($value[$operator])
            ) {
                foreach ($value[$operator] as $index => $id) {
                    if (ObjectIdUtils::isObjectId($id)) {
                        $value[$operator][$index] = new ObjectId($id);
                    }
                }
            }
        }

        return $value;
    }
protected function prepareArrayFieldOfQuery ( array $ value ) : array { foreach ( [ '$in' , '$nin' ] as $ operator ) { if ( isset ( $ value [ $ operator ] ) && is_array ( $ value [ $ operator ] ) ) { foreach ( $ value [ $ operator ] as $ index => $ id ) { if ( ObjectIdUtils :: isObjectId ( $ id ) ) { $ value [ $ operator ] [ $ index ] = new ObjectId ( $ id ) ; } } } } return $ value ; }
Prepares an embedded array of an query. It will convert string ObjectIds
in operators into actual objects.

@param array $value array that will be treated

@return array prepared array
Prepares an embedded array of an query . It will convert string ObjectIds in operators into actual objects .