original_string: private static function placeholder($text)
      {
          $image_manager = new ImageManager(['driver' => 'imagick']);
  
          $image = $image_manager->canvas(640, 480, '#efefef');
  
          $image->text($text, 320, 240 - (70 * substr_count($text, "\n")), function ($font) {
              $font->file(base_path('vendor/webfontkit/open-sans/fonts/opensans-regular.woff'));
              $font->size(60);
              $font->color('#cbcbcb');
              $font->align('center');
              $font->valign('center');
          });
  
          $image_data = (string) $image->encode('gif');
  
          return 'data:image/gif;base64,'.base64_encode($image_data);
      }
code: private static function placeholder($text)
      {
          $image_manager = new ImageManager(['driver' => 'imagick']);
  
          $image = $image_manager->canvas(640, 480, '#efefef');
  
          $image->text($text, 320, 240 - (70 * substr_count($text, "\n")), function ($font) {
              $font->file(base_path('vendor/webfontkit/open-sans/fonts/opensans-regular.woff'));
              $font->size(60);
              $font->color('#cbcbcb');
              $font->align('center');
              $font->valign('center');
          });
  
          $image_data = (string) $image->encode('gif');
  
          return 'data:image/gif;base64,'.base64_encode($image_data);
      }
code_tokens: private static function placeholder ( $ text ) { $ image_manager = new ImageManager ( [ 'driver' => 'imagick' ] ) ; $ image = $ image_manager -> canvas ( 640 , 480 , '#efefef' ) ; $ image -> text ( $ text , 320 , 240 - ( 70 * substr_count ( $ text , "\n" ) ) , function ( $ font ) { $ font -> file ( base_path ( 'vendor/webfontkit/open-sans/fonts/opensans-regular.woff' ) ) ; $ font -> size ( 60 ) ; $ font -> color ( '#cbcbcb' ) ; $ font -> align ( 'center' ) ; $ font -> valign ( 'center' ) ; } ) ; $ image_data = ( string ) $ image -> encode ( 'gif' ) ; return 'data:image/gif;base64,' . base64_encode ( $ image_data ) ; }
docstring: Return a placeholder image containing the provided text.
  
  @param string $text
  
  @return string
docstring_tokens: Return a placeholder image containing the provided text .