Skip to content

Commit 851e16f

Browse files
committed
init
0 parents  commit 851e16f

File tree

104 files changed

+1496
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1496
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
composer.lock
2+
/vendor

bin/console

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
require __DIR__ . '/console.php';

bin/console.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
// decoupled in own "*.php" file, so ECS, Rector and PHPStan works out of the box here
4+
5+
declare(strict_types=1);
6+
7+
use Symfony\Component\Console\Input\ArgvInput;
8+
use Symplify\SymplifyKernel\ValueObject\KernelBootAndApplicationRun;
9+
10+
require_once __DIR__ . '/../vendor/autoload.php';
11+
12+
$kernelBootAndApplicationRun = new KernelBootAndApplicationRun(MonorepoBuilderKernel::class);
13+
$kernelBootAndApplicationRun->run();

composer.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "rector/php-parser-nodes-docs",
3+
"require": {
4+
"php": "^8.0",
5+
"symfony/console": "^5.2",
6+
"symfony/dependency-injection": "^5.2",
7+
"symplify/symplify-kernel": "^9.1",
8+
"symplify/smart-file-system": "^9.1",
9+
"symplify/package-builder": "^9.1"
10+
},
11+
"autoload": {
12+
"psr-4": {
13+
"Rector\\PhpParserNodesDocs\\": "src"
14+
}
15+
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Rector\\PhpParserNodesDocs\\Tests\\": "tests"
19+
}
20+
}
21+
}

config/config.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6+
use Symplify\SmartFileSystem\Finder\SmartFinder;
7+
8+
return static function (ContainerConfigurator $containerConfigurator): void {
9+
$services = $containerConfigurator->services();
10+
11+
$services->defaults()
12+
->public()
13+
->autowire()
14+
->autoconfigure();
15+
16+
$services->load('Rector\PhpParserNodesDocs\\', __DIR__ . '/../src')
17+
->exclude([__DIR__ . '/../src/ValueObject']);
18+
19+
$services->set(SmartFinder::class);
20+
};

snippet/alias.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpParser\Node\Name\FullyQualified;
6+
use PhpParser\Node\Stmt\Class_;
7+
use PhpParser\Node\Stmt\TraitUseAdaptation\Alias;
8+
9+
$traitFullyQualified = new FullyQualified('TraitName');
10+
11+
return new Alias($traitFullyQualified, 'method', Class_::MODIFIER_PUBLIC, 'aliasedMethod');

snippet/array.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpParser\Node\Expr\Array_;
6+
use PhpParser\Node\Expr\ArrayItem;
7+
use PhpParser\Node\Expr\Variable;
8+
use PhpParser\Node\Scalar\String_;
9+
10+
$value = new Variable('Tom');
11+
$key = new String_('name');
12+
13+
$arrayItem = new ArrayItem($value, $key);
14+
15+
return new Array_([$arrayItem]);

snippet/array_dim_fetch.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpParser\Node\Expr\ArrayDimFetch;
6+
use PhpParser\Node\Expr\Variable;
7+
use PhpParser\Node\Scalar\LNumber;
8+
9+
$variable = new Variable('variableName');
10+
$dimension = new LNumber(0);
11+
12+
return new ArrayDimFetch($variable, $dimension);

snippet/array_item.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpParser\Node\Expr\ArrayItem;
6+
use PhpParser\Node\Expr\Variable;
7+
use PhpParser\Node\Scalar\String_;
8+
9+
$value = new Variable('Tom');
10+
$key = new String_('name');
11+
12+
return new ArrayItem($value, $key);

snippet/assign.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpParser\Node\Expr\Assign;
6+
use PhpParser\Node\Expr\Variable;
7+
use PhpParser\Node\Scalar\String_;
8+
9+
$variable = new Variable('variableName');
10+
$value = new String_('some value');
11+
12+
return new Assign($variable, $value);

0 commit comments

Comments
 (0)