-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from MontealegreLuis/relative_names
Support for relative names in DocBlocks
- Loading branch information
Showing
12 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,10 +39,12 @@ jobs: | |
chmod +x box.phar | ||
./box.phar compile -vv | ||
gpg -u [email protected] --detach-sign --output phuml.phar.asc phuml.phar | ||
ls -alh phuml* | ||
- name: "Upload binaries to distribute phUML via PHIVE" | ||
uses: "svenstaro/upload-release-action@v2" | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: phuml.phar* | ||
tag: ${{ github.ref }} | ||
file_glob: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,4 @@ build: | |
|
||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
runs: 3 | ||
timeout: 1200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
SHELL = /bin/bash | ||
|
||
ARGS="" | ||
INFECTION_BADGE_API_KEY="" | ||
|
||
.PHONY: help | ||
help: ## Show help | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
currentMenu: index | ||
currentMenu: installation | ||
--- | ||
|
||
# Installation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* PHP version 8.0 | ||
* | ||
* This source file is subject to the license that is bundled with this package in the file LICENSE. | ||
*/ | ||
|
||
namespace PhUml\Parser\Code\Builders; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use PhUml\Code\Name; | ||
use PhUml\Code\UseStatement; | ||
use PhUml\Code\UseStatements; | ||
use PhUml\Code\Variables\TypeDeclaration; | ||
|
||
final class TagTypeTest extends TestCase | ||
{ | ||
/** @test */ | ||
function it_resolves_fully_qualified_names_from_relative_names() | ||
{ | ||
$useStatements = new UseStatements([new UseStatement(new Name('PhpParser\Node'), null)]); | ||
$tagType = TagType::named('Node\Param[]'); | ||
|
||
$type = $tagType->resolve($useStatements); | ||
|
||
$this->assertEquals(TypeDeclaration::from('PhpParser\Node\Param[]'), $type); | ||
} | ||
|
||
/** @test */ | ||
function it_resolves_fully_qualified_names_from_relative_names_with_multiple_prefix() | ||
{ | ||
$useStatements = new UseStatements([new UseStatement(new Name('PhpParser\Node'), null)]); | ||
$tagType = TagType::named('Node\Another\Param[]'); | ||
|
||
$type = $tagType->resolve($useStatements); | ||
|
||
$this->assertEquals(TypeDeclaration::from('PhpParser\Node\Another\Param[]'), $type); | ||
} | ||
} |