mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57: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
|
||||
|
||||
# Build folder and vendor folder are generated code; no need to version this
|
||||
build/*
|
||||
temp/*
|
||||
vendor/*
|
||||
composer.phar
|
||||
build/
|
||||
temp/
|
||||
tools/
|
||||
vendor/
|
||||
*.phar
|
||||
|
||||
# By default the phpunit.xml.dist is provided; you can override this using a local config file
|
||||
phpunit.xml
|
||||
|
||||
+14
-15
@@ -1,8 +1,5 @@
|
||||
language: php
|
||||
php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
- nightly
|
||||
php: [ 7.1, 7.2, nightly ]
|
||||
sudo: false
|
||||
|
||||
env:
|
||||
@@ -13,33 +10,35 @@ matrix:
|
||||
- php: nightly
|
||||
|
||||
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:
|
||||
include:
|
||||
- stage: test
|
||||
script:
|
||||
- vendor/bin/phpunit --no-coverage
|
||||
|
||||
- stage: coverage
|
||||
php: 7.1
|
||||
script:
|
||||
- vendor/bin/phpunit
|
||||
- /home/travis/.composer/vendor/bin/phpunit
|
||||
after_script:
|
||||
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
|
||||
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose
|
||||
- travis_retry php phive.phar --no-progress install --trust-gpg-keys E82B2FB314E9906E php-coveralls/php-coveralls && ./tools/php-coveralls --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
|
||||
php: 7.1
|
||||
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:
|
||||
- temp/ecs/bin/ecs check src tests
|
||||
- vendor/bin/phpstan analyse src --level max --configuration phpstan.neon
|
||||
- ./tools/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:
|
||||
directories:
|
||||
- $HOME/.composer/cache/files
|
||||
- $HOME/.phive
|
||||
|
||||
notifications:
|
||||
irc: "irc.freenode.org#phpdocumentor"
|
||||
|
||||
+3
-1
@@ -48,7 +48,9 @@ install:
|
||||
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
|
||||
- cd c:\reflectiondocblock
|
||||
- composer install --no-interaction --prefer-dist --no-progress
|
||||
- composer global require phpunit/phpunit
|
||||
- composer global config bin-dir --absolute
|
||||
|
||||
test_script:
|
||||
- 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]"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "alpha",
|
||||
"require": {
|
||||
"php": "^7.1",
|
||||
"phpdocumentor/reflection-common": "^1.0",
|
||||
"phpdocumentor/type-resolver": "^0.5",
|
||||
"webmozart/assert": "^1.0"
|
||||
"php": ">=7.1",
|
||||
"phpdocumentor/type-resolver": "^0",
|
||||
"webmozart/assert": "^1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^6.4",
|
||||
"doctrine/instantiator": "^1.0",
|
||||
"phpstan/phpstan": "^0.9.0"
|
||||
"mockery/mockery": "^1",
|
||||
"doctrine/instantiator": "^1"
|
||||
},
|
||||
"autoload": {
|
||||
"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/common.neon
|
||||
|
||||
checkers:
|
||||
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
|
||||
spacing: one
|
||||
|
||||
parameters:
|
||||
exclude_checkers:
|
||||
# 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
|
||||
{
|
||||
/**
|
||||
* @var DocBlock $docblock
|
||||
* @var string $summary
|
||||
* @var Description $description
|
||||
*/
|
||||
/** @var DocBlock $docblock */
|
||||
$docblock;
|
||||
/** @var string $summary */
|
||||
$summary;
|
||||
/** @var Description $description */
|
||||
$description;
|
||||
|
||||
include(__DIR__ . '/../../examples/01-interpreting-a-simple-docblock.php');
|
||||
|
||||
$descriptionText = <<<DESCRIPTION
|
||||
@@ -83,12 +85,15 @@ DESCRIPTION;
|
||||
|
||||
public function testInterpretingTags(): void
|
||||
{
|
||||
/**
|
||||
* @var DocBlock $docblock
|
||||
* @var boolean $hasSeeTag
|
||||
* @var Tag[] $tags
|
||||
* @var See[] $seeTags
|
||||
*/
|
||||
/** @var DocBlock $docblock */
|
||||
$docblock;
|
||||
/** @var boolean $hasSeeTag */
|
||||
$hasSeeTag;
|
||||
/** @var Tag[] $tags */
|
||||
$tags;
|
||||
/** @var See[] $seeTags */
|
||||
$seeTags;
|
||||
|
||||
include(__DIR__ . '/../../examples/02-interpreting-tags.php');
|
||||
|
||||
$this->assertTrue($hasSeeTag);
|
||||
@@ -105,15 +110,19 @@ DESCRIPTION;
|
||||
|
||||
public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void
|
||||
{
|
||||
/**
|
||||
* @var string $docComment
|
||||
* @var DocBlock $docblock
|
||||
* @var Description $description
|
||||
* @var string $receivedDocComment
|
||||
* @var string $foundDescription
|
||||
*/
|
||||
/** @var string $docComment */
|
||||
$docComment;
|
||||
/** @var DocBlock $docblock */
|
||||
$docblock;
|
||||
/** @var Description $description */
|
||||
$description;
|
||||
/** @var string $receivedDocComment */
|
||||
$receivedDocComment;
|
||||
/** @var string $foundDescription */
|
||||
$foundDescription;
|
||||
|
||||
include(__DIR__ . '/../../examples/playing-with-descriptions/02-escaping.php');
|
||||
|
||||
$this->assertSame(
|
||||
<<<'DESCRIPTION'
|
||||
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
|
||||
{
|
||||
/**
|
||||
* @var string $docComment
|
||||
* @var string $reconstitutedDocComment
|
||||
*/
|
||||
/** @var string $docComment */
|
||||
$docComment;
|
||||
/** @var string $reconstitutedDocComment */
|
||||
$reconstitutedDocComment;
|
||||
|
||||
include(__DIR__ . '/../../examples/03-reconstituting-a-docblock.php');
|
||||
|
||||
$this->assertSame($docComment, $reconstitutedDocComment);
|
||||
|
||||
@@ -33,11 +33,13 @@ class UsingTagsTest extends TestCase
|
||||
|
||||
public function testAddingYourOwnTagUsingAStaticMethodAsFactory(): void
|
||||
{
|
||||
/**
|
||||
* @var object[] $customTagObjects
|
||||
* @var string $docComment
|
||||
* @var string $reconstitutedDocComment
|
||||
*/
|
||||
/** @var object[] $customTagObjects */
|
||||
$customTagObjects;
|
||||
/** @var string $docComment */
|
||||
$docComment;
|
||||
/** @var string $reconstitutedDocComment */
|
||||
$reconstitutedDocComment;
|
||||
|
||||
include(__DIR__ . '/../../examples/04-adding-your-own-tag.php');
|
||||
|
||||
$this->assertInstanceOf(\MyTag::class, $customTagObjects[0]);
|
||||
|
||||
Reference in New Issue
Block a user