   (goto-char (point-min))
   (forward-line (1- line)))
 
-;; Copy of go--delete-whole-line from https://github.com/dominikh/go-mode.el
 (defun php-cs-fixer--delete-whole-line (&optional arg)
   "Delete the current line without putting it in the `kill-ring`.
 Derived from the function `kill-whole-line'.
 ARG is defined as for that function."
-  (setq arg (or arg 1))
-  (if (and (> arg 0)
-           (eobp)
-           (save-excursion (forward-visible-line 0) (eobp)))
-      (signal 'end-of-buffer nil))
-  (if (and (< arg 0)
-           (bobp)
-           (save-excursion (end-of-visible-line) (bobp)))
-      (signal 'beginning-of-buffer nil))
-  (cond ((zerop arg)
-         (delete-region (progn (forward-visible-line 0) (point))
-                        (progn (end-of-visible-line) (point))))
-        ((< arg 0)
-         (delete-region (progn (end-of-visible-line) (point))
-                        (progn (forward-visible-line (1+ arg))
-                               (unless (bobp)
-                                 (backward-char))
-                               (point))))
-        (t
-         (delete-region (progn (forward-visible-line 0) (point))
-                        (progn (forward-visible-line arg) (point))))))
+  (let (kill-ring) (kill-whole-line arg)))
 
 ;; Derivated of go--apply-rcs-patch from https://github.com/dominikh/go-mode.el
 (defun php-cs-fixer--apply-rcs-patch (patch-buffer)

;;; php-cs-fixer.el --- php-cs-fixer <https://github.com/FriendsOfPHP/PHP-CS-Fixer> wrapper for the Emacs editor.

;;; License:
;; Copyright 2015 OVYA (Renée Costes Viager Group). All rights reserved.
;; Use of this source code is governed by a BSD-style
;; license that can be found in the LICENSE file.


 (add-hook 'before-save-hook 'php-cs-fixer-before-save)."

  (interactive)
  (when (and
         buffer-file-name
         (string= (file-name-extension buffer-file-name) "php")
         (or (not (boundp 'geben-temporary-file-directory))
             (not (string-match geben-temporary-file-directory (file-name-directory buffer-file-name))))
         ) (php-cs-fixer-fix)))

(provide 'php-cs-fixer)

