original_string: public function getSecure($name = '')
      {
          $result = '';
          $cookie = Craft::$app->request->cookies->get($name);
          if ($cookie !== null) {
              try {
                  $data = Craft::$app->security->validateData($cookie->value);
              } catch (InvalidConfigException $e) {
                  Craft::error(
                      'Error getting secure cookie: '.$e->getMessage(),
                      __METHOD__
                  );
                  $data = false;
              } catch (Exception $e) {
                  Craft::error(
                      'Error getting secure cookie: '.$e->getMessage(),
                      __METHOD__
                  );
                  $data = false;
              }
              if ($cookie
                  && !empty($cookie->value)
                  && $data !== false
              ) {
                  $result = unserialize(base64_decode($data), ['allowed_classes' => false]);
              }
          }
  
          return $result;
      }
code: public function getSecure($name = '')
      {
          $result = '';
          $cookie = Craft::$app->request->cookies->get($name);
          if ($cookie !== null) {
              try {
                  $data = Craft::$app->security->validateData($cookie->value);
              } catch (InvalidConfigException $e) {
                  Craft::error(
                      'Error getting secure cookie: '.$e->getMessage(),
                      __METHOD__
                  );
                  $data = false;
              } catch (Exception $e) {
                  Craft::error(
                      'Error getting secure cookie: '.$e->getMessage(),
                      __METHOD__
                  );
                  $data = false;
              }
              if ($cookie
                  && !empty($cookie->value)
                  && $data !== false
              ) {
                  $result = unserialize(base64_decode($data), ['allowed_classes' => false]);
              }
          }
  
          return $result;
      }
code_tokens: public function getSecure ( $ name = '' ) { $ result = '' ; $ cookie = Craft :: $ app -> request -> cookies -> get ( $ name ) ; if ( $ cookie !== null ) { try { $ data = Craft :: $ app -> security -> validateData ( $ cookie -> value ) ; } catch ( InvalidConfigException $ e ) { Craft :: error ( 'Error getting secure cookie: ' . $ e -> getMessage ( ) , __METHOD__ ) ; $ data = false ; } catch ( Exception $ e ) { Craft :: error ( 'Error getting secure cookie: ' . $ e -> getMessage ( ) , __METHOD__ ) ; $ data = false ; } if ( $ cookie && ! empty ( $ cookie -> value ) && $ data !== false ) { $ result = unserialize ( base64_decode ( $ data ) , [ 'allowed_classes' => false ] ) ; } } return $ result ; }
docstring: Get a secure cookie
  
  @param string $name
  
  @return mixed
docstring_tokens: Get a secure cookie