original_string: public function generateImageAddress(string $image, $method = null)
      {
          if ($method == Input::IMG_BASE64) {
              return ['base64' => $image];
          } elseif ($method == Input::IMG_PATH) {
              if (!file_exists($image)) {
                  throw new FileNotFoundException($image);
              }
  
              return ['base64' => base64_encode(file_get_contents($image))];
          } else {
              return ['url' => $image];
          }
      }
code: public function generateImageAddress(string $image, $method = null)
      {
          if ($method == Input::IMG_BASE64) {
              return ['base64' => $image];
          } elseif ($method == Input::IMG_PATH) {
              if (!file_exists($image)) {
                  throw new FileNotFoundException($image);
              }
  
              return ['base64' => base64_encode(file_get_contents($image))];
          } else {
              return ['url' => $image];
          }
      }
code_tokens: public function generateImageAddress ( string $ image , $ method = null ) { if ( $ method == Input :: IMG_BASE64 ) { return [ 'base64' => $ image ] ; } elseif ( $ method == Input :: IMG_PATH ) { if ( ! file_exists ( $ image ) ) { throw new FileNotFoundException ( $ image ) ; } return [ 'base64' => base64_encode ( file_get_contents ( $ image ) ) ] ; } else { return [ 'url' => $ image ] ; } }
docstring: Generate Image With Download Type
  
  @param $image
  @param null $method
  
  @return array
docstring_tokens: Generate Image With Download Type