2.x ee15a5a2022c cached
22 files
18.9 KB
5.6k tokens
25 symbols
1 requests
Download .txt
Repository: phpDocumentor/ReflectionCommon
Branch: 2.x
Commit: ee15a5a2022c
Files: 22
Total size: 18.9 KB

Directory structure:
gitextract_5ulacfom/

├── .gitattributes
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       └── integrate.yaml
├── .gitignore
├── .yamllint.yaml
├── LICENSE
├── Makefile
├── README.md
├── composer.json
├── phive.xml
├── phpcs.xml.dist
├── phpmd.xml.dist
├── phpstan.neon
├── phpunit.xml.dist
├── psalm.xml
├── src/
│   ├── Element.php
│   ├── File.php
│   ├── Fqsen.php
│   ├── Location.php
│   ├── Project.php
│   └── ProjectFactory.php
└── tests/
    └── unit/
        └── FqsenTest.php

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
/.github/ export-ignore
/tests/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/Makefile export-ignore
/composer.lock export-ignore
/phive.xml export-ignore
/phpcs.xml.dist export-ignore
/phpmd.xml.dist export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  - package-ecosystem: "composer"
    directory: "/"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 10

  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"


================================================
FILE: .github/workflows/integrate.yaml
================================================
# https://docs.github.com/en/actions

name: "Integrate"

on: # yamllint disable-line rule:truthy
  push:
    branches:
      - "5.x"
  pull_request: null
  # Allow manually triggering the workflow.
  workflow_dispatch: null

jobs:
  code-coverage:
    name: "Code Coverage"
    uses: "phpDocumentor/.github/.github/workflows/code-coverage.yml@main"
    with:
      composer-root-version: "2.x-dev"

  coding-standards:
    name: "Coding Standards"
    uses: "phpDocumentor/.github/.github/workflows/coding-standards.yml@v0.8"
    with:
      composer-root-version: "2.x-dev"

  lint-root:
    name: "Lint root"
    uses: "phpDocumentor/.github/.github/workflows/lint.yml@main"
    with:
      composer-options: "--no-check-publish --ansi"

  static-analysis:
    name: "Static analysis"
    uses: "phpDocumentor/.github/.github/workflows/static-analysis.yml@v0.9"
    with:
      php-extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, fileinfo, pcntl, posix"
      composer-root-version: "2.x-dev"

  unit-tests:
    name: "Unit test"
    uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.9"
    with:
      composer-root-version: "2.x-dev"
      php-versions: "['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']"


================================================
FILE: .gitignore
================================================
# 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
.phpunit.result.cache


================================================
FILE: .yamllint.yaml
================================================
extends: "default"

ignore: |
  .build/
  .notes/
  vendor/
rules:
  braces:
    max-spaces-inside-empty: 0
    max-spaces-inside: 1
    min-spaces-inside-empty: 0
    min-spaces-inside: 1
  brackets:
    max-spaces-inside-empty: 0
    max-spaces-inside: 0
    min-spaces-inside-empty: 0
    min-spaces-inside: 0
  colons:
    max-spaces-after: 1
    max-spaces-before: 0
  commas:
    max-spaces-after: 1
    max-spaces-before: 0
    min-spaces-after: 1
  comments:
    ignore-shebangs: true
    min-spaces-from-content: 1
    require-starting-space: true
  comments-indentation: "enable"
  document-end:
    present: false
  document-start:
    present: false
  indentation:
    check-multi-line-strings: false
    indent-sequences: true
    spaces: 2
  empty-lines:
    max-end: 0
    max-start: 0
    max: 1
  empty-values:
    forbid-in-block-mappings: true
    forbid-in-flow-mappings: true
  hyphens:
    max-spaces-after: 2
  key-duplicates: "enable"
  key-ordering: "disable"
  line-length: "disable"
  new-line-at-end-of-file: "enable"
  new-lines:
    type: "unix"
  octal-values:
    forbid-implicit-octal: true
  quoted-strings:
    quote-type: "double"
  trailing-spaces: "enable"
  truthy:
    allowed-values:
      - "false"
      - "true"

yaml-files:
  - "*.yaml"
  - "*.yml"


================================================
FILE: LICENSE
================================================
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.



================================================
FILE: Makefile
================================================
.PHONY: help
help: ## Displays this list of targets with descriptions
	@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: code-style
code-style:
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -d memory_limit=1024M -s

.PHONY: fix-code-style
fix-code-style:
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf

.PHONY: static-code-analysis
static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpstan --configuration=phpstan.neon
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/psalm

.PHONY: test
test: test-unit ## Runs all test suites with phpunit/phpunit
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit

.PHONY: test-unit
test-unit: ## Runs unit tests with phpunit/phpunit
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit --testsuite=unit

.PHONY: dependency-analysis
dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 .phive/composer-require-checker check --config-file=/opt/project/composer-require-checker.json

vendor: composer.json composer.lock
	composer validate --no-check-publish
	composer install --no-interaction --no-progress

.PHONY: rector
rector: ## Refactor code using rector
	docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/rector process

.PHONY: pre-commit-test
pre-commit-test: fix-code-style test code-style static-code-analysis


================================================
FILE: README.md
================================================
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Qa workflow](https://github.com/phpDocumentor/ReflectionCommon/workflows/Qa%20workflow/badge.svg)
[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/ReflectionCommon.svg)](https://coveralls.io/github/phpDocumentor/ReflectionCommon?branch=master)
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master)
[![Stable Version](https://img.shields.io/packagist/v/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common)
[![Unstable Version](https://img.shields.io/packagist/vpre/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common)


ReflectionCommon
================


================================================
FILE: composer.json
================================================
{
    "name": "phpdocumentor/reflection-common",
    "keywords": ["phpdoc", "phpDocumentor", "reflection", "static analysis", "FQSEN"],
    "homepage": "https://www.phpdoc.org",
    "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
    "license": "MIT",
    "minimum-stability": "stable",
    "authors": [
        {
            "name": "Jaap van Otterdijk",
            "email": "opensource@ijaap.nl"
        }
    ],
    "require": {
        "php": "^7.4 || ^8.0"
    },
    "autoload" : {
      "psr-4" : {
        "phpDocumentor\\Reflection\\": "src/"
      }
    },
    "extra": {
        "branch-alias": {
            "dev-2.x": "2.x-dev"
        }
    },
    "require-dev": {
        "phpunit/phpunit": "^9.5",
        "phpstan/phpstan": "^1.8",
        "vimeo/psalm": "^4.25"
    },
    "config": {
        "platform": {
            "php": "7.4.1"
        }
    }
}


================================================
FILE: phive.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
  <phar name="phpunit" version="^9.5.0" installed="9.5.8" location="./tools/phpunit" copy="false"/>
</phive>


================================================
FILE: phpcs.xml.dist
================================================
<?xml version="1.0"?>
<ruleset name="ReflectionCommon">
 <description>The coding standard for this library.</description>

    <file>src</file>
    <file>tests/unit</file>
    <arg value="p"/>

    <!-- Set the minimum PHP version for PHPCompatibility.
         This should be kept in sync with the requirements in the composer.json file. -->
    <config name="testVersion" value="7.4-"/>

    <rule ref="phpDocumentor">
    </rule>
</ruleset>


================================================
FILE: phpmd.xml.dist
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<ruleset
    name="ProxyManager rules"
    xmlns="http://pmd.sf.net/ruleset/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
>
    <rule ref="rulesets/codesize.xml"/>
    <rule ref="rulesets/unusedcode.xml"/>
    <rule ref="rulesets/design.xml">
        <!-- eval is needed to generate runtime classes -->
        <exclude name="EvalExpression"/>
    </rule>
    <rule ref="rulesets/naming.xml">
        <exclude name="LongVariable"/>
    </rule>
    <rule ref="rulesets/naming.xml/LongVariable">
        <properties>
            <property name="minimum">40</property>
        </properties>
    </rule>
</ruleset>


================================================
FILE: phpstan.neon
================================================
parameters:
    level: max
    paths:
     - src
     - tests


================================================
FILE: phpunit.xml.dist
================================================
<?xml version="1.0" encoding="utf-8"?>

<phpunit
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
        colors="true"
        bootstrap="vendor/autoload.php"
        convertDeprecationsToExceptions="true"
>
    <testsuites>
        <testsuite name="unit">
            <directory>./tests/unit/</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist>
            <directory suffix=".php">src</directory>
        </whitelist>
    </filter>
    <logging>
        <log type="coverage-html"
            title="phpDocumentor Reflection Common"
            target="build/coverage"
            charset="UTF-8"
            yui="true"
            highlight="false"
            lowUpperBound="35"
            highLowerBound="70" />
        <log type="coverage-clover" target="build/logs/clover.xml"/>
        <log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false" />
    </logging>
</phpunit>


================================================
FILE: psalm.xml
================================================
<?xml version="1.0"?>
<psalm
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config file:///composer/vendor/vimeo/psalm/config.xsd"
    errorLevel="1"
>
    <projectFiles>
        <directory name="src" />
        <ignoreFiles>
            <directory name="vendor" />
        </ignoreFiles>
    </projectFiles>
</psalm>


================================================
FILE: src/Element.php
================================================
<?php

declare(strict_types=1);

/**
 * phpDocumentor
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

/**
 * Interface for Api Elements
 */
interface Element
{
    /**
     * Returns the Fqsen of the element.
     */
    public function getFqsen(): Fqsen;

    /**
     * Returns the name of the element.
     */
    public function getName(): string;
}


================================================
FILE: src/File.php
================================================
<?php

declare(strict_types=1);

/**
 * This file is part of phpDocumentor.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

/**
 * Interface for files processed by the ProjectFactory
 */
interface File
{
    /**
     * Returns the content of the file as a string.
     */
    public function getContents(): string;

    /**
     * Returns md5 hash of the file.
     */
    public function md5(): string;

    /**
     * Returns an relative path to the file.
     */
    public function path(): string;
}


================================================
FILE: src/Fqsen.php
================================================
<?php

declare(strict_types=1);

/**
 * phpDocumentor
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

use InvalidArgumentException;

use function end;
use function explode;
use function preg_match;
use function sprintf;
use function trim;

/**
 * Value Object for Fqsen.
 *
 * @link https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc-meta.md
 *
 * @psalm-immutable
 */
final class Fqsen
{
    /** @var string full quallified class name */
    private $fqsen;

    /** @var string name of the element without path. */
    private $name;

    /**
     * Initializes the object.
     *
     * @throws InvalidArgumentException when $fqsen is not matching the format.
     */
    public function __construct(string $fqsen)
    {
        $matches = [];

        $result = preg_match(
            //phpcs:ignore Generic.Files.LineLength.TooLong
            '/^\\\\([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\\\]*)?(?:[:]{2}\\$?([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*))?(?:\\(\\))?$/',
            $fqsen,
            $matches
        );

        if ($result === 0) {
            throw new InvalidArgumentException(
                sprintf('"%s" is not a valid Fqsen.', $fqsen)
            );
        }

        $this->fqsen = $fqsen;

        if (isset($matches[2])) {
            $this->name = $matches[2];
        } elseif ($fqsen === '\\') {
            $this->name = '';
        } else {
            $matches = explode('\\', $fqsen);
            $name = end($matches);
            $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;
    }
}


================================================
FILE: src/Location.php
================================================
<?php

declare(strict_types=1);

/**
 * This file is part of phpDocumentor.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

/**
 * The location where an element occurs within a file.
 *
 * @psalm-immutable
 */
final class Location
{
    /** @var int */
    private $lineNumber = 0;

    /** @var int */
    private $columnNumber = 0;

    /**
     * Initializes the location for an element using its line number in the file and optionally the column number.
     */
    public function __construct(int $lineNumber, int $columnNumber = 0)
    {
        $this->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;
    }
}


================================================
FILE: src/Project.php
================================================
<?php

declare(strict_types=1);

/**
 * phpDocumentor
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

/**
 * Interface for project. Since the definition of a project can be different per factory this interface will be small.
 */
interface Project
{
    /**
     * Returns the name of the project.
     */
    public function getName(): string;
}


================================================
FILE: src/ProjectFactory.php
================================================
<?php

declare(strict_types=1);

/**
 * phpDocumentor
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

/**
 * Interface for project factories. A project factory shall convert a set of files
 * into an object implementing the Project interface.
 */
interface ProjectFactory
{
    /**
     * Creates a project from the set of files.
     *
     * @param File[] $files
     */
    public function create(string $name, array $files): Project;
}


================================================
FILE: tests/unit/FqsenTest.php
================================================
<?php

declare(strict_types=1);

/**
 * phpDocumentor
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

use InvalidArgumentException;
use PHPUnit\Framework\TestCase;

/**
 * @coversDefaultClass \phpDocumentor\Reflection\Fqsen
 */
class FqsenTest extends TestCase
{
    /**
     * @covers ::__construct
     * @covers ::getName
     * @dataProvider validFqsenProvider
     */
    public function testValidFormats(string $fqsen, string $name): void
    {
        $instance = new Fqsen($fqsen);
        $this->assertEquals($name, $instance->getName());
    }

    /**
     * Data provider for ValidFormats tests. Contains a complete list from psr-5 draft.
     *
     * @return array<array<string>>
     */
    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<array<string>>
     */
    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);
    }
}
Download .txt
gitextract_5ulacfom/

├── .gitattributes
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       └── integrate.yaml
├── .gitignore
├── .yamllint.yaml
├── LICENSE
├── Makefile
├── README.md
├── composer.json
├── phive.xml
├── phpcs.xml.dist
├── phpmd.xml.dist
├── phpstan.neon
├── phpunit.xml.dist
├── psalm.xml
├── src/
│   ├── Element.php
│   ├── File.php
│   ├── Fqsen.php
│   ├── Location.php
│   ├── Project.php
│   └── ProjectFactory.php
└── tests/
    └── unit/
        └── FqsenTest.php
Download .txt
SYMBOL INDEX (25 symbols across 7 files)

FILE: src/Element.php
  type Element (line 19) | interface Element
    method getFqsen (line 24) | public function getFqsen(): Fqsen;
    method getName (line 29) | public function getName(): string;

FILE: src/File.php
  type File (line 19) | interface File
    method getContents (line 24) | public function getContents(): string;
    method md5 (line 29) | public function md5(): string;
    method path (line 34) | public function path(): string;

FILE: src/Fqsen.php
  class Fqsen (line 31) | final class Fqsen
    method __construct (line 44) | public function __construct(string $fqsen)
    method __toString (line 77) | public function __toString(): string
    method getName (line 85) | public function getName(): string

FILE: src/Location.php
  class Location (line 21) | final class Location
    method __construct (line 32) | public function __construct(int $lineNumber, int $columnNumber = 0)
    method getLineNumber (line 41) | public function getLineNumber(): int
    method getColumnNumber (line 49) | public function getColumnNumber(): int

FILE: src/Project.php
  type Project (line 19) | interface Project
    method getName (line 24) | public function getName(): string;

FILE: src/ProjectFactory.php
  type ProjectFactory (line 20) | interface ProjectFactory
    method create (line 27) | public function create(string $name, array $files): Project;

FILE: tests/unit/FqsenTest.php
  class FqsenTest (line 22) | class FqsenTest extends TestCase
    method testValidFormats (line 29) | public function testValidFormats(string $fqsen, string $name): void
    method validFqsenProvider (line 40) | public function validFqsenProvider(): array
    method testInValidFormats (line 62) | public function testInValidFormats(string $fqsen): void
    method invalidFqsenProvider (line 73) | public function invalidFqsenProvider(): array
    method testToString (line 87) | public function testToString(): void
Condensed preview — 22 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (21K chars).
[
  {
    "path": ".gitattributes",
    "chars": 357,
    "preview": "/.github/ export-ignore\n/tests/ export-ignore\n/.gitattributes export-ignore\n/.gitignore export-ignore\n/.scrutinizer.yml "
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 243,
    "preview": "version: 2\nupdates:\n  - package-ecosystem: \"composer\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n    open-"
  },
  {
    "path": ".github/workflows/integrate.yaml",
    "chars": 1273,
    "preview": "# https://docs.github.com/en/actions\n\nname: \"Integrate\"\n\non: # yamllint disable-line rule:truthy\n  push:\n    branches:\n "
  },
  {
    "path": ".gitignore",
    "chars": 441,
    "preview": "# IDE Shizzle; it is recommended to use a global .gitignore for this but since this is an OSS project we want to make\n# "
  },
  {
    "path": ".yamllint.yaml",
    "chars": 1294,
    "preview": "extends: \"default\"\n\nignore: |\n  .build/\n  .notes/\n  vendor/\nrules:\n  braces:\n    max-spaces-inside-empty: 0\n    max-spac"
  },
  {
    "path": "LICENSE",
    "chars": 1081,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2015 phpDocumentor\n\nPermission is hereby granted, free of charge, to any person obt"
  },
  {
    "path": "Makefile",
    "chars": 1792,
    "preview": ".PHONY: help\nhelp: ## Displays this list of targets with descriptions\n\t@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_"
  },
  {
    "path": "README.md",
    "chars": 1103,
    "preview": "[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![Qa workflo"
  },
  {
    "path": "composer.json",
    "chars": 919,
    "preview": "{\n    \"name\": \"phpdocumentor/reflection-common\",\n    \"keywords\": [\"phpdoc\", \"phpDocumentor\", \"reflection\", \"static analy"
  },
  {
    "path": "phive.xml",
    "chars": 186,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phive xmlns=\"https://phar.io/phive\">\n  <phar name=\"phpunit\" version=\"^9.5.0\" ins"
  },
  {
    "path": "phpcs.xml.dist",
    "chars": 444,
    "preview": "<?xml version=\"1.0\"?>\n<ruleset name=\"ReflectionCommon\">\n <description>The coding standard for this library.</description"
  },
  {
    "path": "phpmd.xml.dist",
    "chars": 845,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<ruleset\n    name=\"ProxyManager rules\"\n    xmlns=\"http://pmd.sf.net/ruleset/1.0."
  },
  {
    "path": "phpstan.neon",
    "chars": 62,
    "preview": "parameters:\n    level: max\n    paths:\n     - src\n     - tests\n"
  },
  {
    "path": "phpunit.xml.dist",
    "chars": 1028,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<phpunit\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        x"
  },
  {
    "path": "psalm.xml",
    "chars": 428,
    "preview": "<?xml version=\"1.0\"?>\n<psalm\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns=\"https://getpsalm.org/s"
  },
  {
    "path": "src/Element.php",
    "chars": 513,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * phpDocumentor\n *\n * For the full copyright and license information, please view "
  },
  {
    "path": "src/File.php",
    "chars": 663,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of phpDocumentor.\n *\n * For the full copyright and license inf"
  },
  {
    "path": "src/Fqsen.php",
    "chars": 2004,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * phpDocumentor\n *\n * For the full copyright and license information, please view "
  },
  {
    "path": "src/Location.php",
    "chars": 1164,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of phpDocumentor.\n *\n * For the full copyright and license inf"
  },
  {
    "path": "src/Project.php",
    "chars": 505,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * phpDocumentor\n *\n * For the full copyright and license information, please view "
  },
  {
    "path": "src/ProjectFactory.php",
    "chars": 599,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * phpDocumentor\n *\n * For the full copyright and license information, please view "
  },
  {
    "path": "tests/unit/FqsenTest.php",
    "chars": 2433,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * phpDocumentor\n *\n * For the full copyright and license information, please view "
  }
]

About this extraction

This page contains the full source code of the phpDocumentor/ReflectionCommon GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 22 files (18.9 KB), approximately 5.6k tokens, and a symbol index with 25 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!