mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
@@ -1,3 +0,0 @@
|
|||||||
service_name: travis-ci
|
|
||||||
coverage_clover: coverage.xml
|
|
||||||
json_path: coverage.json
|
|
||||||
+5
-4
@@ -7,10 +7,11 @@
|
|||||||
.settings
|
.settings
|
||||||
|
|
||||||
# Build folder and vendor folder are generated code; no need to version this
|
# Build folder and vendor folder are generated code; no need to version this
|
||||||
build/*
|
build/
|
||||||
temp/*
|
temp/
|
||||||
vendor/*
|
tools/
|
||||||
composer.phar
|
vendor/
|
||||||
|
*.phar
|
||||||
|
|
||||||
# By default the phpunit.xml.dist is provided; you can override this using a local config file
|
# By default the phpunit.xml.dist is provided; you can override this using a local config file
|
||||||
phpunit.xml
|
phpunit.xml
|
||||||
|
|||||||
+14
-15
@@ -1,8 +1,5 @@
|
|||||||
language: php
|
language: php
|
||||||
php:
|
php: [ 7.1, 7.2, nightly ]
|
||||||
- 7.1
|
|
||||||
- 7.2
|
|
||||||
- nightly
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -13,33 +10,35 @@ matrix:
|
|||||||
- php: nightly
|
- php: nightly
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- composer install --no-interaction --prefer-dist --optimize-autoloader
|
- travis_retry composer install --no-interaction --prefer-dist --optimize-autoloader
|
||||||
|
- travis_retry composer global require phpunit/phpunit # cannot use phpunit.phar or require-dev, because this package is a phpunit dep
|
||||||
|
- travis_retry wget --no-verbose https://phar.io/releases/phive.phar
|
||||||
|
|
||||||
|
script:
|
||||||
|
- /home/travis/.composer/vendor/bin/phpunit --no-coverage
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: test
|
|
||||||
script:
|
|
||||||
- vendor/bin/phpunit --no-coverage
|
|
||||||
|
|
||||||
- stage: coverage
|
- stage: coverage
|
||||||
php: 7.1
|
php: 7.1
|
||||||
script:
|
script:
|
||||||
- vendor/bin/phpunit
|
- /home/travis/.composer/vendor/bin/phpunit
|
||||||
after_script:
|
after_script:
|
||||||
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
|
- travis_retry php phive.phar --no-progress install --trust-gpg-keys E82B2FB314E9906E php-coveralls/php-coveralls && ./tools/php-coveralls --verbose
|
||||||
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose
|
- travis_retry wget --no-verbose https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
|
||||||
|
|
||||||
- stage: lint
|
- stage: lint
|
||||||
php: 7.1
|
php: 7.1
|
||||||
before_script:
|
before_script:
|
||||||
- composer create-project symplify/easy-coding-standard temp/ecs
|
- travis_retry php phive.phar --no-progress install --trust-gpg-keys 8E730BA25823D8B5 phpstan
|
||||||
script:
|
script:
|
||||||
- temp/ecs/bin/ecs check src tests
|
- ./tools/phpstan analyse src --level max --configuration phpstan.neon
|
||||||
- vendor/bin/phpstan analyse src --level max --configuration phpstan.neon
|
- composer create-project symplify/easy-coding-standard temp/ecs && temp/ecs/bin/ecs check src tests
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.composer/cache/files
|
- $HOME/.composer/cache/files
|
||||||
|
- $HOME/.phive
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
irc: "irc.freenode.org#phpdocumentor"
|
irc: "irc.freenode.org#phpdocumentor"
|
||||||
|
|||||||
+3
-1
@@ -48,7 +48,9 @@ install:
|
|||||||
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
|
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
|
||||||
- cd c:\reflectiondocblock
|
- cd c:\reflectiondocblock
|
||||||
- composer install --no-interaction --prefer-dist --no-progress
|
- composer install --no-interaction --prefer-dist --no-progress
|
||||||
|
- composer global require phpunit/phpunit
|
||||||
|
- composer global config bin-dir --absolute
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- cd c:\reflectiondocblock
|
- cd c:\reflectiondocblock
|
||||||
- vendor/bin/phpunit --no-coverage
|
- c:\Users\appveyor\AppData\Roaming\Composer\vendor\bin\phpunit --no-coverage
|
||||||
|
|||||||
+6
-8
@@ -9,17 +9,15 @@
|
|||||||
"email": "[email protected]"
|
"email": "[email protected]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"minimum-stability": "alpha",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1",
|
"php": ">=7.1",
|
||||||
"phpdocumentor/reflection-common": "^1.0",
|
"phpdocumentor/type-resolver": "^0",
|
||||||
"phpdocumentor/type-resolver": "^0.5",
|
"webmozart/assert": "^1"
|
||||||
"webmozart/assert": "^1.0"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mockery/mockery": "^1.0",
|
"mockery/mockery": "^1",
|
||||||
"phpunit/phpunit": "^6.4",
|
"doctrine/instantiator": "^1"
|
||||||
"doctrine/instantiator": "^1.0",
|
|
||||||
"phpstan/phpstan": "^0.9.0"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
Generated
+23
-2109
File diff suppressed because it is too large
Load Diff
@@ -3,10 +3,6 @@ includes:
|
|||||||
- temp/ecs/config/psr2.neon
|
- temp/ecs/config/psr2.neon
|
||||||
- temp/ecs/config/common.neon
|
- temp/ecs/config/common.neon
|
||||||
|
|
||||||
checkers:
|
|
||||||
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
|
|
||||||
spacing: one
|
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
exclude_checkers:
|
exclude_checkers:
|
||||||
# from temp/ecs/config/common.neon
|
# from temp/ecs/config/common.neon
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phive xmlns="https://phar.io/phive">
|
||||||
|
<phar name="phpstan" version="^0.9.1" installed="0.9.1" location="./tools/phpstan"/>
|
||||||
|
<phar name="phpunit" version="^6.5.5" installed="6.5.5" location="./tools/phpunit"/>
|
||||||
|
</phive>
|
||||||
@@ -60,11 +60,13 @@ DOCBLOCK;
|
|||||||
|
|
||||||
public function testInterpretingASimpleDocBlock(): void
|
public function testInterpretingASimpleDocBlock(): void
|
||||||
{
|
{
|
||||||
/**
|
/** @var DocBlock $docblock */
|
||||||
* @var DocBlock $docblock
|
$docblock;
|
||||||
* @var string $summary
|
/** @var string $summary */
|
||||||
* @var Description $description
|
$summary;
|
||||||
*/
|
/** @var Description $description */
|
||||||
|
$description;
|
||||||
|
|
||||||
include(__DIR__ . '/../../examples/01-interpreting-a-simple-docblock.php');
|
include(__DIR__ . '/../../examples/01-interpreting-a-simple-docblock.php');
|
||||||
|
|
||||||
$descriptionText = <<<DESCRIPTION
|
$descriptionText = <<<DESCRIPTION
|
||||||
@@ -83,12 +85,15 @@ DESCRIPTION;
|
|||||||
|
|
||||||
public function testInterpretingTags(): void
|
public function testInterpretingTags(): void
|
||||||
{
|
{
|
||||||
/**
|
/** @var DocBlock $docblock */
|
||||||
* @var DocBlock $docblock
|
$docblock;
|
||||||
* @var boolean $hasSeeTag
|
/** @var boolean $hasSeeTag */
|
||||||
* @var Tag[] $tags
|
$hasSeeTag;
|
||||||
* @var See[] $seeTags
|
/** @var Tag[] $tags */
|
||||||
*/
|
$tags;
|
||||||
|
/** @var See[] $seeTags */
|
||||||
|
$seeTags;
|
||||||
|
|
||||||
include(__DIR__ . '/../../examples/02-interpreting-tags.php');
|
include(__DIR__ . '/../../examples/02-interpreting-tags.php');
|
||||||
|
|
||||||
$this->assertTrue($hasSeeTag);
|
$this->assertTrue($hasSeeTag);
|
||||||
@@ -105,15 +110,19 @@ DESCRIPTION;
|
|||||||
|
|
||||||
public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void
|
public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void
|
||||||
{
|
{
|
||||||
/**
|
/** @var string $docComment */
|
||||||
* @var string $docComment
|
$docComment;
|
||||||
* @var DocBlock $docblock
|
/** @var DocBlock $docblock */
|
||||||
* @var Description $description
|
$docblock;
|
||||||
* @var string $receivedDocComment
|
/** @var Description $description */
|
||||||
* @var string $foundDescription
|
$description;
|
||||||
*/
|
/** @var string $receivedDocComment */
|
||||||
|
$receivedDocComment;
|
||||||
|
/** @var string $foundDescription */
|
||||||
|
$foundDescription;
|
||||||
|
|
||||||
include(__DIR__ . '/../../examples/playing-with-descriptions/02-escaping.php');
|
include(__DIR__ . '/../../examples/playing-with-descriptions/02-escaping.php');
|
||||||
|
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
<<<'DESCRIPTION'
|
<<<'DESCRIPTION'
|
||||||
You can escape the @-sign by surrounding it with braces, for example: @. And escape a closing brace within an
|
You can escape the @-sign by surrounding it with braces, for example: @. And escape a closing brace within an
|
||||||
|
|||||||
@@ -31,10 +31,11 @@ class ReconstitutingADocBlockTest extends TestCase
|
|||||||
|
|
||||||
public function testReconstituteADocBlock(): void
|
public function testReconstituteADocBlock(): void
|
||||||
{
|
{
|
||||||
/**
|
/** @var string $docComment */
|
||||||
* @var string $docComment
|
$docComment;
|
||||||
* @var string $reconstitutedDocComment
|
/** @var string $reconstitutedDocComment */
|
||||||
*/
|
$reconstitutedDocComment;
|
||||||
|
|
||||||
include(__DIR__ . '/../../examples/03-reconstituting-a-docblock.php');
|
include(__DIR__ . '/../../examples/03-reconstituting-a-docblock.php');
|
||||||
|
|
||||||
$this->assertSame($docComment, $reconstitutedDocComment);
|
$this->assertSame($docComment, $reconstitutedDocComment);
|
||||||
|
|||||||
@@ -33,11 +33,13 @@ class UsingTagsTest extends TestCase
|
|||||||
|
|
||||||
public function testAddingYourOwnTagUsingAStaticMethodAsFactory(): void
|
public function testAddingYourOwnTagUsingAStaticMethodAsFactory(): void
|
||||||
{
|
{
|
||||||
/**
|
/** @var object[] $customTagObjects */
|
||||||
* @var object[] $customTagObjects
|
$customTagObjects;
|
||||||
* @var string $docComment
|
/** @var string $docComment */
|
||||||
* @var string $reconstitutedDocComment
|
$docComment;
|
||||||
*/
|
/** @var string $reconstitutedDocComment */
|
||||||
|
$reconstitutedDocComment;
|
||||||
|
|
||||||
include(__DIR__ . '/../../examples/04-adding-your-own-tag.php');
|
include(__DIR__ . '/../../examples/04-adding-your-own-tag.php');
|
||||||
|
|
||||||
$this->assertInstanceOf(\MyTag::class, $customTagObjects[0]);
|
$this->assertInstanceOf(\MyTag::class, $customTagObjects[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user