Home
last modified time | relevance | path

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

12

/PHP-Parser/lib/PhpParser/Node/Scalar/
H A DInt_.php8 class Int_ extends Scalar { class
40 * @return Int_ The constructed LNumber, including kind attribute
48 $attributes['kind'] = Int_::KIND_DEC;
49 return new Int_((int) $str, $attributes);
53 $attributes['kind'] = Int_::KIND_HEX;
54 return new Int_(hexdec($str), $attributes);
58 $attributes['kind'] = Int_::KIND_BIN;
59 return new Int_(bindec($str), $attributes);
72 $attributes['kind'] = Int_::KIND_OCT;
73 return new Int_(intval($str, 8), $attributes);
[all …]
/PHP-Parser/test/PhpParser/Builder/
H A DClassConstTest.php15 use PhpParser\Node\Scalar\Int_; alias
32 new Const_("TEST", new Int_(1))
47 new Const_("TEST", new Int_(1))
62 new Const_("TEST", new Int_(1))
77 new Const_("TEST", new Int_(1))
94 new Const_("TEST", new Int_(1))
113 new Const_("FIRST_TEST", new Int_(1)),
114 new Const_("SECOND_TEST", new Int_(2))
135 new Const_("ATTR_GROUP", new Int_(1))
151 [new Const_('TYPE', new Int_(1))],
[all …]
H A DEnumCaseTest.php12 use PhpParser\Node\Scalar\Int_; alias
41 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
75 new Scalar\Int_(31415)
H A DPropertyTest.php17 use PhpParser\Node\Scalar\Int_; alias
138 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
194 new Scalar\Int_(31415)
207 new \PhpParser\Node\ArrayItem(new Scalar\Int_(1)),
208 new \PhpParser\Node\ArrayItem(new Scalar\Int_(2)),
209 new \PhpParser\Node\ArrayItem(new Scalar\Int_(3)),
H A DParamTest.php14 use PhpParser\Node\Scalar\Int_; alias
49 new Scalar\Int_(31415)
62 new Node\ArrayItem(new Scalar\Int_(1)),
63 new Node\ArrayItem(new Scalar\Int_(2)),
64 new Node\ArrayItem(new Scalar\Int_(3)),
279 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
H A DTraitTest.php13 use PhpParser\Node\Scalar\Int_; alias
33 $const = new ClassConst([new Const_('FOO', new Int_(0))]);
101 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
H A DEnumTest.php12 use PhpParser\Node\Scalar\Int_; alias
112 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
H A DFunctionTest.php14 use PhpParser\Node\Scalar\Int_; alias
92 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
H A DInterfaceTest.php13 use PhpParser\Node\Scalar\Int_; alias
87 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
H A DClassTest.php13 use PhpParser\Node\Scalar\Int_; alias
147 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
H A DMethodTest.php15 use PhpParser\Node\Scalar\Int_; alias
134 [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
/PHP-Parser/test/PhpParser/
H A DParserTestAbstract.php133 ['0', ['kind' => Scalar\Int_::KIND_DEC]],
134 ['9', ['kind' => Scalar\Int_::KIND_DEC]],
135 ['07', ['kind' => Scalar\Int_::KIND_OCT]],
136 ['0xf', ['kind' => Scalar\Int_::KIND_HEX]],
137 ['0XF', ['kind' => Scalar\Int_::KIND_HEX]],
138 ['0b1', ['kind' => Scalar\Int_::KIND_BIN]],
139 ['0B1', ['kind' => Scalar\Int_::KIND_BIN]],
140 ['0o7', ['kind' => Scalar\Int_::KIND_OCT]],
141 ['0O7', ['kind' => Scalar\Int_::KIND_OCT]],
H A DConstExprEvaluatorTest.php92 new Scalar\Int_(8),
121 new Expr\BinaryOp\Mod(new Scalar\Int_(42), new Scalar\Int_(0)),
126 new Expr\BinaryOp\Plus(new Scalar\Int_(42), new Scalar\String_("1foo")),
H A DPrettyPrinterTest.php10 use PhpParser\Node\Scalar\Int_; alias
157 [new Int_(-1), '-1'],
158 [new Int_(-PHP_INT_MAX - 1), '(-' . PHP_INT_MAX . '-1)'],
159 [new Int_(-1, ['kind' => Int_::KIND_BIN]), '-0b1'],
160 [new Int_(-1, ['kind' => Int_::KIND_OCT]), '-01'],
161 [new Int_(-1, ['kind' => Int_::KIND_HEX]), '-0x1'],
261 new Stmt\If_(new Int_(1), [
H A DCompatibilityTest.php26 $node = new Scalar\Int_(1);
32 $node = new Node\DeclareItem('strict_types', new Scalar\Int_(1));
55 $this->assertTrue($node instanceof Scalar\Int_);
H A DBuilderHelpersTest.php179 $expression = new Scalar\Int_(1);
185 $this->assertEquals(new Scalar\Int_(2), BuilderHelpers::normalizeValue(2));
190 new Node\ArrayItem(new Scalar\Int_(0)),
191 new Node\ArrayItem(new Scalar\Int_(1), new Scalar\String_('test')),
H A DNodeTraverserTest.php6 use PhpParser\Node\Scalar\Int_; alias
347 $one = new Int_(1);
428 $num = new Node\Scalar\Int_(42);
451 ['enterNode', $expr, new Node\Scalar\Int_(42)],
H A DBuilderFactoryTest.php11 use PhpParser\Node\Scalar\Int_; alias
144 [new Arg(new Int_(42))]
/PHP-Parser/test/code/formatPreservation/
H A Dproperty_hooks.test11 $stmts[0]->stmts[0]->hooks[] = new Node\PropertyHook('set', new Scalar\Int_(123));
30 $stmts[0]->stmts[0]->params[0]->hooks[] = new Node\PropertyHook('set', new Scalar\Int_(123));
91 $stmts[0]->stmts[0]->hooks[0]->body = [new Stmt\Return_(new Scalar\Int_(24))];
114 $stmts[0]->stmts[0]->hooks[0]->body = new Scalar\Int_(24);
115 $stmts[0]->stmts[1]->hooks[0]->body = [new Stmt\Return_(new Scalar\Int_(24))];
/PHP-Parser/test/PhpParser/Node/Scalar/
H A DNumberTest.php18 $this->assertInstanceOf(Int_::class, $lLumber);
20 /** @var Int_ $lnumber */
/PHP-Parser/tools/fuzzing/
H A Dtarget.php65 if ($node instanceof Scalar\Int_ && $node->value < 0) {
69 new Expr\UnaryMinus(new Scalar\Int_(\PHP_INT_MAX)),
70 new Scalar\Int_(1));
72 return new Expr\UnaryMinus(new Scalar\Int_(-$node->value));
/PHP-Parser/lib/PhpParser/Node/Expr/Cast/
H A DInt_.php7 class Int_ extends Cast { class
/PHP-Parser/test/PhpParser/Node/Expr/
H A DCallableLikeTest.php7 use PhpParser\Node\Scalar\Int_; alias
22 $normalArgs = [new Arg(new Int_(1))];
/PHP-Parser/lib/PhpParser/
H A DNodeDumper.php8 use PhpParser\Node\Scalar\Int_; alias
116 if ($node instanceof Int_) {
233 Int_::KIND_BIN => 'KIND_BIN',
234 Int_::KIND_OCT => 'KIND_OCT',
235 Int_::KIND_DEC => 'KIND_DEC',
236 Int_::KIND_HEX => 'KIND_HEX',
/PHP-Parser/doc/component/
H A DConstant_expression_evaluation.markdown48 $expr = new Expr\BinaryOp\Div(new Scalar\Int_(10), new Scalar\Int_(0));

Completed in 47 milliseconds

12