File: comments.php

package info (click to toggle)
php-elisp 1.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,268 kB
  • sloc: lisp: 7,468; php: 5,396; makefile: 42; sh: 10
file content (74 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php

/**
 * File level doc-comment
 *
 * @copyright 1999, 2000, 2001, 2003, 2004 Turadg Aleahmad
 * @copyright 2008 Aaron S. Hawley
 * @copyright 2011, 2012, 2013, 2014, 2015, 2016 Eric James Michael Ritz
 * @author    USAMI Kenta <tadsan@pixiv.com>
 * @link      https://github.com/emacs-php/php-mode
 * @package   Emacs\PHPMode
 */

// one-line comment
// @annotation This is NOT annotation. 1

/*------------------------------------------------
  Multi-line comment

 * @annotation This is NOT annotation. 2
 -------------------------------------------------*/

// /**
//  * Comment outed class implementation
//  *
//  * @annotation This is NOT annotation. 3
//  */
// class CommentOuted
// {
// }

/**
 * Class level doc-comment
 *
 * Description {@internal Description} inline tag.
 *
 * @property-read string[] $name
 * @ORM\Table(name="majormodes")
 * @ORM\Entity(repositoryClass="Emacs\Repository\MajorModeRepository")
 */
final class SampleClass
{
    /** Const doc-comment */
    const SAMPLE = 'SAMPLE';
    /** @var string sample property doc-comment */
    private $name;

    /**
     * @param string $name
     */
    public function __construct($name)
    {
        $this->name = $name; // comment in after code

        /** @var string|bool|array[]|ArrayObject */
        $foo = hoge();

        // one-line comment
        // @annotation This is NOT annotation. 4

        /** @var int internal linter variable */
        $offset = 0;
    }

    /**
     * Summary
     *
     * @throws \RuntimeException
     */
    public function test()
    {
        throw new \RuntimeException;
    }
}