original_string: protected function getCenterOffset(\Imagick $image, $targetWidth, $targetHeight)
      {
          $size = $image->getImageGeometry();
          $originalWidth = $size['width'];
          $originalHeight = $size['height'];
          $goalX = (int) (($originalWidth-$targetWidth)/2);
          $goalY = (int) (($originalHeight-$targetHeight)/2);
  
          return array('x' => $goalX, 'y' => $goalY);
      }
code: protected function getCenterOffset(\Imagick $image, $targetWidth, $targetHeight)
      {
          $size = $image->getImageGeometry();
          $originalWidth = $size['width'];
          $originalHeight = $size['height'];
          $goalX = (int) (($originalWidth-$targetWidth)/2);
          $goalY = (int) (($originalHeight-$targetHeight)/2);
  
          return array('x' => $goalX, 'y' => $goalY);
      }
code_tokens: protected function getCenterOffset ( \ Imagick $ image , $ targetWidth , $ targetHeight ) { $ size = $ image -> getImageGeometry ( ) ; $ originalWidth = $ size [ 'width' ] ; $ originalHeight = $ size [ 'height' ] ; $ goalX = ( int ) ( ( $ originalWidth - $ targetWidth ) / 2 ) ; $ goalY = ( int ) ( ( $ originalHeight - $ targetHeight ) / 2 ) ; return array ( 'x' => $ goalX , 'y' => $ goalY ) ; }
docstring: Get the cropping offset for the image based on the center of the image
  
  @param  \Imagick $image
  @param  int      $targetWidth
  @param  int      $targetHeight
  @return array
docstring_tokens: Get the cropping offset for the image based on the center of the image