PhpDocBlock generator
- Generate docblocks for
classes
,class properties
andfunctions
- Guessing variable type by value
- Guessing variable type by argument type (
array
,int
,ClassName
etc.) - Guessing function return by returning type declaration (PHP7)
Clone or download from here. Then add following code to your config file (.emacs or init.el)
(add-to-list 'load-path "~/.emacs.d/emacs-php-doc-block")
(require 'php-doc-block)
Bind php-doc-block
command to any key your like in php-mode
(add-hook 'php-mode-hook
(lambda ()
(local-set-key (kbd "<C-tab>") 'php-doc-block)))
or globally
(global-set-key (kbd "<C-tab>") 'php-doc-block)
This command will NOT generate docblock for entire file, it will generate docblock only for function, var or class which on the same line with cursor
GPLv3