Giter Site home page Giter Site logo

phpdoc's Introduction

#PHPDoc

CodeDoc is a Sublime Text 2/3 plugin to speedup writing documenting comments.

Currently, PhpDoc for PHP is supported, therefore CodeDoc is renamed to PhpDoc until support of other documentation types is added (if ever).

To use, just type in /** on the line right before class or function declaration, and then invoke auto-completion (with e.g. ctrl+space). This will get you a template for starters, with some values pre-filled on the fly (such as function arguments list). All common documenting keys are also available for manual input.

On some systems you have to fiddle a bit to find the auto-completion key. If it's not working on your system, just type /** and choose Edit->Show Completions. In the menu, in front of the item it will be the key combination for the auto-completion (e.g. ctrl+space, alt+/, etc)

phpdoc's People

Contributors

chrisneal avatar jbrooksuk avatar libbkmz avatar ricardovfreixo avatar unowen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpdoc's Issues

Viewing PHPDoc support for a function

Hi,

Thanks for taking the time to add PHPDoc support. I was wondering if there will be support in the future to view PHPDoc within the sublime-text itself. For instance, I have the following function:

/**

  • Highlights the root of the menu when on a certain page
  • @param string $page This is normally found in the page itself
  • @param string $link This is defined in the menu
  • @return string appends a class if the menu link and page match
    */
    function menu_selected($page, $link) {
    if($page == $link) {
    return 'class="menu-current"';
    } elseif($link == 'profile') {
    return 'class="menu-profile"';
    } else {
    return '';
    }
    }

If I press CTRL+Shift+Space (might conflict with other plugins, so this might have to be customizable), I will be able to see a dialog box or layer that shows the following information:

  • Location of file referring to the function i.e system/inc/core.inc.php
  • Name of function i.e. menu_selected
  • Description of function i.e. "Highlights the root of the menu when on a certain page"
  • A table of parameters with a heading called Parameters:
    string | $page | This is normally found in the page itself
    string | $link | This is defined in the menu
  • "Return Value" heading which will display the type returned i.e. string, mixed, boolean etc and message "appends a class if the menu link and page match"

This is just and idea and I hope that this will become possible. I'll be glad to help test the feature out during development. :)

@used-by and @api tags are not recognized.

The @Used-By and @api tags are not recognized by the plugin. And hence doesn't turn red.

And I am new to open source so if it's not too much trouble can I try to fix it? The fix seems simple enough. A new line needs to be added at line 32 in PhpDoc.sublime-completions. I am still getting the hang of all the pull request and merging. So I can try to do id. Thanks.

Comment block not valid

Hi. My SublimeLinter phpcs say: "There must be exactly one blank line before the tags in a doc comment".

Have:

/**
 * Permissions for Editor users.
 * @return array
 *   of all permisssions for Editor user role
 */

Need:

/**
 * Permissions for Editor users.
 *
 * @return array
 *   of all permisssions for Editor user role
 */

Custom @

Hi there, thanks for this plugin!!!

I'm wondering if i could put some custom '@' at the default /**

for example, when i type /** the plugin puts the @params and @returns but it would nice to have the @SInCE at the end of docblock....

How can i do that ?

Thanks in advance!

Request: support typing of params

In a function declaration, later versions of PHP support typing of input parameters. PhpDoc should support this and use the class type as the type input in the default block.

Example of current behavior:

Example of expected output:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.