Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 5fb285c0d0e3 |
children |
rev | line source |
---|---|
Chris@0 | 1 Some special methods cannot be static |
Chris@0 | 2 ----- |
Chris@0 | 3 <?php class A { static function __construct() {} } |
Chris@0 | 4 ----- |
Chris@0 | 5 Constructor __construct() cannot be static from 1:17 to 1:22 |
Chris@0 | 6 array( |
Chris@0 | 7 0: Stmt_Class( |
Chris@0 | 8 flags: 0 |
Chris@13 | 9 name: Identifier( |
Chris@13 | 10 name: A |
Chris@13 | 11 ) |
Chris@0 | 12 extends: null |
Chris@0 | 13 implements: array( |
Chris@0 | 14 ) |
Chris@0 | 15 stmts: array( |
Chris@0 | 16 0: Stmt_ClassMethod( |
Chris@0 | 17 flags: MODIFIER_STATIC (8) |
Chris@0 | 18 byRef: false |
Chris@13 | 19 name: Identifier( |
Chris@13 | 20 name: __construct |
Chris@13 | 21 ) |
Chris@0 | 22 params: array( |
Chris@0 | 23 ) |
Chris@0 | 24 returnType: null |
Chris@0 | 25 stmts: array( |
Chris@0 | 26 ) |
Chris@0 | 27 ) |
Chris@0 | 28 ) |
Chris@0 | 29 ) |
Chris@0 | 30 ) |
Chris@0 | 31 ----- |
Chris@0 | 32 <?php class A { static function __destruct() {} } |
Chris@0 | 33 ----- |
Chris@0 | 34 Destructor __destruct() cannot be static from 1:17 to 1:22 |
Chris@0 | 35 array( |
Chris@0 | 36 0: Stmt_Class( |
Chris@0 | 37 flags: 0 |
Chris@13 | 38 name: Identifier( |
Chris@13 | 39 name: A |
Chris@13 | 40 ) |
Chris@0 | 41 extends: null |
Chris@0 | 42 implements: array( |
Chris@0 | 43 ) |
Chris@0 | 44 stmts: array( |
Chris@0 | 45 0: Stmt_ClassMethod( |
Chris@0 | 46 flags: MODIFIER_STATIC (8) |
Chris@0 | 47 byRef: false |
Chris@13 | 48 name: Identifier( |
Chris@13 | 49 name: __destruct |
Chris@13 | 50 ) |
Chris@0 | 51 params: array( |
Chris@0 | 52 ) |
Chris@0 | 53 returnType: null |
Chris@0 | 54 stmts: array( |
Chris@0 | 55 ) |
Chris@0 | 56 ) |
Chris@0 | 57 ) |
Chris@0 | 58 ) |
Chris@0 | 59 ) |
Chris@0 | 60 ----- |
Chris@0 | 61 <?php class A { static function __clone() {} } |
Chris@0 | 62 ----- |
Chris@0 | 63 Clone method __clone() cannot be static from 1:17 to 1:22 |
Chris@0 | 64 array( |
Chris@0 | 65 0: Stmt_Class( |
Chris@0 | 66 flags: 0 |
Chris@13 | 67 name: Identifier( |
Chris@13 | 68 name: A |
Chris@13 | 69 ) |
Chris@0 | 70 extends: null |
Chris@0 | 71 implements: array( |
Chris@0 | 72 ) |
Chris@0 | 73 stmts: array( |
Chris@0 | 74 0: Stmt_ClassMethod( |
Chris@0 | 75 flags: MODIFIER_STATIC (8) |
Chris@0 | 76 byRef: false |
Chris@13 | 77 name: Identifier( |
Chris@13 | 78 name: __clone |
Chris@13 | 79 ) |
Chris@0 | 80 params: array( |
Chris@0 | 81 ) |
Chris@0 | 82 returnType: null |
Chris@0 | 83 stmts: array( |
Chris@0 | 84 ) |
Chris@0 | 85 ) |
Chris@0 | 86 ) |
Chris@0 | 87 ) |
Chris@0 | 88 ) |
Chris@0 | 89 ----- |
Chris@0 | 90 <?php class A { static function __CONSTRUCT() {} } |
Chris@0 | 91 ----- |
Chris@0 | 92 Constructor __CONSTRUCT() cannot be static from 1:17 to 1:22 |
Chris@0 | 93 array( |
Chris@0 | 94 0: Stmt_Class( |
Chris@0 | 95 flags: 0 |
Chris@13 | 96 name: Identifier( |
Chris@13 | 97 name: A |
Chris@13 | 98 ) |
Chris@0 | 99 extends: null |
Chris@0 | 100 implements: array( |
Chris@0 | 101 ) |
Chris@0 | 102 stmts: array( |
Chris@0 | 103 0: Stmt_ClassMethod( |
Chris@0 | 104 flags: MODIFIER_STATIC (8) |
Chris@0 | 105 byRef: false |
Chris@13 | 106 name: Identifier( |
Chris@13 | 107 name: __CONSTRUCT |
Chris@13 | 108 ) |
Chris@0 | 109 params: array( |
Chris@0 | 110 ) |
Chris@0 | 111 returnType: null |
Chris@0 | 112 stmts: array( |
Chris@0 | 113 ) |
Chris@0 | 114 ) |
Chris@0 | 115 ) |
Chris@0 | 116 ) |
Chris@0 | 117 ) |
Chris@0 | 118 ----- |
Chris@0 | 119 <?php class A { static function __Destruct() {} } |
Chris@0 | 120 ----- |
Chris@0 | 121 Destructor __Destruct() cannot be static from 1:17 to 1:22 |
Chris@0 | 122 array( |
Chris@0 | 123 0: Stmt_Class( |
Chris@0 | 124 flags: 0 |
Chris@13 | 125 name: Identifier( |
Chris@13 | 126 name: A |
Chris@13 | 127 ) |
Chris@0 | 128 extends: null |
Chris@0 | 129 implements: array( |
Chris@0 | 130 ) |
Chris@0 | 131 stmts: array( |
Chris@0 | 132 0: Stmt_ClassMethod( |
Chris@0 | 133 flags: MODIFIER_STATIC (8) |
Chris@0 | 134 byRef: false |
Chris@13 | 135 name: Identifier( |
Chris@13 | 136 name: __Destruct |
Chris@13 | 137 ) |
Chris@0 | 138 params: array( |
Chris@0 | 139 ) |
Chris@0 | 140 returnType: null |
Chris@0 | 141 stmts: array( |
Chris@0 | 142 ) |
Chris@0 | 143 ) |
Chris@0 | 144 ) |
Chris@0 | 145 ) |
Chris@0 | 146 ) |
Chris@0 | 147 ----- |
Chris@0 | 148 <?php class A { static function __cLoNe() {} } |
Chris@0 | 149 ----- |
Chris@0 | 150 Clone method __cLoNe() cannot be static from 1:17 to 1:22 |
Chris@0 | 151 array( |
Chris@0 | 152 0: Stmt_Class( |
Chris@0 | 153 flags: 0 |
Chris@13 | 154 name: Identifier( |
Chris@13 | 155 name: A |
Chris@13 | 156 ) |
Chris@0 | 157 extends: null |
Chris@0 | 158 implements: array( |
Chris@0 | 159 ) |
Chris@0 | 160 stmts: array( |
Chris@0 | 161 0: Stmt_ClassMethod( |
Chris@0 | 162 flags: MODIFIER_STATIC (8) |
Chris@0 | 163 byRef: false |
Chris@13 | 164 name: Identifier( |
Chris@13 | 165 name: __cLoNe |
Chris@13 | 166 ) |
Chris@0 | 167 params: array( |
Chris@0 | 168 ) |
Chris@0 | 169 returnType: null |
Chris@0 | 170 stmts: array( |
Chris@0 | 171 ) |
Chris@0 | 172 ) |
Chris@0 | 173 ) |
Chris@0 | 174 ) |
Chris@0 | 175 ) |