Home
last modified time | relevance | path

Searched refs:method (Results 1 – 25 of 36) sorted by relevance

12

/PHP-Parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/
H A DPrecedence.php19 … public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { argument
22 $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
H A DAlias.php22 …public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attrib… argument
25 $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
/PHP-Parser/test/PhpParser/Node/Stmt/
H A DClassMethodTest.php102 $method = new ClassMethod('test', [
109 $this->assertFalse($method->returnsByRef());
110 $this->assertSame([$param], $method->getParams());
111 $this->assertSame($type, $method->getReturnType());
112 $this->assertSame([$return], $method->getStmts());
114 $method = new ClassMethod('test', [
119 $this->assertTrue($method->returnsByRef());
120 $this->assertNull($method->getStmts());
/PHP-Parser/test/code/parser/stmt/class/
H A Dtrait.test77 method: Identifier(
87 method: Identifier(
97 method: Identifier(
122 method: Identifier(
138 method: Identifier(
150 method: Identifier(
162 method: Identifier(
H A DshortEchoAsIdentifier.test32 method: Identifier(
42 method: Identifier(
H A DstaticMethod.test71 Clone method __clone() cannot be static from 1:17 to 1:22
170 Clone method __cLoNe() cannot be static from 1:17 to 1:22
/PHP-Parser/lib/PhpParser/Builder/
H A DTraitUseAdaptation.php18 protected Node\Identifier $method; variable in PhpParser\\Builder\\TraitUseAdaptation
30 public function __construct($trait, $method) { argument
34 $this->method = BuilderHelpers::normalizeIdentifier($method);
138 …return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alia…
140 … return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof);
/PHP-Parser/test/PhpParser/Builder/
H A DInterfaceTest.php46 $method = new Stmt\ClassMethod('doSomething');
47 $contract = $this->createInterfaceBuilder()->addStmt($method)->getNode();
48 $this->assertSame([$method], $contract->stmts);
63 $method = new Stmt\ClassMethod('doSomething');
65 ->addStmt($method)
110 $method = new Stmt\ClassMethod('doSomething');
112 ->addStmt($method)
H A DEnumTest.php52 $method = new Stmt\ClassMethod('testMethod');
62 ->addStmt($method)
70 'stmts' => [$use, $enumCase, $const, $method]
H A DTraitUseAdaptationTest.php11 protected function createTraitUseAdaptationBuilder($trait, $method) { argument
12 return new TraitUseAdaptation($trait, $method);
H A DClassTest.php86 $method = new Stmt\ClassMethod('testMethod');
97 ->addStmt($method)
105 'stmts' => [$use, $const, $property, $method]
/PHP-Parser/test/PhpParser/
H A DNodeVisitorForTesting.php31 private function traceEvent(string $method, $param) { argument
32 $this->trace[] = [$method, $param];
35 if ($currentReturn[0] === $method && $currentReturn[1] === $param) {
H A DBuilderFactoryTest.php292 ->addStmt($factory->method('firstMethod')
296 ->addStmt($factory->method('someMethod')
306 ->addStmt($factory->method('anotherMethod')
/PHP-Parser/test/code/formatPreservation/
H A Dcomments.test41 $method = $stmts[0]->stmts[0];
42 $method->setAttribute('comments', [new Comment\Doc("/**\n *\n */")]);
/PHP-Parser/test/code/parser/
H A DsemiReserved.test385 method: Identifier(
398 method: Identifier(
410 method: Identifier(
422 method: Identifier(
430 method: Identifier(
442 method: Identifier(
454 method: Identifier(
466 method: Identifier(
/PHP-Parser/lib/PhpParser/Node/Stmt/
H A DTraitUseAdaptation.php11 public Node\Identifier $method; variable in PhpParser\\Node\\Stmt\\TraitUseAdaptation
/PHP-Parser/lib/PhpParser/
H A DBuilderFactory.php101 public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { argument
102 if ($method === null) {
103 $method = $trait;
107 return new Builder\TraitUseAdaptation($trait, $method);
117 public function method(string $name): Builder\Method { function in PhpParser\\BuilderFactory
/PHP-Parser/
H A DUPGRADE-4.0.md38 * `Stmt\TraitUseAdaptation\Alias::$method`
40 * `Stmt\TraitUseAdaptation\Precedence::$method`
53 `use Foo\Bar` and `use Foo\Bar as Bar` are now represented differently. The `getAlias()` method
66 * The `ClassConst::isStatic()` method has been removed. Constants cannot have a static modifier.
67 * The `NodeTraverser` no longer accepts `false` as a return value from a `leaveNode()` method.
69 * The `Node::setLine()` method has been removed. If you really need to, you can use `setAttribute()`
H A DCONTRIBUTING.md4 always on the same line, even for class and method declarations.
26 4. Add pretty-printing support by implementing a `pFooBar()` method in `PrettyPrinter\Standard`.
H A DCHANGELOG.md140 there is a single method `tokenize()` returning the tokens.
254 * Added `Parser::getLexer()` method.
537 * Added `getProperty()` method to `ClassLike` nodes.
775 * Added `ClassMethod::isMagic()` method.
781 * Added `Node::setAttributes()` method.
905 * The `Node::setLine()` method has been deprecated.
941 an undefined method exception or fatal error.
987 * Added `Node::setDocComment()` method.
988 * Added `Error::getMessageWithColumnInfo()` method.
1132 * Added `setReturnType()` method to function and method builders.
[all …]
H A DUPGRADE-3.0.md42 creating the parser, while collected errors were retrieved using the `getErrors()` method:
58 Both the `throwOnError` option and the `getErrors()` method have been removed in PHP-Parser 3.0.
59 Instead an instance of `ErrorHandler\Collecting` should be passed to the `parse()` method:
108 In order to support recovery from lexer errors, the signature of the `startLexing()` method changed
118 If you use a custom lexer with overridden `startLexing()` method, it needs to be changed to accept
119 the extra parameter. The value should be passed on to the parent method.
159 * The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was
H A DUPGRADE-2.0.md40 To use a custom lexer, pass it as the second argument to the `create()` method:
69 implement a `getSubNodeNames()` method.
/PHP-Parser/doc/component/
H A DAST_builders.markdown48 ->addStmt($factory->method('someMethod')
54 * This method does something.
60 ->addStmt($factory->method('anotherMethod')
101 * This method does something.
121 * `args(array $args)`: Creates an array of function/method arguments, including the required `Arg`
125 * `methodCall(Expr $var, $name, array $args = [])`: Create a method call node. Converts `$name` to
127 * `staticCall($class, $name, array $args = [])`: Create a static method call node. Converts
/PHP-Parser/test/code/parser/expr/fetchAndCall/
H A DobjectAccess.test9 // method call variations
59 0: // method call variations
H A DstaticCall.test5 // method name variations
34 0: // method name variations

Completed in 28 milliseconds

12