pax_global_header 0000666 0000000 0000000 00000000064 13676515125 0014525 g ustar 00root root 0000000 0000000 52 comment=66cc52b742c092872478509a14a8e0e3a3a632a4
php-phpdocumentor-reflection-common-2.2.0/ 0000775 0000000 0000000 00000000000 13676515125 0020620 5 ustar 00root root 0000000 0000000 php-phpdocumentor-reflection-common-2.2.0/.github/ 0000775 0000000 0000000 00000000000 13676515125 0022160 5 ustar 00root root 0000000 0000000 php-phpdocumentor-reflection-common-2.2.0/.github/dependabot.yml 0000664 0000000 0000000 00000000202 13676515125 0025002 0 ustar 00root root 0000000 0000000 version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
php-phpdocumentor-reflection-common-2.2.0/.github/workflows/ 0000775 0000000 0000000 00000000000 13676515125 0024215 5 ustar 00root root 0000000 0000000 php-phpdocumentor-reflection-common-2.2.0/.github/workflows/push.yml 0000664 0000000 0000000 00000014654 13676515125 0025731 0 ustar 00root root 0000000 0000000 on:
push:
branches:
- 2.x
pull_request:
name: Qa workflow
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: composer
uses: docker://composer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: install --no-interaction --prefer-dist --optimize-autoloader
- name: Install phive
run: make install-phive
- name: Install PHAR dependencies
run: tools/phive.phar --no-progress install --copy --trust-gpg-keys 4AA394086372C20A,8A03EA3B385DBAA1 --force-accept-unsigned
phpunit-with-coverage:
runs-on: ubuntu-latest
name: Unit tests
needs: setup
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1
coverage: pcov
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ubuntu-latest-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ubuntu-latest-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Run PHPUnit
run: php tools/phpunit
phpunit:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system:
- ubuntu-latest
- windows-latest
- macOS-latest
php-versions: ['7.2', '7.3', '7.4', '8.0']
name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
needs:
- setup
- phpunit-with-coverage
steps:
- uses: actions/checkout@v2
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Run PHPUnit
continue-on-error: true
run: php tools/phpunit
codestyle:
runs-on: ubuntu-latest
needs: [setup, phpunit]
steps:
- uses: actions/checkout@v2
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Code style check
uses: phpDocumentor/coding-standard@latest
with:
args: -s
phpstan:
runs-on: ubuntu-latest
needs: [setup, phpunit]
steps:
- uses: actions/checkout@v2
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: PHPStan
uses: phpDocumentor/phpstan-ga@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: analyse src --configuration phpstan.neon
psalm:
runs-on: ubuntu-latest
needs: [setup, phpunit]
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1
tools: psalm
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Psalm
run: psalm --output-format=github
bc_check:
name: BC Check
runs-on: ubuntu-latest
needs: [setup, phpunit]
steps:
- uses: actions/checkout@v2
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
php-phpdocumentor-reflection-common-2.2.0/.gitignore 0000664 0000000 0000000 00000000643 13676515125 0022613 0 ustar 00root root 0000000 0000000 # IDE Shizzle; it is recommended to use a global .gitignore for this but since this is an OSS project we want to make
# it easy to contribute
.idea
/nbproject/private/
.buildpath
.project
.settings
# Build folder and vendor folder are generated code; no need to version this
build/
temp/
tools/
vendor/
*.phar
# By default the phpunit.xml.dist is provided; you can override this using a local config file
phpunit.xml
php-phpdocumentor-reflection-common-2.2.0/.scrutinizer.yml 0000664 0000000 0000000 00000002215 13676515125 0024002 0 ustar 00root root 0000000 0000000 before_commands:
- "composer install --no-dev --prefer-source"
checks:
php:
excluded_dependencies:
- phpstan/phpstan
tools:
external_code_coverage:
enabled: true
timeout: 300
filter:
excluded_paths: ["tests", "vendor"]
php_code_sniffer:
enabled: true
config:
standard: PSR2
filter:
paths: ["src/*", "tests/*"]
excluded_paths: []
php_cpd:
enabled: true
excluded_dirs: ["tests", "vendor"]
php_cs_fixer:
enabled: true
config:
level: all
filter:
paths: ["src/*", "tests/*"]
php_loc:
enabled: true
excluded_dirs: ["tests", "vendor"]
php_mess_detector:
enabled: true
config:
ruleset: phpmd.xml.dist
design_rules: { eval_expression: false }
filter:
paths: ["src/*"]
php_pdepend:
enabled: true
excluded_dirs: ["tests", "vendor"]
php_analyzer:
enabled: true
filter:
paths: ["src/*", "tests/*"]
sensiolabs_security_checker: true
php-phpdocumentor-reflection-common-2.2.0/LICENSE 0000664 0000000 0000000 00000002071 13676515125 0021625 0 ustar 00root root 0000000 0000000 The MIT License (MIT)
Copyright (c) 2015 phpDocumentor
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
php-phpdocumentor-reflection-common-2.2.0/Makefile 0000664 0000000 0000000 00000002365 13676515125 0022266 0 ustar 00root root 0000000 0000000 .PHONY: install-phive
install-phive:
mkdir tools; \
wget -O tools/phive.phar https://github.com/phar-io/phive/releases/download/0.13.2/phive-0.13.2.phar; \
wget -O tools/phive.phar.asc https://github.com/phar-io/phive/releases/download/0.13.2/phive-0.13.2.phar.asc; \
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79; \
gpg --verify tools/phive.phar.asc tools/phive.phar; \
chmod +x tools/phive.phar
.PHONY: setup
setup: install-phive
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phar-ga:latest php tools/phive.phar install --force-accept-unsigned
.PHONY: phpcs
phpcs:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -s
.PHONY: phpcbf
phpcbf:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf
.PHONY: phpstan
phpstan:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpstan-ga:latest analyse src --no-progress --configuration phpstan.neon
.PHONY: psalm
psalm:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.2 tools/psalm --show-info=true
.PHONY: test
test:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.2 tools/phpunit
.PHONY: pre-commit-test
pre-commit-test: test phpcs phpstan psalm
php-phpdocumentor-reflection-common-2.2.0/README.md 0000664 0000000 0000000 00000002117 13676515125 0022100 0 ustar 00root root 0000000 0000000 [](https://opensource.org/licenses/MIT)

[](https://coveralls.io/github/phpDocumentor/ReflectionCommon?branch=master)
[](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master)
[](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master)
[](https://packagist.org/packages/phpDocumentor/Reflection-Common)
[](https://packagist.org/packages/phpDocumentor/Reflection-Common)
ReflectionCommon
================
php-phpdocumentor-reflection-common-2.2.0/composer.json 0000664 0000000 0000000 00000001274 13676515125 0023346 0 ustar 00root root 0000000 0000000 {
"name": "phpdocumentor/reflection-common",
"keywords": ["phpdoc", "phpDocumentor", "reflection", "static analysis", "FQSEN"],
"homepage": "http://www.phpdoc.org",
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"license": "MIT",
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"require": {
"php": "^7.2 || ^8.0"
},
"autoload" : {
"psr-4" : {
"phpDocumentor\\Reflection\\": "src/"
}
},
"require-dev": {
},
"extra": {
"branch-alias": {
"dev-2.x": "2.x-dev"
}
}
}
php-phpdocumentor-reflection-common-2.2.0/composer.lock 0000664 0000000 0000000 00000001064 13676515125 0023322 0 ustar 00root root 0000000 0000000 {
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d930d0012b641501a862411b6777b20e",
"packages": [],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=7.1"
},
"platform-dev": []
}
php-phpdocumentor-reflection-common-2.2.0/phive.xml 0000664 0000000 0000000 00000000427 13676515125 0022460 0 ustar 00root root 0000000 0000000
php-phpdocumentor-reflection-common-2.2.0/phpcs.xml.dist 0000664 0000000 0000000 00000000366 13676515125 0023426 0 ustar 00root root 0000000 0000000
The coding standard for phpDocumentor.
src
tests/unit
php-phpdocumentor-reflection-common-2.2.0/phpmd.xml.dist 0000664 0000000 0000000 00000001515 13676515125 0023416 0 ustar 00root root 0000000 0000000
40
php-phpdocumentor-reflection-common-2.2.0/phpstan.neon 0000664 0000000 0000000 00000000033 13676515125 0023152 0 ustar 00root root 0000000 0000000 parameters:
level: max
php-phpdocumentor-reflection-common-2.2.0/phpunit.xml.dist 0000664 0000000 0000000 00000001464 13676515125 0024000 0 ustar 00root root 0000000 0000000
./tests/unit/
src
php-phpdocumentor-reflection-common-2.2.0/psalm.xml 0000664 0000000 0000000 00000000661 13676515125 0022461 0 ustar 00root root 0000000 0000000
php-phpdocumentor-reflection-common-2.2.0/src/ 0000775 0000000 0000000 00000000000 13676515125 0021407 5 ustar 00root root 0000000 0000000 php-phpdocumentor-reflection-common-2.2.0/src/Element.php 0000664 0000000 0000000 00000001003 13676515125 0023503 0 ustar 00root root 0000000 0000000 fqsen = $fqsen;
if (isset($matches[2])) {
$this->name = $matches[2];
} else {
$matches = explode('\\', $fqsen);
$name = end($matches);
assert(is_string($name));
$this->name = trim($name, '()');
}
}
/**
* converts this class to string.
*/
public function __toString() : string
{
return $this->fqsen;
}
/**
* Returns the name of the element without path.
*/
public function getName() : string
{
return $this->name;
}
}
php-phpdocumentor-reflection-common-2.2.0/src/Location.php 0000664 0000000 0000000 00000002216 13676515125 0023671 0 ustar 00root root 0000000 0000000 lineNumber = $lineNumber;
$this->columnNumber = $columnNumber;
}
/**
* Returns the line number that is covered by this location.
*/
public function getLineNumber() : int
{
return $this->lineNumber;
}
/**
* Returns the column number (character position on a line) for this location object.
*/
public function getColumnNumber() : int
{
return $this->columnNumber;
}
}
php-phpdocumentor-reflection-common-2.2.0/src/Project.php 0000664 0000000 0000000 00000000772 13676515125 0023534 0 ustar 00root root 0000000 0000000 assertEquals($name, $instance->getName());
}
/**
* Data provider for ValidFormats tests. Contains a complete list from psr-5 draft.
*
* @return array>
*/
public function validFqsenProvider() : array
{
return [
['\\', ''],
['\My\Space', 'Space'],
['\My\Space\myFunction()', 'myFunction'],
['\My\Space\MY_CONSTANT', 'MY_CONSTANT'],
['\My\Space\MY_CONSTANT2', 'MY_CONSTANT2'],
['\My\Space\MyClass', 'MyClass'],
['\My\Space\MyInterface', 'MyInterface'],
['\My\Space\Option«T»', 'Option«T»'],
['\My\Space\MyTrait', 'MyTrait'],
['\My\Space\MyClass::myMethod()', 'myMethod'],
['\My\Space\MyClass::$my_property', 'my_property'],
['\My\Space\MyClass::MY_CONSTANT', 'MY_CONSTANT'],
];
}
/**
* @covers ::__construct
* @dataProvider invalidFqsenProvider
*/
public function testInValidFormats(string $fqsen) : void
{
$this->expectException(InvalidArgumentException::class);
new Fqsen($fqsen);
}
/**
* Data provider for invalidFormats tests. Contains a complete list from psr-5 draft.
*
* @return array>
*/
public function invalidFqsenProvider() : array
{
return [
['\My\*'],
['\My\Space\.()'],
['My\Space'],
['1_function()'],
];
}
/**
* @covers ::__construct
* @covers ::__toString
*/
public function testToString() : void
{
$className = new Fqsen('\\phpDocumentor\\Application');
$this->assertEquals('\\phpDocumentor\\Application', (string) $className);
}
}