Skip to content

Commit b4b0c09

Browse files
committed
Merge children library
1 parent 3630a3a commit b4b0c09

File tree

59 files changed

+131
-222
lines changed

Some content is hidden

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

59 files changed

+131
-222
lines changed

composer.json

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,25 @@
1212
"php": "^8.1",
1313
"type-lang/parser": "^1.4"
1414
},
15-
"replace": {
16-
"type-lang/phpdoc-docblock": "*"
17-
},
1815
"autoload": {
1916
"psr-4": {
20-
"TypeLang\\PHPDoc\\": "src",
21-
"TypeLang\\PHPDoc\\DocBlock\\": "libs/phpdoc-docblock/src"
22-
}
17+
"TypeLang\\PHPDoc\\": "src"
18+
},
19+
"files": [
20+
"src/polyfill.php"
21+
]
2322
},
2423
"require-dev": {
2524
"friendsofphp/php-cs-fixer": "^3.70",
26-
"phpdocumentor/reflection-docblock": "^5.6",
2725
"phpstan/phpstan": "^2.1",
2826
"phpstan/phpstan-strict-rules": "^2.0",
2927
"phpunit/phpunit": "^10.5|^11.0|^12.0",
30-
"symfony/var-dumper": "^5.4|^6.0|^7.0",
31-
"symplify/monorepo-builder": "^11.2"
28+
"symfony/var-dumper": "^5.4|^6.0|^7.0"
3229
},
3330
"autoload-dev": {
3431
"psr-4": {
35-
"TypeLang\\PHPDoc\\DocBlock\\Tests\\": "libs/phpdoc-docblock/tests",
3632
"TypeLang\\PHPDoc\\Tests\\": "tests"
37-
},
38-
"files": [
39-
"libs/phpdoc-docblock/src/polyfill.php"
40-
]
33+
}
4134
},
4235
"extra": {
4336
"branch-alias": {
@@ -66,8 +59,7 @@
6659
"linter:baseline": "phpstan analyse --configuration phpstan.neon --generate-baseline",
6760
"phpcs": "@phpcs:check",
6861
"phpcs:check": "php-cs-fixer fix --config=.php-cs-fixer.php --allow-risky=yes --dry-run --verbose --diff",
69-
"phpcs:fix": "php-cs-fixer fix --config=.php-cs-fixer.php --allow-risky=yes --verbose --diff",
70-
"dev:merge": "monorepo-builder merge"
62+
"phpcs:fix": "php-cs-fixer fix --config=.php-cs-fixer.php --allow-risky=yes --verbose --diff"
7163
},
7264
"minimum-stability": "dev",
7365
"prefer-stable": true

libs/phpdoc-docblock/composer.json

Lines changed: 0 additions & 65 deletions
This file was deleted.

libs/phpdoc-docblock/src/polyfill.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

libs/phpdoc-docblock/tests/TestCase.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

monorepo-builder.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

libs/phpdoc-docblock/src/Description/TaggedDescriptionInterface.php renamed to src/DocBlock/Description/TaggedDescriptionInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ interface TaggedDescriptionInterface extends
2323
/**
2424
* Gets a list of components (that is, tags of {@see TagInterface}
2525
* and descriptions of {@see DescriptionInterface}) that make up the
26-
* {@see TaggedDescriptionInterface} in the order in which these
26+
* {@see \TypeLang\PHPDoc\DocBlock\Polyfill\Description\TaggedDescriptionInterface} in the order in which these
2727
* elements are defined.
2828
*
29-
* @var iterable<array-key, TagInterface|DescriptionInterface>
29+
* @var DescriptionInterface
3030
* @readonly
3131
*/
3232
public iterable $components { get; }
File renamed without changes.

src/DocBlock/Tag/MethodTag.php renamed to src/DocBlock/Tag/MethodTag/MethodTag.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\MethodTag;
66

77
use TypeLang\Parser\Node\Stmt\Callable\ParameterNode;
88
use TypeLang\Parser\Node\Stmt\CallableTypeNode;
99
use TypeLang\Parser\Node\Stmt\TypeStatement;
10+
use TypeLang\PHPDoc\DocBlock\Tag\Tag;
11+
use TypeLang\PHPDoc\DocBlock\Tag\TypeProviderInterface;
1012

1113
/**
1214
* The "`@method`" tag is used in situations where a class contains the

src/DocBlock/Tag/Factory/MethodTagFactory.php renamed to src/DocBlock/Tag/MethodTag/MethodTagFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag\Factory;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\MethodTag;
66

77
use TypeLang\Parser\Node\Stmt\CallableTypeNode;
88
use TypeLang\Parser\Parser as TypesParser;
@@ -11,7 +11,7 @@
1111
use TypeLang\PHPDoc\DocBlock\Content\OptionalValueReader;
1212
use TypeLang\PHPDoc\DocBlock\Content\Stream;
1313
use TypeLang\PHPDoc\DocBlock\Content\TypeParserReader;
14-
use TypeLang\PHPDoc\DocBlock\Tag\MethodTag;
14+
use TypeLang\PHPDoc\DocBlock\Tag\Factory\TagFactoryInterface;
1515
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1616

1717
/**

src/DocBlock/Tag/ParamTag.php renamed to src/DocBlock/Tag/ParamTag/ParamTag.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\ParamTag;
66

77
use TypeLang\Parser\Node\Stmt\TypeStatement;
8+
use TypeLang\PHPDoc\DocBlock\Tag\OptionalTypeProviderInterface;
9+
use TypeLang\PHPDoc\DocBlock\Tag\Tag;
10+
use TypeLang\PHPDoc\DocBlock\Tag\VariableProviderInterface;
811

912
/**
1013
* With the "`@param`" tag it is possible to document the type and the intent of

src/DocBlock/Tag/Factory/ParamTagFactory.php renamed to src/DocBlock/Tag/ParamTag/ParamTagFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag\Factory;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\ParamTag;
66

77
use TypeLang\Parser\Parser as TypesParser;
88
use TypeLang\Parser\ParserInterface as TypesParserInterface;
99
use TypeLang\PHPDoc\DocBlock\Content\Stream;
1010
use TypeLang\PHPDoc\DocBlock\Content\TypeParserReader;
1111
use TypeLang\PHPDoc\DocBlock\Content\VariableNameReader;
12-
use TypeLang\PHPDoc\DocBlock\Tag\ParamTag;
12+
use TypeLang\PHPDoc\DocBlock\Tag\Factory\TagFactoryInterface;
1313
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1414

1515
/**

src/DocBlock/Tag/PropertyReadTag.php renamed to src/DocBlock/Tag/PropertyTag/PropertyReadTag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

77
class PropertyReadTag extends PropertyTag {}

src/DocBlock/Tag/Factory/PropertyReadTagFactory.php renamed to src/DocBlock/Tag/PropertyTag/PropertyReadTagFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag\Factory;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

77
use TypeLang\Parser\Parser as TypesParser;
88
use TypeLang\Parser\ParserInterface as TypesParserInterface;
9-
use TypeLang\PHPDoc\DocBlock\Tag\PropertyReadTag;
9+
use TypeLang\PHPDoc\DocBlock\Tag\Factory\TagFactoryInterface;
1010
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1111

1212
/**
@@ -30,8 +30,8 @@ public function create(string $tag, string $content, DescriptionParserInterface
3030

3131
return new PropertyReadTag(
3232
name: $property->name,
33-
type: $property->getType(),
34-
variable: $property->getVariable(),
33+
type: $property->type,
34+
variable: $property->variable,
3535
description: $property->description,
3636
);
3737
}

src/DocBlock/Tag/PropertyTag.php renamed to src/DocBlock/Tag/PropertyTag/PropertyTag.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

77
use TypeLang\Parser\Node\Stmt\TypeStatement;
8+
use TypeLang\PHPDoc\DocBlock\Tag\OptionalTypeProviderInterface;
9+
use TypeLang\PHPDoc\DocBlock\Tag\Tag;
10+
use TypeLang\PHPDoc\DocBlock\Tag\VariableProviderInterface;
811

912
/**
1013
* The "`@property`" tag is used when a class or trait implements the `__get()`

src/DocBlock/Tag/Factory/PropertyTagFactory.php renamed to src/DocBlock/Tag/PropertyTag/PropertyTagFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag\Factory;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

77
use TypeLang\Parser\Parser as TypesParser;
88
use TypeLang\Parser\ParserInterface as TypesParserInterface;
99
use TypeLang\PHPDoc\DocBlock\Content\Stream;
1010
use TypeLang\PHPDoc\DocBlock\Content\TypeParserReader;
1111
use TypeLang\PHPDoc\DocBlock\Content\VariableNameReader;
12-
use TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
12+
use TypeLang\PHPDoc\DocBlock\Tag\Factory\TagFactoryInterface;
1313
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1414

1515
/**

src/DocBlock/Tag/PropertyWriteTag.php renamed to src/DocBlock/Tag/PropertyTag/PropertyWriteTag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

77
class PropertyWriteTag extends PropertyTag {}

src/DocBlock/Tag/Factory/PropertyWriteTagFactory.php renamed to src/DocBlock/Tag/PropertyTag/PropertyWriteTagFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag\Factory;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

77
use TypeLang\Parser\Parser as TypesParser;
88
use TypeLang\Parser\ParserInterface as TypesParserInterface;
9-
use TypeLang\PHPDoc\DocBlock\Tag\PropertyWriteTag;
9+
use TypeLang\PHPDoc\DocBlock\Tag\Factory\TagFactoryInterface;
1010
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1111

1212
/**
@@ -30,8 +30,8 @@ public function create(string $tag, string $content, DescriptionParserInterface
3030

3131
return new PropertyWriteTag(
3232
name: $property->name,
33-
type: $property->getType(),
34-
variable: $property->getVariable(),
33+
type: $property->type,
34+
variable: $property->variable,
3535
description: $property->description,
3636
);
3737
}

src/DocBlock/Tag/ReturnTag.php renamed to src/DocBlock/Tag/ReturnTag/ReturnTag.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace TypeLang\PHPDoc\DocBlock\Tag;
5+
namespace TypeLang\PHPDoc\DocBlock\Tag\ReturnTag;
66

77
use TypeLang\Parser\Node\Stmt\TypeStatement;
8+
use TypeLang\PHPDoc\DocBlock\Tag\Tag;
9+
use TypeLang\PHPDoc\DocBlock\Tag\TypeProviderInterface;
810

911
/**
1012
* With the "`@return`" tag it is possible to document the return type of a

0 commit comments

Comments
 (0)