File: AnonClassParenthesisOwnerTest.inc

package info (click to toggle)
php-codesniffer 3.5.8-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,808 kB
  • sloc: php: 59,806; xml: 11,787; pascal: 6,386; javascript: 2,078; makefile: 9; sh: 8
file content (19 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

/* testNoParentheses */
$anonClass = new class {
    function __construct() {}
};

/* testNoParenthesesAndEmptyTokens */
$anonClass = new class // phpcs:ignore Standard.Cat
{
    function __construct() {}
};

/* testWithParentheses */
$anonClass = new class() {};

/* testWithParenthesesAndEmptyTokens */
$anonClass = new class /*comment */
() {};