original_string: protected function when($condition, $value, $default = null)
      {
          return $condition
              ? value($value)
              : (func_num_args() === 3 ? value($default) : new MissingValue);
      }
code: protected function when($condition, $value, $default = null)
      {
          return $condition
              ? value($value)
              : (func_num_args() === 3 ? value($default) : new MissingValue);
      }
code_tokens: protected function when ( $ condition , $ value , $ default = null ) { return $ condition ? value ( $ value ) : ( func_num_args ( ) === 3 ? value ( $ default ) : new MissingValue ) ; }
docstring: Retrieve a value based on a given condition.
  
  @param  bool   $condition
  @param  mixed  $value
  @param  mixed  $default
  
  @return \Illuminate\Http\Resources\MissingValue|mixed
docstring_tokens: Retrieve a value based on a given condition .