original_string: public function onlyOnePaymentMethod($actionCounts)
      {
          return (isset($actionCounts['card']) && $actionCounts['card'] == 1
                  && (!isset($actionCounts['token'])
                      || isset($actionCounts['token']) && $actionCounts['token'] == 0)
                  && (!isset($actionCounts['transactionId'])
                      || isset($actionCounts['transactionId']) == 0))
              || (isset($actionCounts['token']) && $actionCounts['token'] == 1
                  && (!isset($actionCounts['card'])
                      || isset($actionCounts['card']) && $actionCounts['card'] == 0)
                  && (!isset($actionCounts['transactionId'])
                      || isset($actionCounts['transactionId']) == 0))
              || (isset($actionCounts['transactionId']) && $actionCounts['transactionId'] == 1
                  && (!isset($actionCounts['card'])
                      || isset($actionCounts['card']) && $actionCounts['card'] == 0)
                  && (!isset($actionCounts['token'])
                      || isset($actionCounts['token']) == 0));
      }
code: public function onlyOnePaymentMethod($actionCounts)
      {
          return (isset($actionCounts['card']) && $actionCounts['card'] == 1
                  && (!isset($actionCounts['token'])
                      || isset($actionCounts['token']) && $actionCounts['token'] == 0)
                  && (!isset($actionCounts['transactionId'])
                      || isset($actionCounts['transactionId']) == 0))
              || (isset($actionCounts['token']) && $actionCounts['token'] == 1
                  && (!isset($actionCounts['card'])
                      || isset($actionCounts['card']) && $actionCounts['card'] == 0)
                  && (!isset($actionCounts['transactionId'])
                      || isset($actionCounts['transactionId']) == 0))
              || (isset($actionCounts['transactionId']) && $actionCounts['transactionId'] == 1
                  && (!isset($actionCounts['card'])
                      || isset($actionCounts['card']) && $actionCounts['card'] == 0)
                  && (!isset($actionCounts['token'])
                      || isset($actionCounts['token']) == 0));
      }
code_tokens: public function onlyOnePaymentMethod ( $ actionCounts ) { return ( isset ( $ actionCounts [ 'card' ] ) && $ actionCounts [ 'card' ] == 1 && ( ! isset ( $ actionCounts [ 'token' ] ) || isset ( $ actionCounts [ 'token' ] ) && $ actionCounts [ 'token' ] == 0 ) && ( ! isset ( $ actionCounts [ 'transactionId' ] ) || isset ( $ actionCounts [ 'transactionId' ] ) == 0 ) ) || ( isset ( $ actionCounts [ 'token' ] ) && $ actionCounts [ 'token' ] == 1 && ( ! isset ( $ actionCounts [ 'card' ] ) || isset ( $ actionCounts [ 'card' ] ) && $ actionCounts [ 'card' ] == 0 ) && ( ! isset ( $ actionCounts [ 'transactionId' ] ) || isset ( $ actionCounts [ 'transactionId' ] ) == 0 ) ) || ( isset ( $ actionCounts [ 'transactionId' ] ) && $ actionCounts [ 'transactionId' ] == 1 && ( ! isset ( $ actionCounts [ 'card' ] ) || isset ( $ actionCounts [ 'card' ] ) && $ actionCounts [ 'card' ] == 0 ) && ( ! isset ( $ actionCounts [ 'token' ] ) || isset ( $ actionCounts [ 'token' ] ) == 0 ) ) ; }
docstring: Ensures there is only one payment method, and checks that
  there is only one card, one token, or one transactionId
  in use.
  
  @param array $actionCounts
  
  @return bool
docstring_tokens: Ensures there is only one payment method and checks that there is only one card one token or one transactionId in use .