<commit_before>// @flow
/* **********************************************************
* File: reducers/ScanForDevices.js
*
* Brief: Reducer for the storing scan page
*
* Author: <NAME>
* Date: 2017.04.28
*
**********************************************************/
import { CHANGE_SCAN_METHOD } from '../actions/ScanForDevices';

export type scanStateType = {
  scanningMethod: 'usb' | 'ble',
  methodEnabled: boolean
};
/* Defines the type for the action */
type actionType = {
  type: string,
  method: ?string
};

const defaultState = {
  scanningMethod: 'ble',
  methodEnabled: false
};

export default function ScanForDevices(state: scanStateType = defaultState, action: actionType) {
  switch (action.type) {
    case CHANGE_SCAN_METHOD:
      /* Copy and return the new state object */
      return { ...state, scanningMethod: action.method };

    default:
      return state;
  }
}<commit_msg>Prettier test<commit_after>// @flow
/* **********************************************************
* File: reducers/ScanForDevices.js
*
* Brief: Reducer for the storing scan page
*
* Author: <NAME>
* Date: 2017.04.28
*
**********************************************************/
import { CHANGE_SCAN_METHOD } from '../actions/ScanForDevices';

export type scanStateType = {
  scanningMethod: 'usb' | 'ble',
  methodEnabled: boolean
};
/* Defines the type for the action */
type actionType = {
  type: string,
  method: ?string
};

const defaultState = {
  scanningMethod: 'ble',
  methodEnabled: false
};

export default function ScanForDevices(state: scanStateType = defaultState, action: actionType) {
  switch (action.type) {
    case CHANGE_SCAN_METHOD:
      /* Copy and return the new state object */
      return { ...state, scanningMethod: action.method };


    default:
      return state;
  }
}
{'fraction_non_alphanumeric': 0.23574986164914222, 'fraction_numerical': 0.008854454897620365, 'mean_word_length': 4.271137026239067, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1439392', 'n_tokens_mistral': 547, 'n_tokens_neox': 514, 'n_words': 143}