Full Code of phpspec/prophecy for AI

master 0da07c10d5fe cached
240 files
512.9 KB
133.7k tokens
1433 symbols
1 requests
Download .txt
Showing preview only (572K chars total). Download the full file or copy to clipboard to get everything.
Repository: phpspec/prophecy
Branch: master
Commit: 0da07c10d5fe
Files: 240
Total size: 512.9 KB

Directory structure:
gitextract_tlvewwen/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .php-cs-fixer.dist.php
├── CHANGES.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── composer.json
├── fixtures/
│   ├── AbstractBaseClassWithMethodWithReturnType.php
│   ├── ClassExtendAbstractWithMethodWithReturnType.php
│   ├── DnfArgumentType.php
│   ├── DnfReturnType.php
│   ├── EmptyClass.php
│   ├── EmptyInterface.php
│   ├── Enum.php
│   ├── FinalClass.php
│   ├── IntersectionArgumentType.php
│   ├── IntersectionReturnType.php
│   ├── MethodWithAdditionalParam.php
│   ├── MixedTypes.php
│   ├── ModifierInterface.php
│   ├── Named.php
│   ├── NeverType.php
│   ├── NullableArrayParameter.php
│   ├── NullableParameterTypeFalse.php
│   ├── NullableParameterTypeTrue.php
│   ├── NullableReturnTypeFalse.php
│   ├── NullableReturnTypeTrue.php
│   ├── OptionalDepsClass.php
│   ├── ReadOnlyClass.php
│   ├── ReturningFinalClass.php
│   ├── SelfReferencing.php
│   ├── SpecialMethods.php
│   ├── StandaloneParameterTypeFalse.php
│   ├── StandaloneParameterTypeNull.php
│   ├── StandaloneParameterTypeTrue.php
│   ├── StandaloneReturnTypeFalse.php
│   ├── StandaloneReturnTypeNull.php
│   ├── StandaloneReturnTypeTrue.php
│   ├── TentativeReturnTypeNull.php
│   ├── ThrowableInterface.php
│   ├── UnionArgumentTypeFalse.php
│   ├── UnionArgumentTypes.php
│   ├── UnionReturnTypeFalse.php
│   ├── UnionReturnTypes.php
│   ├── WithArguments.php
│   ├── WithCallableArgument.php
│   ├── WithFinalMethod.php
│   ├── WithFinalVirtuallyPrivateMethod.php
│   ├── WithPhpdocClass.php
│   ├── WithProtectedAbstractMethod.php
│   ├── WithReferences.php
│   ├── WithReturnTypehints.php
│   ├── WithStaticMethod.php
│   ├── WithTypehintedVariadicArgument.php
│   ├── WithVariadicArgument.php
│   └── WithVirtuallyPrivateMethod.php
├── phpstan-baseline.neon
├── phpstan.dist.neon
├── phpunit.xml.dist
├── spec/
│   └── Prophecy/
│       ├── Argument/
│       │   ├── ArgumentsWildcardSpec.php
│       │   └── Token/
│       │       ├── AnyValueTokenSpec.php
│       │       ├── AnyValuesTokenSpec.php
│       │       ├── ApproximateValueTokenSpec.php
│       │       ├── ArrayCountTokenSpec.php
│       │       ├── ArrayEntryTokenSpec.php
│       │       ├── ArrayEveryEntryTokenSpec.php
│       │       ├── CallbackTokenSpec.php
│       │       ├── ExactValueTokenSpec.php
│       │       ├── IdenticalValueTokenSpec.php
│       │       ├── InArrayTokenSpec.php
│       │       ├── LogicalAndTokenSpec.php
│       │       ├── LogicalNotTokenSpec.php
│       │       ├── NotInArrayTokenSpec.php
│       │       ├── ObjectStateTokenSpec.php
│       │       ├── StringContainsTokenSpec.php
│       │       └── TypeTokenSpec.php
│       ├── ArgumentSpec.php
│       ├── Call/
│       │   ├── CallCenterSpec.php
│       │   └── CallSpec.php
│       ├── Comparator/
│       │   ├── ClosureComparatorSpec.php
│       │   ├── FactorySpec.php
│       │   └── ProphecyComparatorSpec.php
│       ├── Doubler/
│       │   ├── CachedDoublerSpec.php
│       │   ├── ClassPatch/
│       │   │   ├── DisableConstructorPatchSpec.php
│       │   │   ├── KeywordPatchSpec.php
│       │   │   ├── MagicCallPatchSpec.php
│       │   │   ├── ProphecySubjectPatchSpec.php
│       │   │   ├── ReflectionClassNewInstancePatchSpec.php
│       │   │   ├── SplFileInfoPatchSpec.php
│       │   │   ├── ThrowablePatchSpec.php
│       │   │   └── TraversablePatchSpec.php
│       │   ├── DoublerSpec.php
│       │   ├── Generator/
│       │   │   ├── ClassCodeGeneratorSpec.php
│       │   │   ├── ClassCreatorSpec.php
│       │   │   └── Node/
│       │   │       ├── ArgumentNodeSpec.php
│       │   │       ├── ArgumentTypeNodeSpec.php
│       │   │       ├── ClassNodeSpec.php
│       │   │       ├── MethodNodeSpec.php
│       │   │       ├── ReturnTypeNodeSpec.php
│       │   │       └── Type/
│       │   │           ├── BuiltinTypeSpec.php
│       │   │           ├── IntersectionTypeSpec.php
│       │   │           ├── ObjectTypeSpec.php
│       │   │           └── UnionTypeSpec.php
│       │   ├── LazyDoubleSpec.php
│       │   └── NameGeneratorSpec.php
│       ├── Exception/
│       │   ├── Call/
│       │   │   └── UnexpectedCallExceptionSpec.php
│       │   ├── Doubler/
│       │   │   ├── ClassCreatorExceptionSpec.php
│       │   │   ├── ClassMirrorExceptionSpec.php
│       │   │   ├── ClassNotFoundExceptionSpec.php
│       │   │   ├── DoubleExceptionSpec.php
│       │   │   ├── InterfaceNotFoundExceptionSpec.php
│       │   │   ├── MethodNotExtendableExceptionSpec.php
│       │   │   └── MethodNotFoundExceptionSpec.php
│       │   ├── Prediction/
│       │   │   ├── AggregateExceptionSpec.php
│       │   │   ├── NoCallsExceptionSpec.php
│       │   │   ├── UnexpectedCallsCountExceptionSpec.php
│       │   │   └── UnexpectedCallsExceptionSpec.php
│       │   └── Prophecy/
│       │       ├── MethodProphecyExceptionSpec.php
│       │       └── ObjectProphecyExceptionSpec.php
│       ├── Prediction/
│       │   ├── CallPredictionSpec.php
│       │   ├── CallTimesPredictionSpec.php
│       │   ├── CallbackPredictionSpec.php
│       │   └── NoCallsPredictionSpec.php
│       ├── Promise/
│       │   ├── CallbackPromiseSpec.php
│       │   ├── ReturnArgumentPromiseSpec.php
│       │   ├── ReturnPromiseSpec.php
│       │   └── ThrowPromiseSpec.php
│       ├── Prophecy/
│       │   ├── MethodProphecySpec.php
│       │   ├── ObjectProphecySpec.php
│       │   └── RevealerSpec.php
│       ├── ProphetSpec.php
│       └── Util/
│           └── StringUtilSpec.php
├── src/
│   └── Prophecy/
│       ├── Argument/
│       │   ├── ArgumentsWildcard.php
│       │   └── Token/
│       │       ├── AnyValueToken.php
│       │       ├── AnyValuesToken.php
│       │       ├── ApproximateValueToken.php
│       │       ├── ArrayCountToken.php
│       │       ├── ArrayEntryToken.php
│       │       ├── ArrayEveryEntryToken.php
│       │       ├── CallbackToken.php
│       │       ├── ExactValueToken.php
│       │       ├── IdenticalValueToken.php
│       │       ├── InArrayToken.php
│       │       ├── LogicalAndToken.php
│       │       ├── LogicalNotToken.php
│       │       ├── NotInArrayToken.php
│       │       ├── ObjectStateToken.php
│       │       ├── StringContainsToken.php
│       │       ├── TokenInterface.php
│       │       └── TypeToken.php
│       ├── Argument.php
│       ├── Call/
│       │   ├── Call.php
│       │   └── CallCenter.php
│       ├── Comparator/
│       │   ├── ClosureComparator.php
│       │   ├── Factory.php
│       │   ├── FactoryProvider.php
│       │   └── ProphecyComparator.php
│       ├── Doubler/
│       │   ├── CachedDoubler.php
│       │   ├── ClassPatch/
│       │   │   ├── ClassPatchInterface.php
│       │   │   ├── DisableConstructorPatch.php
│       │   │   ├── KeywordPatch.php
│       │   │   ├── MagicCallPatch.php
│       │   │   ├── ProphecySubjectPatch.php
│       │   │   ├── ReflectionClassNewInstancePatch.php
│       │   │   ├── SplFileInfoPatch.php
│       │   │   ├── ThrowablePatch.php
│       │   │   └── TraversablePatch.php
│       │   ├── DoubleInterface.php
│       │   ├── Doubler.php
│       │   ├── Generator/
│       │   │   ├── ClassCodeGenerator.php
│       │   │   ├── ClassCreator.php
│       │   │   ├── ClassMirror.php
│       │   │   ├── Node/
│       │   │   │   ├── ArgumentNode.php
│       │   │   │   ├── ArgumentTypeNode.php
│       │   │   │   ├── ClassNode.php
│       │   │   │   ├── MethodNode.php
│       │   │   │   ├── ReturnTypeNode.php
│       │   │   │   ├── Type/
│       │   │   │   │   ├── BuiltinType.php
│       │   │   │   │   ├── IntersectionType.php
│       │   │   │   │   ├── ObjectType.php
│       │   │   │   │   ├── SimpleType.php
│       │   │   │   │   ├── TypeInterface.php
│       │   │   │   │   └── UnionType.php
│       │   │   │   └── TypeNodeAbstract.php
│       │   │   ├── ReflectionInterface.php
│       │   │   └── TypeHintReference.php
│       │   ├── LazyDouble.php
│       │   └── NameGenerator.php
│       ├── Exception/
│       │   ├── Call/
│       │   │   └── UnexpectedCallException.php
│       │   ├── Doubler/
│       │   │   ├── ClassCreatorException.php
│       │   │   ├── ClassMirrorException.php
│       │   │   ├── ClassNotFoundException.php
│       │   │   ├── DoubleException.php
│       │   │   ├── DoublerException.php
│       │   │   ├── InterfaceNotFoundException.php
│       │   │   ├── MethodNotExtendableException.php
│       │   │   ├── MethodNotFoundException.php
│       │   │   └── ReturnByReferenceException.php
│       │   ├── Exception.php
│       │   ├── InvalidArgumentException.php
│       │   ├── Prediction/
│       │   │   ├── AggregateException.php
│       │   │   ├── FailedPredictionException.php
│       │   │   ├── NoCallsException.php
│       │   │   ├── PredictionException.php
│       │   │   ├── UnexpectedCallsCountException.php
│       │   │   └── UnexpectedCallsException.php
│       │   └── Prophecy/
│       │       ├── MethodProphecyException.php
│       │       ├── ObjectProphecyException.php
│       │       └── ProphecyException.php
│       ├── PhpDocumentor/
│       │   ├── ClassAndInterfaceTagRetriever.php
│       │   ├── ClassTagRetriever.php
│       │   └── MethodTagRetrieverInterface.php
│       ├── Prediction/
│       │   ├── CallPrediction.php
│       │   ├── CallTimesPrediction.php
│       │   ├── CallbackPrediction.php
│       │   ├── NoCallsPrediction.php
│       │   └── PredictionInterface.php
│       ├── Promise/
│       │   ├── CallbackPromise.php
│       │   ├── PromiseInterface.php
│       │   ├── ReturnArgumentPromise.php
│       │   ├── ReturnPromise.php
│       │   └── ThrowPromise.php
│       ├── Prophecy/
│       │   ├── MethodProphecy.php
│       │   ├── ObjectProphecy.php
│       │   ├── ProphecyInterface.php
│       │   ├── ProphecySubjectInterface.php
│       │   ├── Revealer.php
│       │   └── RevealerInterface.php
│       ├── Prophet.php
│       └── Util/
│           ├── ExportUtil.php
│           └── StringUtil.php
└── tests/
    ├── Argument/
    │   └── Token/
    │       └── ExactValueTokenTest.php
    ├── Comparator/
    │   └── FactoryProviderTest.php
    ├── Doubler/
    │   ├── ClassPatch/
    │   │   └── MagicCallPatchTest.php
    │   └── Generator/
    │       ├── ClassMirrorTest.php
    │       └── Node/
    │           └── TypeNodeAbstractTest.php
    └── FunctionalTest.php

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

================================================
FILE: .editorconfig
================================================
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[.github/workflows/*.yml]
indent_size = 2


================================================
FILE: .gitattributes
================================================
/.editorconfig    export-ignore
/.gitattributes   export-ignore
/.gitignore       export-ignore
/CONTRIBUTING.md  export-ignore
/.github/         export-ignore
/fixtures/        export-ignore
/phpunit.xml.dist export-ignore
/phpstan*.neon    export-ignore
/spec/            export-ignore
/tests/           export-ignore


================================================
FILE: .github/workflows/build.yml
================================================
name: Build

on:
  push:
    branches: [master]
  pull_request:
  release:
    types: [created]

jobs:
  tests:
    runs-on: ubuntu-latest
    name: Build and test
    continue-on-error: ${{ matrix.experimental || false }}
    strategy:
      fail-fast: false
      matrix:
        php: ["8.2", "8.3", "8.4"]
        composer-flags: [ "" ]
        experimental: [ false ]
        include:
          - php: 8.2
            composer-flags: "--prefer-lowest"
          - php: "8.5" # TODO move that to a normal job once phpspec supports PHP 8.5
            composer-flags: "--ignore-platform-req=php+"
          - php: nightly
            composer-flags: "--ignore-platform-req=php+"
            experimental: true

    steps:
      -   uses: actions/checkout@v5

      -   name: Set up PHP
          uses: shivammathur/setup-php@v2
          with:
            php-version: "${{ matrix.php }}"
            coverage: none

      -   name: Install dependencies
          run: COMPOSER_ROOT_VERSION=dev-master composer update ${{ matrix.composer-flags }} --no-scripts
          id: end-of-setup

      -   name: Run tests (phpspec)
          run: ./vendor/bin/phpspec run --format=dot
          if: always() && steps.end-of-setup.outcome == 'success'

      -   name: Run tests (phpunit)
          run: ./vendor/bin/phpunit
          if: always() && steps.end-of-setup.outcome == 'success'

  phpstan:
    runs-on: ubuntu-latest
    name: Static analysis
    steps:
      - uses: actions/checkout@v5
      - name: Set up PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.3"
          coverage: none
      - name: Install dependencies
        run: COMPOSER_ROOT_VERSION=dev-master composer update --no-scripts
      - run: ./vendor/bin/phpstan

  coding-standards:
    runs-on: ubuntu-latest
    name: Coding standards
    steps:
      - uses: actions/checkout@v5
      - name: Set up PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.3"
          coverage: none
      - name: Install dependencies
        run: COMPOSER_ROOT_VERSION=dev-master composer update --no-scripts
      - run: composer cs:check -- --ansi


================================================
FILE: .gitignore
================================================
*.tgz
*.phar
/.php-cs-fixer.cache
/composer.lock
/dev-tools/vendor/
/vendor
/phpstan.neon
/phpunit.xml
/.phpunit.result.cache
/.phpunit.cache/


================================================
FILE: .php-cs-fixer.dist.php
================================================
<?php

declare(strict_types=1);

return (new PhpCsFixer\Config())
    ->setRiskyAllowed(false)
    ->setRules([
        '@PER-CS' => true,
        'array_syntax' => false,
        'braces_position' => [
            'control_structures_opening_brace' => 'same_line',
        ],
        'no_unused_imports' => true,
        'concat_space' => ['spacing' => 'none'],
        'method_argument_space' => ['on_multiline' => 'ignore'],
        // Since PHP 7.2 is supported we can't add trailing commas in arguments, parameters and match
        'trailing_comma_in_multiline' => ['elements' => ['arrays']],
        'modifier_keywords' => false,
    ])
    ->setFinder(
        (new PhpCsFixer\Finder())
            ->ignoreDotFiles(false)
            ->ignoreVCSIgnored(true)
            ->exclude(['fixtures'])
            ->notPath(['phpstan-baseline.php'])
            ->in(__DIR__)
    )
;


================================================
FILE: CHANGES.md
================================================
Unreleased
==========

1.26.0
======

**Added:**

* Add support for `phpdocumentor/reflection-docblock` v6 (@mspirkov)

1.25.0
======

**Added:**

* Add support for PHPUnit 13 (@Jean85)

1.24.0
======

**Added:**

* Add support for PHP 8.5 (@andypost)

1.23.1
======

**Changed:**

* Refactor the ProphecyComparator to use composition instead of extending internal comparator classes (@stof)

1.23.0
======

**Removed:**

* Remove support for PHP lower than 8.2 (@Nek-)

**Added:**

* Add support for doubling classes using intersection types and DNF types (@Nek-)

**Fixed:**

* Fix deprecation for `SplObjectStorage` changes in PHP 8.5 (@Nek-)

**Changed:**

* Improve error message for unsupported default return values (@stof)

1.22.0
======

**Removed:**

* Support for PHP 7.2 and 7.3 (@jean85)

1.21.0
======

**Added:**

* Add support for PHPUnit 12 (@jean85)

1.20.0
======

**Added:**

* Add support for PHP 8.4 (@andypost)

**Fixed:**

* Fix support for doubling methods using an enum case as default value of a parameter (@jdreesen)
* Fix deprecation when doubling a class with constructor parameters (@singinwhale, @W0rma)
* Fix deprecation warning when using phpdocumentor/reflection-docblock 5.4+ (@jrfnl)

1.19.0
======

**Added:**

* Allow sebastian/comparator and sebastian/recursion-context 6

1.18.0 / 2023-12-07
===================

* [added] Add support for PHP 8.3 [@rajeshreeputra]
* [changed] Improve the error when using return types that Prophecy does not support for mocking [@stof]
* [changed] Add more precise type for static analysis [@stof]
* [fixed] Error when comparing object arguments with integers [@lucassabreu]
* [changed] Add PHP 8.2 to test matrix [@Jean85]
* [Added] Allow sebastian/comparator and sebastian/recursion-context 5, and phpunit/phpunit 10 [@Jean85]
* [docs] Switch travis status badge to GHA one [@michalbundyra]

1.17.0 / 2023-02-02
===================

* [added] Add generic types for ProphecyInterface and ObjectProphecy [@stof]
* [added] Add the conditional return type for `ObjectProphecy::getMethodProphecies` [@stof]
* [added] Add support for doctrine/instantiator 2.0 [@stof]
* [added] Add the ability to customize the __toString representation of a CallbackToken [@ian-zunderdorp]
* [changed] Remove support for instantiating a MethodProphecy without its arguments [@stof]
* [deprecated] Deprecate `\Prophecy\Comparator\Factory` as `sebastian/comparator` v5 makes it parent class final [@stof]

1.16.0 / 2022/11/29
===================

* [added] Allow installing with PHP 8.2 [@gquemener]
* [added] Use shorter object IDs for object comparison [@TysonAndre]
* [added] Support standalone false,true and null types [@kschatzle]
* [added] Support doubling readonly classes [@gquemener]
* [fixed] Remove workarounds for unsupported HHVM [@TysonAndre]
* [fixed] Clear error message when doubling DNF types [@kschatzle]


1.15.0 / 2021/12/08
===================

* [added] Support for the `static` return type [@denis-rolling-scopes]
* [fixed] Add return types for Comparator implementations to avoid deprecation warnings from Symfony's DebugClassLoader [@stof]

1.14.0 / 2021/09/16
===================

* [added] Support for static closures in will and should [@ntzm]
* [added] Allow install on PHP 8.1 (with test suite fixes) [@javer]
* [added] Support for the 'never' return type [@ciaranmcnulty]
* [fixed] Better error message when doubling intersection return types [@ciaranmcnulty]

1.13.0 / 2021/03/17
===================

* [added] willYield can now specify a return value [@camilledejoye]
* [added] Prophecy exception interfaces are explicitly Throwable [@ciaranmcnulty]
* [fixed] Argument::in() and notIn() now marked as static [@tyteen4a03]
* [fixed] Can now double unions containing false [@ciaranmcnulty]
* [fixed] Virtual magic methods with arguments are now doublable in PHP 8 [@ciaranmcnulty]

1.12.2 / 2020/12/19
===================

* [fixed] MethodNotFoundException sometimes thrown with wrong class attached [@ciaranmcnulty]

1.12.1 / 2020/10/29
===================

* [fixed] Incorrect handling of inherited 'self' return types [@ciaranmcnulty]

1.12.0 / 2020/10/28
===================

* [added] PHP 8 support [@ciaranmcnulty]
* [added] Argument::in() and Argument::notIn() [@viniciusalonso]
* [added] Support for union and mixed types [@ciaranmcnulty]
* [fixed] Issues caused by introduction of named parameters [@ciaranmcnulty]
* [fixed] Issues caused by stricter rounding [@ciaranmcnulty]

1.11.1 / 2020/07/08
===================

* [fixed] can't double objects with `self` type hints (@greg0ire)
* [fixed] cloned doubes were not loosely comparable (@tkulka)

1.11.0 / 2020/07/07
===================

* [changed] dropped support for PHP versions earlier than 7.2 (@ciaranmcnulty)
* [fixed] removed use of Reflection APIs deprecated in PHP 8.0 (@Ayesh)

1.10.3 / 2020/03/05
===================

* [fixed] removed fatal error when phpdocumentor/reflection-docblock 5 parses an invalid `@method` tag (@stof)

1.10.2 / 2020/01/20
===================

* [added] support for new versions of `sebastian/comparator` and `sebastian/recursion-context` (@sebastianbergmann)

1.10.1 / 2019/12/22
===================

* [fixed] identical callables no longer match as arguments (@ciaranmcnulty)

1.10.0 / 2019/12/17
===================

* [added] shouldHaveBeenCalled evaluation happens later so un-stubbed calls don't throw (@elvetemedve)
* [added] methods can now be doubled case-insensitively to match PHP semantics (@michalbundyra)
* [fixed] reduced memory usage by optimising CachedDoubler (@DonCallisto)
* [fixed] removed fatal error nesting level when comparing large objects (@scroach)

1.9.0 / 2019/10/03
==================

* [added] Add willYield feature to Method Prophecy(@tkotosz)
* [fixed] Allow `MethodProphecy::willThrow()` to accept Throwable as string (@timoschinkel )
* [fixed] Allow new version of phpdocumentor/reflection-docblock (@ricpelo)

1.8.1 / 2019/06/13
==================

* [fixed] Don't try to patch final constructors (@NiR)

1.8.0 / 2018/08/05
==================

* Support for void return types without explicit will (@crellbar)
* Clearer error message for unexpected method calls (@meridius)
* Clearer error message for aggregate exceptions (@meridius)
* More verbose `shouldBeCalledOnce` expectation (@olvlvl)
* Ability to double Throwable, or methods that extend it (@ciaranmcnulty)
* [fixed] Doubling methods where class has additional arguments to interface (@webimpress)
* [fixed] Doubling methods where arguments are nullable but default is not null (@webimpress)
* [fixed] Doubling magic methods on parent class (@dsnopek)
* [fixed] Check method predictions only once (@dontub)
* [fixed] Argument::containingString throwing error when called with non-string (@dcabrejas)

1.7.6 / 2018/04/18
==================

* Allow sebastian/comparator ^3.0 (@sebastianbergmann)

1.7.5 / 2018/02/11
==================

* Support for object return type hints (thanks @greg0ire)

1.7.4 / 2018/02/11
==================

* Fix issues with PHP 7.2 (thanks @greg0ire)
* Support object type hints in PHP 7.2 (thanks @@jansvoboda11)

1.7.3 / 2017/11/24
==================

* Fix SplInfo ClassPatch to work with Symfony 4 (Thanks @gnugat)

1.7.2 / 2017-10-04
==================

* Reverted "check method predictions only once" due to it breaking Spies

1.7.1 / 2017-10-03
==================

* Allow PHP5 keywords methods generation on PHP7 (thanks @bycosta)
* Allow reflection-docblock v4 (thanks @GrahamCampbell)
* Check method predictions only once (thanks @dontub)
* Escape file path sent to \SplFileObjectConstructor when running on Windows (thanks @danmartin-epiphany)

1.7.0 / 2017-03-02
==================

* Add full PHP 7.1 Support (thanks @prolic)
* Allow `sebastian/comparator ^2.0` (thanks @sebastianbergmann)
* Allow `sebastian/recursion-context ^3.0` (thanks @sebastianbergmann)
* Allow `\Error` instances in `ThrowPromise` (thanks @jameshalsall)
* Support `phpspec/phpspect ^3.2` (thanks @Sam-Burns)
* Fix failing builds (thanks @Sam-Burns)

1.6.2 / 2016-11-21
==================

* Added support for detecting @method on interfaces that the class itself implements, or when the stubbed class is an interface itself (thanks @Seldaek)
* Added support for sebastian/recursion-context 2 (thanks @sebastianbergmann)
* Added testing on PHP 7.1 on Travis (thanks @danizord)
* Fixed the usage of the phpunit comparator (thanks @Anyqax)

1.6.1 / 2016-06-07
==================

  * Ignored empty method names in invalid `@method` phpdoc
  * Fixed the mocking of SplFileObject
  * Added compatibility with phpdocumentor/reflection-docblock 3

1.6.0 / 2016-02-15
==================

  * Add Variadics support (thanks @pamil)
  * Add ProphecyComparator for comparing objects that need revealing (thanks @jon-acker)
  * Add ApproximateValueToken (thanks @dantleech)
  * Add support for 'self' and 'parent' return type (thanks @bendavies)
  * Add __invoke to allowed reflectable methods list (thanks @ftrrtf)
  * Updated ExportUtil to reflect the latest changes by Sebastian (thanks @jakari)
  * Specify the required php version for composer (thanks @jakzal)
  * Exclude 'args' in the generated backtrace (thanks @oradwell)
  * Fix code generation for scalar parameters (thanks @trowski)
  * Fix missing sprintf in InvalidArgumentException __construct call (thanks @emmanuelballery)
  * Fix phpdoc for magic methods (thanks @Tobion)
  * Fix PhpDoc for interfaces usage (thanks @ImmRanneft)
  * Prevent final methods from being manually extended (thanks @kamioftea)
  * Enhance exception for invalid argument to ThrowPromise (thanks @Tobion)

1.5.0 / 2015-04-27
==================

  * Add support for PHP7 scalar type hints (thanks @trowski)
  * Add support for PHP7 return types (thanks @trowski)
  * Update internal test suite to support PHP7

1.4.1 / 2015-04-27
==================

  * Fixed bug in closure-based argument tokens (#181)

1.4.0 / 2015-03-27
==================

  * Fixed errors in return type phpdocs (thanks @sobit)
  * Fixed stringifying of hash containing one value (thanks @avant1)
  * Improved clarity of method call expectation exception (thanks @dantleech)
  * Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart)
  * Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty)
  * Support for mocking classes with methods that return references (thanks @edsonmedina)
  * Improved object comparison (thanks @whatthejeff)
  * Adopted '^' in composer dependencies (thanks @GrahamCampbell)
  * Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff)
  * Magic methods are now filtered for keywords (thanks @seagoj)
  * More readable errors for failure when expecting single calls (thanks @dantleech)

1.3.1 / 2014-11-17
==================

  * Fix the edge case when failed predictions weren't recorded for `getCheckedPredictions()`

1.3.0 / 2014-11-14
==================

  * Add a way to get checked predictions with `MethodProphecy::getCheckedPredictions()`
  * Fix HHVM compatibility
  * Remove dead code (thanks @stof)
  * Add support for DirectoryIterators (thanks @shanethehat)

1.2.0 / 2014-07-18
==================

  * Added support for doubling magic methods documented in the class phpdoc (thanks @armetiz)
  * Fixed a segfault appearing in some cases (thanks @dmoreaulf)
  * Fixed the doubling of methods with typehints on non-existent classes (thanks @gquemener)
  * Added support for internal classes using keywords as method names (thanks @milan)
  * Added IdenticalValueToken and Argument::is (thanks @florianv)
  * Removed the usage of scalar typehints in HHVM as HHVM 3 does not support them anymore in PHP code (thanks @whatthejeff)

1.1.2 / 2014-01-24
==================

  * Spy automatically promotes spied method call to an expected one

1.1.1 / 2014-01-15
==================

  * Added support for HHVM

1.1.0 / 2014-01-01
==================

  * Changed the generated class names to use a static counter instead of a random number
  * Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein)
  * Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein)
  * Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty)
  * Added support for properties in ObjectStateToken (thanks @adrienbrault)
  * Added support for mocking classes with a final constructor (thanks @ciaranmcnulty)
  * Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault)
  * Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein)
  * Added StringContainToken and Argument::containingString() (thanks @peterjmit)
  * Added ``shouldNotHaveBeenCalled`` on the MethodProphecy (thanks @ciaranmcnulty)
  * Fixed the comparison of objects in ExactValuetoken (thanks @sstok)
  * Deprecated ``shouldNotBeenCalled`` in favor of ``shouldNotHaveBeenCalled``

1.0.4 / 2013-08-10
==================

  * Better randomness for generated class names (thanks @sstok)
  * Add support for interfaces into TypeToken and Argument::type() (thanks @sstok)
  * Add support for old-style (method name === class name) constructors (thanks @l310 for report)

1.0.3 / 2013-07-04
==================

  * Support callable typehints (thanks @stof)
  * Do not attempt to autoload arrays when generating code (thanks @MarcoDeBortoli)
  * New ArrayEntryToken (thanks @kagux)

1.0.2 / 2013-05-19
==================

  * Logical `AND` token added (thanks @kagux)
  * Logical `NOT` token added (thanks @kagux)
  * Add support for setting custom constructor arguments
  * Properly stringify hashes
  * Record calls that throw exceptions
  * Migrate spec suite to PhpSpec 2.0

1.0.1 / 2013-04-30
==================

  * Fix broken UnexpectedCallException message
  * Trim AggregateException message

1.0.0 / 2013-04-29
==================

  * Improve exception messages

1.0.0-BETA2 / 2013-04-03
========================

  * Add more debug information to CallTimes and Call prediction exception messages
  * Fix MethodNotFoundException wrong namespace (thanks @gunnarlium)
  * Fix some typos in the exception messages (thanks @pborreli)

1.0.0-BETA1 / 2013-03-25
========================

  * Initial release


================================================
FILE: CONTRIBUTING.md
================================================
Contributing
------------

Prophecy is an open source, community-driven project. If you'd like to contribute,
feel free to do this, but remember to follow these few simple rules:

- Make your feature addition or bug fix,
- Add either specs or examples for any changes you're making (bugfixes or additions)
  (please look into `spec/` folder for some examples). This is important so we don't break
  it in a future version unintentionally,
- Commit your code, but do not mess with `CHANGES.md`,

Running tests
-------------

Make sure that you don't break anything with your changes by running:

```bash
$> composer install --prefer-dist
$> vendor/bin/phpspec run
$> vendor/bin/phpunit
```


================================================
FILE: LICENSE
================================================
Copyright (c) 2013 Konstantin Kudryashov <ever.zet@gmail.com>
Copyright (c) 2013 Marcello Duarte <marcello.duarte@gmail.com>

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: README.md
================================================
# Prophecy

[![Stable release](https://poser.pugx.org/phpspec/prophecy/version.svg)](https://packagist.org/packages/phpspec/prophecy)
[![Build](https://github.com/phpspec/prophecy/actions/workflows/build.yml/badge.svg)](https://github.com/phpspec/prophecy/actions/workflows/build.yml)

Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking
framework. Though initially it was created to fulfil phpspec2 needs, it is flexible
enough to be used inside any testing framework out there with minimal effort.

## A simple example

```php
<?php

class UserTest extends PHPUnit\Framework\TestCase
{
    private $prophet;

    public function testPasswordHashing()
    {
        $hasher = $this->prophet->prophesize('App\Security\Hasher');
        $user   = new App\Entity\User($hasher->reveal());

        $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass');

        $user->setPassword('qwerty');

        $this->assertEquals('hashed_pass', $user->getPassword());
    }

    protected function setUp()
    {
        $this->prophet = new \Prophecy\Prophet;
    }

    protected function tearDown()
    {
        $this->prophet->checkPredictions();
    }
}
```

## Installation

### Prerequisites

Prophecy requires PHP 7.2.0 or greater.

### Setup through composer

First, add Prophecy to the list of dependencies inside your `composer.json`:

```json
{
    "require-dev": {
        "phpspec/prophecy": "~1.0"
    }
}
```

Then simply install it with composer:

```bash
$> composer install --prefer-dist
```

You can read more about Composer on its [official webpage](http://getcomposer.org).

## How to use it

First of all, in Prophecy every word has a logical meaning, even the name of the library
itself (Prophecy). When you start feeling that, you'll become very fluid with this
tool.

For example, Prophecy has been named that way because it concentrates on describing the future
behavior of objects with very limited knowledge about them. But as with any other prophecy,
those object prophecies can't create themselves - there should be a Prophet:

```php
$prophet = new Prophecy\Prophet;
```

The Prophet creates prophecies by *prophesizing* them:

```php
$prophecy = $prophet->prophesize();
```

The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes,
that's your specific object prophecy, which describes how your object would behave
in the near future. But first, you need to specify which object you're talking about,
right?

```php
$prophecy->willExtend('stdClass');
$prophecy->willImplement('SessionHandlerInterface');
```

There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells
object prophecy that our object should extend a specific class. The second one says that
it should implement some interface. Obviously, objects in PHP can implement multiple
interfaces, but extend only one parent class.

### Dummies

Ok, now we have our object prophecy. What can we do with it? First of all, we can get
our object *dummy* by revealing its prophecy:

```php
$dummy = $prophecy->reveal();
```

The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend
and/or implement preset classes/interfaces by overriding all their public methods. The key
point about dummies is that they do not hold any logic - they just do nothing. Any method
of the dummy will always return `null` and the dummy will never throw any exceptions.
Dummy is your friend if you don't care about the actual behavior of this double and just need
a token object to satisfy a method typehint.

You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still
assigned to `$prophecy` variable and in order to manipulate with your expectations, you
should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your
prophecy.

### Stubs

Ok, now we know how to create basic prophecies and reveal dummies from them. That's
awesome if we don't care about our _doubles_ (objects that reflect originals)
interactions. If we do, we need to use *stubs* or *mocks*.

A stub is an object double, which doesn't have any expectations about the object behavior,
but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic,
but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called
method signature does different things (has logic). To create stubs in Prophecy:

```php
$prophecy->read('123')->willReturn('value');
```

Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this
call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific
method with arguments prophecy. Method prophecies give you the ability to create method
promises or predictions. We'll talk about method predictions later in the _Mocks_ section.

#### Promises

Promises are logical blocks, that represent your fictional methods in prophecy terms
and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method.
As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple
shortcut to:

```php
$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value')));
```

This promise will cause any call to our double's `read()` method with exactly one
argument - `'123'` to always return `'value'`. But that's only for this
promise, there's plenty others you can use:

- `ReturnPromise` or `->willReturn(1)` - returns a value from a method call
- `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call
- `ThrowPromise` or `->willThrow($exception)` - causes the method to throw specific exception
- `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic

Keep in mind, that you can always add even more promises by implementing
`Prophecy\Promise\PromiseInterface`.

#### Method prophecies idempotency

Prophecy enforces same method prophecies and, as a consequence, same promises and
predictions for the same method calls with the same arguments. This means:

```php
$methodProphecy1 = $prophecy->read('123');
$methodProphecy2 = $prophecy->read('123');
$methodProphecy3 = $prophecy->read('321');

$methodProphecy1 === $methodProphecy2;
$methodProphecy1 !== $methodProphecy3;
```

That's interesting, right? Now you might ask me how would you define more complex
behaviors where some method call changes behavior of others. In PHPUnit or Mockery
you do that by predicting how many times your method will be called. In Prophecy,
you'll use promises for that:

```php
$user->getName()->willReturn(null);

// For PHP 5.4
$user->setName('everzet')->will(function () {
    $this->getName()->willReturn('everzet');
});

// For PHP 5.3
$user->setName('everzet')->will(function ($args, $user) {
    $user->getName()->willReturn('everzet');
});

// Or
$user->setName('everzet')->will(function ($args) use ($user) {
    $user->getName()->willReturn('everzet');
});
```

And now it doesn't matter how many times or in which order your methods are called.
What matters is their behaviors and how well you faked it.

Note: If the method is called several times, you can use the following syntax to return different
values for each call:

```php
$prophecy->read('123')->willReturn(1, 2, 3);
```

This feature is actually not recommended for most cases. Relying on the order of
calls for the same arguments tends to make test fragile, as adding one more call
can break everything.

#### Arguments wildcarding

The previous example is awesome (at least I hope it is for you), but that's not
optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better
way? In fact there is, but it involves understanding what this `'everzet'`
actually is.

You see, even if method arguments used during method prophecy creation look
like simple method arguments, in reality they are not. They are argument token
wildcards.  As a matter of fact, `->setName('everzet')` looks like a simple call just
because Prophecy automatically transforms it under the hood into:

```php
$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet'));
```

Those argument tokens are simple PHP classes, that implement
`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments
with your expectations. And yes, those classnames are damn big. That's why there's a
shortcut class `Prophecy\Argument`, which you can use to create tokens like that:

```php
use Prophecy\Argument;

$user->setName(Argument::exact('everzet'));
```

`ExactValueToken` is not very useful in our case as it forced us to hardcode the username.
That's why Prophecy comes bundled with a bunch of other tokens:

- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value
- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value
- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or
  classname
- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns
  a specific value
- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback
- `AnyValueToken` or `Argument::any()` - matches any argument
- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature
- `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains a specific string value
- `InArrayToken` or `Argument::in($array)` - checks if value is in array
- `NotInArrayToken` or `Argument::notIn($array)` - checks if value is not in array

And you can add even more by implementing `TokenInterface` with your own custom classes.

So, let's refactor our initial `{set,get}Name()` logic with argument tokens:

```php
use Prophecy\Argument;

$user->getName()->willReturn(null);

// For PHP 5.4
$user->setName(Argument::type('string'))->will(function ($args) {
    $this->getName()->willReturn($args[0]);
});

// For PHP 5.3
$user->setName(Argument::type('string'))->will(function ($args, $user) {
    $user->getName()->willReturn($args[0]);
});

// Or
$user->setName(Argument::type('string'))->will(function ($args) use ($user) {
    $user->getName()->willReturn($args[0]);
});
```

That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it.
We've just described how our stub object should behave, even though the original object could have
no behavior whatsoever.

One last bit about arguments now. You might ask, what happens in case of:

```php
use Prophecy\Argument;

$user->getName()->willReturn(null);

// For PHP 5.4
$user->setName(Argument::type('string'))->will(function ($args) {
    $this->getName()->willReturn($args[0]);
});

// For PHP 5.3
$user->setName(Argument::type('string'))->will(function ($args, $user) {
    $user->getName()->willReturn($args[0]);
});

// Or
$user->setName(Argument::type('string'))->will(function ($args) use ($user) {
    $user->getName()->willReturn($args[0]);
});

$user->setName(Argument::any())->will(function () {
});
```

Nothing. Your stub will continue behaving the way it did before. That's because of how
arguments wildcarding works. Every argument token type has a different score level, which
wildcard then uses to calculate the final arguments match score and use the method prophecy
promise that has the highest score. In this case, `Argument::type()` in case of success
scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first
`setName()` method prophecy and its promise. The simple rule of thumb - more precise token
always wins.

#### Getting stub objects

Ok, now we know how to define our prophecy method promises, let's get our stub from
it:

```php
$stub = $prophecy->reveal();
```

As you might see, the only difference between how we get dummies and stubs is that with
stubs we describe every object conversation instead of just agreeing with `null` returns
(object being *dummy*). As a matter of fact, after you define your first promise
(method call), Prophecy will force you to define all the communications - it throws
the `UnexpectedCallException` for any call you didn't describe with object prophecy before
calling it on a stub.

### Mocks

Now we know how to define doubles without behavior (dummies) and doubles with behavior, but
no expectations (stubs). What's left is doubles for which we have some expectations. These
are called mocks and in Prophecy they look almost exactly the same as stubs, except that
they define *predictions* instead of *promises* on method prophecies:

```php
$entityManager->flush()->shouldBeCalled();
```

#### Predictions

The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy.
Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime
of your doubles, Prophecy records every single call you're making against it inside your
code. After that, Prophecy can use this collected information to check if it matches defined
predictions. You can assign predictions to method prophecies using the
`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact,
the `shouldBeCalled()` method we used earlier is just a shortcut to:

```php
$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction());
```

It checks if your method of interest (that matches both the method name and the arguments wildcard)
was called 1 or more times. If the prediction failed then it throws an exception. When does this
check happen? Whenever you call `checkPredictions()` on the main Prophet object:

```php
$prophet->checkPredictions();
```

In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions
are defined, it would do nothing. So it won't harm to call it after every test.

There are plenty more predictions you can play with:

- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times
- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called
- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called
  `$count` times
- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback

Of course, you can always create your own custom prediction any time by implementing
`PredictionInterface`.

### Spies

The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous
section, Prophecy records every call made during the double's entire lifetime. This means
you don't need to record predictions in order to check them. You can also do it
manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method:

```php
$em = $prophet->prophesize('Doctrine\ORM\EntityManager');

$controller->createUser($em->reveal());

$em->flush()->shouldHaveBeenCalled();
```

Such manipulation with doubles is called spying. And with Prophecy it just works.


## FAQ

### Can I call the original methods on a prophesized class?

Prophecy does not support calling the original methods on a phrophesized class. If you find yourself needing to mock some methods of a class while calling the original version of other methods, it's likely a sign that your class violates the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) and should be refactored.


================================================
FILE: composer.json
================================================
{
    "name":         "phpspec/prophecy",
    "description":  "Highly opinionated mocking framework for PHP 5.3+",
    "keywords":     ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy", "dev"],
    "homepage":     "https://github.com/phpspec/prophecy",
    "type":         "library",
    "license":      "MIT",
    "authors":      [
        {
            "name":      "Konstantin Kudryashov",
            "email":     "ever.zet@gmail.com",
            "homepage":  "http://everzet.com"
        },
        {
            "name":      "Marcello Duarte",
            "email":     "marcello.duarte@gmail.com"
        }
    ],

    "require": {
        "php":                               "8.2.* || 8.3.* || 8.4.* || 8.5.*",
        "phpdocumentor/reflection-docblock": "^5.2 || ^6.0",
        "sebastian/comparator":              "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0",
        "doctrine/instantiator":             "^1.2 || ^2.0",
        "sebastian/recursion-context":       "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0",
        "symfony/deprecation-contracts":     "^2.5 || ^3.1"
    },

    "require-dev": {
        "php-cs-fixer/shim": "^3.93.1",
        "phpspec/phpspec": "^6.0 || ^7.0 || ^8.0",
        "phpstan/phpstan": "^2.1.13, <2.1.34 || ^2.1.39",
        "phpunit/phpunit": "^11.0 || ^12.0 || ^13.0"
    },

    "autoload": {
        "psr-4": {
            "Prophecy\\": "src/Prophecy"
        }
    },

    "autoload-dev": {
        "psr-4": {
            "Fixtures\\Prophecy\\": "fixtures",
            "Tests\\Prophecy\\": "tests"
        }
    },

    "scripts": {
        "cs:check": "@php php-cs-fixer check --verbose --diff",
        "cs:fix": "@php php-cs-fixer fix",
        "phpstan": "phpstan analyse",
        "phpstan:baseline": "phpstan analyse --generate-baseline"
    },

    "scripts-descriptions": {
        "cs:check": "Check coding standards",
        "cs:fix": "Fix coding standards",
        "phpstan": "Run PHPStan analysis",
        "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible"
    },

    "extra": {
        "branch-alias": {
            "dev-master": "1.x-dev"
        }
    }
}


================================================
FILE: fixtures/AbstractBaseClassWithMethodWithReturnType.php
================================================
<?php

declare(strict_types=1);

namespace Fixtures\Prophecy;

abstract class AbstractBaseClassWithMethodWithReturnType
{
    public function returnSelf(?\DateTimeInterface $test): self
    {
    }
}


================================================
FILE: fixtures/ClassExtendAbstractWithMethodWithReturnType.php
================================================
<?php

declare(strict_types=1);

namespace Fixtures\Prophecy;

class ClassExtendAbstractWithMethodWithReturnType extends AbstractBaseClassWithMethodWithReturnType
{
}


================================================
FILE: fixtures/DnfArgumentType.php
================================================
<?php

namespace Fixtures\Prophecy;

class DnfArgumentType
{
    public function doSomething ((A&B)|C $foo)
    {

    }
}


================================================
FILE: fixtures/DnfReturnType.php
================================================
<?php

namespace Fixtures\Prophecy;

class DnfReturnType
{
    public function doSomething () : (A&B)|C
    {

    }
}


================================================
FILE: fixtures/EmptyClass.php
================================================
<?php

namespace Fixtures\Prophecy;

class EmptyClass
{
}


================================================
FILE: fixtures/EmptyInterface.php
================================================
<?php

namespace Fixtures\Prophecy;

interface EmptyInterface
{
}


================================================
FILE: fixtures/Enum.php
================================================
<?php

namespace Fixtures\Prophecy;

enum Enum {
    case Clubs;
    case Diamonds;
    case Hearts;
    case Spades;
}


================================================
FILE: fixtures/FinalClass.php
================================================
<?php

namespace Fixtures\Prophecy;

final class FinalClass
{
}


================================================
FILE: fixtures/IntersectionArgumentType.php
================================================
<?php

namespace Fixtures\Prophecy;

class IntersectionArgumentType
{
    public function doSomething (Bar&Baz $foo)
    {

    }
}


================================================
FILE: fixtures/IntersectionReturnType.php
================================================
<?php

namespace Fixtures\Prophecy;

class IntersectionReturnType
{
    public function doSomething () : Bar&Baz
    {

    }
}


================================================
FILE: fixtures/MethodWithAdditionalParam.php
================================================
<?php

namespace Fixtures\Prophecy;

abstract class MethodWithAdditionalParam extends WithArguments implements Named
{
    abstract public function getName($name = null);

    public function methodWithoutTypeHints($arg, $arg2 = null)
    {
    }
}


================================================
FILE: fixtures/MixedTypes.php
================================================
<?php

namespace Fixtures\Prophecy;

class MixedTypes
{
    public function doSomething(mixed $arg1): mixed
    {

    }
}


================================================
FILE: fixtures/ModifierInterface.php
================================================
<?php

namespace Fixtures\Prophecy;

interface ModifierInterface
{
    public function isAbstract();

    public function getVisibility();
}


================================================
FILE: fixtures/Named.php
================================================
<?php

namespace Fixtures\Prophecy;

interface Named
{
    public function getName();
}


================================================
FILE: fixtures/NeverType.php
================================================
<?php

namespace Fixtures\Prophecy;

class NeverType
{
    public function doSomething(): never
    {
        throw new \RuntimeException();
    }
}


================================================
FILE: fixtures/NullableArrayParameter.php
================================================
<?php

namespace Fixtures\Prophecy;

class NullableArrayParameter
{
    public function iHaveNullableArrayParameterWithNotNullDefaultValue(?array $arr = array())
    {
    }
}


================================================
FILE: fixtures/NullableParameterTypeFalse.php
================================================
<?php

namespace Fixtures\Prophecy;

class NullableParameterTypeFalse
{
    public function method(?false $arg)
    {
        return $arg;
    }
}


================================================
FILE: fixtures/NullableParameterTypeTrue.php
================================================
<?php

namespace Fixtures\Prophecy;

class NullableParameterTypeTrue
{
    public function method(?true $arg)
    {
        return $arg;
    }
}


================================================
FILE: fixtures/NullableReturnTypeFalse.php
================================================
<?php

namespace Fixtures\Prophecy;

class NullableReturnTypeFalse
{
    public function method(): ?false
    {
        return false;
    }
}


================================================
FILE: fixtures/NullableReturnTypeTrue.php
================================================
<?php

namespace Fixtures\Prophecy;

class NullableReturnTypeTrue
{
    public function method(): ?true
    {
        return true;
    }
}


================================================
FILE: fixtures/OptionalDepsClass.php
================================================
<?php

namespace Fixtures\Prophecy;

use I\Simply;

class OptionalDepsClass
{
    public function iHaveAStrangeTypeHintedArg(\I\Simply\Am\Nonexistent $class)
    {
    }

    public function iHaveAnEvenStrangerTypeHintedArg(Simply\Am\Not $class)
    {
    }
}


================================================
FILE: fixtures/ReadOnlyClass.php
================================================
<?php

namespace Fixtures\Prophecy;

readonly class ReadOnlyClass
{
}


================================================
FILE: fixtures/ReturningFinalClass.php
================================================
<?php

namespace Fixtures\Prophecy;

interface ReturningFinalClass
{
    public function doSomething(): FinalClass;
}


================================================
FILE: fixtures/SelfReferencing.php
================================================
<?php

namespace Fixtures\Prophecy;

interface SelfReferencing
{
    public function __invoke(self $self): self;
}


================================================
FILE: fixtures/SpecialMethods.php
================================================
<?php

namespace Fixtures\Prophecy;

class SpecialMethods
{
    public function __construct()
    {
    }

    function __destruct()
    {
    }

    function __call($name, $arguments)
    {
    }

    function __sleep()
    {
    }

    function __wakeup()
    {
    }

    function __toString()
    {
        return '';
    }

    function __invoke()
    {
    }

}


================================================
FILE: fixtures/StandaloneParameterTypeFalse.php
================================================
<?php

namespace Fixtures\Prophecy;

class StandaloneParameterTypeFalse
{
    public function method(false $arg)
    {
        return $arg;
    }
}


================================================
FILE: fixtures/StandaloneParameterTypeNull.php
================================================
<?php

namespace Fixtures\Prophecy;

class StandaloneParameterTypeNull
{
    public function method(null $arg)
    {
        return $arg;
    }
}


================================================
FILE: fixtures/StandaloneParameterTypeTrue.php
================================================
<?php

namespace Fixtures\Prophecy;

class StandaloneParameterTypeTrue
{
    public function method(true $arg)
    {
        return $arg;
    }
}


================================================
FILE: fixtures/StandaloneReturnTypeFalse.php
================================================
<?php

namespace Fixtures\Prophecy;

class StandaloneReturnTypeFalse
{
    public function method(): false
    {
        return false;
    }
}


================================================
FILE: fixtures/StandaloneReturnTypeNull.php
================================================
<?php

namespace Fixtures\Prophecy;

class StandaloneReturnTypeNull
{
    public function method(): null
    {
        return null;
    }
}


================================================
FILE: fixtures/StandaloneReturnTypeTrue.php
================================================
<?php

namespace Fixtures\Prophecy;

class StandaloneReturnTypeTrue
{
    public function method(): true
    {
        return true;
    }
}


================================================
FILE: fixtures/TentativeReturnTypeNull.php
================================================
<?php

namespace Fixtures\Prophecy;

class TentativeReturnTypeNull
{
    #[\ReturnTypeWillChange()]
    public function method(): ?string
    {
        return null;
    }
}


================================================
FILE: fixtures/ThrowableInterface.php
================================================
<?php

namespace Fixtures\Prophecy;

interface ThrowableInterface extends \Throwable
{
}


================================================
FILE: fixtures/UnionArgumentTypeFalse.php
================================================
<?php

namespace Fixtures\Prophecy;

class UnionArgumentTypeFalse
{
    public function method(false|\stdClass $arg)
    {

    }
}


================================================
FILE: fixtures/UnionArgumentTypes.php
================================================
<?php

namespace Fixtures\Prophecy;

class UnionArgumentTypes
{
    public function doSomething(bool|\stdClass $arg)
    {

    }
}


================================================
FILE: fixtures/UnionReturnTypeFalse.php
================================================
<?php

namespace Fixtures\Prophecy;

class UnionReturnTypeFalse
{
    public function method(): false|\stdClass
    {

    }
}


================================================
FILE: fixtures/UnionReturnTypes.php
================================================
<?php

namespace Fixtures\Prophecy;

class UnionReturnTypes
{
    public function doSomething(): bool|\stdClass
    {

    }
}


================================================
FILE: fixtures/WithArguments.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithArguments
{
    public function methodWithArgs(\ArrayAccess $arg_1, array $arg_2 = [], ?\ArrayAccess $arg_3 = null)
    {
    }
    
    public function methodWithoutTypeHints($arg)
    {
    }
}


================================================
FILE: fixtures/WithCallableArgument.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithCallableArgument
{
    public function methodWithArgs(callable $arg_1, ?callable $arg_2 = null)
    {
    }
}


================================================
FILE: fixtures/WithFinalMethod.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithFinalMethod
{
    final public function finalImplementation()
    {
    }
}


================================================
FILE: fixtures/WithFinalVirtuallyPrivateMethod.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithFinalVirtuallyPrivateMethod
{
    final public function __toString()
    {
        return '';
    }

    final public function _getName()
    {
    }
}


================================================
FILE: fixtures/WithPhpdocClass.php
================================================
<?php

namespace Fixtures\Prophecy;

/**
 * @method string name(string $gender = null)
 * @method mixed randomElement(array $array = array('a', 'b', 'c'))
 * @method mixed __unserialize($data)
 */
class WithPhpdocClass
{
    public function __call($name, $arguments)
    {
        // TODO: Implement __call() method.
    }
}


================================================
FILE: fixtures/WithProtectedAbstractMethod.php
================================================
<?php

namespace Fixtures\Prophecy;

abstract class WithProtectedAbstractMethod
{
    abstract protected function innerDetail();
}


================================================
FILE: fixtures/WithReferences.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithReferences
{
    public function methodWithReferenceArgument(&$arg_1, \ArrayAccess &$arg_2)
    {
    }
}


================================================
FILE: fixtures/WithReturnTypehints.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithReturnTypehints extends EmptyClass
{
    public function getSelf(): self {
        return $this;
    }

    public function getName(): string {
        return __CLASS__;
    }
    
    public function getParent(): parent {
        return $this;
    }
}


================================================
FILE: fixtures/WithStaticMethod.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithStaticMethod
{
    public static function innerDetail()
    {
    }
}


================================================
FILE: fixtures/WithTypehintedVariadicArgument.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithTypehintedVariadicArgument
{
    function methodWithTypeHintedArgs(array ...$args)
    {
    }
}


================================================
FILE: fixtures/WithVariadicArgument.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithVariadicArgument
{
    function methodWithArgs(...$args)
    {
    }
}


================================================
FILE: fixtures/WithVirtuallyPrivateMethod.php
================================================
<?php

namespace Fixtures\Prophecy;

class WithVirtuallyPrivateMethod
{
    public function __toString()
    {
        return '';
    }

    public function _getName()
    {
    }

    public function isAbstract()
    {
    }
}


================================================
FILE: phpstan-baseline.neon
================================================
parameters:
	ignoreErrors:
		-
			message: '#^Parameter \#1 \$value of function strval expects bool\|float\|int\|resource\|string\|null, mixed given\.$#'
			identifier: argument.type
			count: 2
			path: src/Prophecy/Argument/Token/ExactValueToken.php

		-
			message: '#^Method Prophecy\\Doubler\\CachedDoubler\:\:createDoubleClass\(\) should return class\-string\<Prophecy\\Doubler\\DoubleInterface&T of object\> but returns class\-string\.$#'
			identifier: return.type
			count: 1
			path: src/Prophecy/Doubler/CachedDoubler.php

		-
			message: '#^Parameter \#1 \$types of class Prophecy\\Doubler\\Generator\\Node\\Type\\UnionType constructor expects list\<Prophecy\\Doubler\\Generator\\Node\\Type\\IntersectionType\|Prophecy\\Doubler\\Generator\\Node\\Type\\SimpleType\>, array\{Prophecy\\Doubler\\Generator\\Node\\Type\\BuiltinType, Prophecy\\Doubler\\Generator\\Node\\Type\\TypeInterface\} given\.$#'
			identifier: argument.type
			count: 1
			path: src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php

		-
			message: '#^Method Prophecy\\Doubler\\Doubler\:\:createDoubleClass\(\) should return class\-string\<Prophecy\\Doubler\\DoubleInterface&T of object\> but returns class\-string\.$#'
			identifier: return.type
			count: 1
			path: src/Prophecy/Doubler/Doubler.php

		-
			message: '#^Call to function method_exists\(\) with ''ReflectionClass'' and ''isReadOnly'' will always evaluate to true\.$#'
			identifier: function.alreadyNarrowedType
			count: 1
			path: src/Prophecy/Doubler/Generator/ClassMirror.php

		-
			message: '#^Call to function method_exists\(\) with ReflectionMethod and ''hasTentativeReturnT…'' will always evaluate to true\.$#'
			identifier: function.alreadyNarrowedType
			count: 1
			path: src/Prophecy/Doubler/Generator/ClassMirror.php

		-
			message: '#^PHPDoc tag @var with type static\(Prophecy\\Doubler\\LazyDouble\<U of object\>\) is not subtype of native type \$this\(Prophecy\\Doubler\\LazyDouble\<T of object\>\)\.$#'
			identifier: varTag.nativeType
			count: 1
			path: src/Prophecy/Doubler/LazyDouble.php

		-
			message: '#^Property Prophecy\\Doubler\\LazyDouble\:\:\$class \(ReflectionClass\<T of object\>\|null\) does not accept ReflectionClass\<U of object\>\.$#'
			identifier: assign.propertyType
			count: 1
			path: src/Prophecy/Doubler/LazyDouble.php

		-
			message: '#^Call to function method_exists\(\) with ReflectionMethod and ''hasTentativeReturnT…'' will always evaluate to true\.$#'
			identifier: function.alreadyNarrowedType
			count: 1
			path: src/Prophecy/Prophecy/MethodProphecy.php

		-
			message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(ReflectionIntersectionType\|ReflectionNamedType\)\: mixed\)\|null, Closure\(ReflectionNamedType\)\: string given\.$#'
			identifier: argument.type
			count: 1
			path: src/Prophecy/Prophecy/MethodProphecy.php

		-
			message: '#^Possibly invalid array key type mixed\.$#'
			identifier: offsetAccess.invalidOffset
			count: 1
			path: src/Prophecy/Util/ExportUtil.php

		-
			message: '#^Call to an undefined method phpDocumentor\\Reflection\\DocBlock\\Tags\\Method\:\:getArguments\(\)\.$#'
			identifier: method.notFound
			count: 1
			path: src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php


================================================
FILE: phpstan.dist.neon
================================================
parameters:
    level: 9
    inferPrivatePropertyTypeFromConstructor: true
    treatPhpDocTypesAsCertain: false
    paths:
        - ./src/
    excludePaths:
        - src/Prophecy/Comparator/Factory.php
includes:
    - phpstan-baseline.neon


================================================
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/12.1/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" cacheDirectory=".phpunit.cache">
  <php>
    <ini name="error_reporting" value="-1"/>
  </php>
  <testsuites>
    <testsuite name="PhpSpec Test Suite">
      <directory>tests</directory>
    </testsuite>
  </testsuites>
  <source>
    <include>
      <directory>./src/</directory>
    </include>
  </source>
</phpunit>


================================================
FILE: spec/Prophecy/Argument/ArgumentsWildcardSpec.php
================================================
<?php

namespace spec\Prophecy\Argument;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument\Token\TokenInterface;

class ArgumentsWildcardSpec extends ObjectBehavior
{
    function it_wraps_non_token_arguments_into_ExactValueToken(\stdClass $object)
    {
        $this->beConstructedWith(array(42, 'zet', $object));

        $class = get_class($object->getWrappedObject());
        $id  = spl_object_id($object->getWrappedObject());

        $objHash = "exact(42), exact(\"zet\"), exact($class#$id Object (\n    'objectProphecyClosure' => Closure#%s Object (\n        0 => Closure#%s Object\n    )\n))";

        $idRegexExpr = '[0-9]+';
        $this->__toString()->shouldMatch(sprintf('/^%s$/', sprintf(preg_quote("$objHash"), $idRegexExpr, $idRegexExpr)));
    }

    function it_generates_string_representation_from_all_tokens_imploded(
        TokenInterface $token1,
        TokenInterface $token2,
        TokenInterface $token3
    ) {
        $token1->__toString()->willReturn('token_1');
        $token2->__toString()->willReturn('token_2');
        $token3->__toString()->willReturn('token_3');

        $this->beConstructedWith(array($token1, $token2, $token3));
        $this->__toString()->shouldReturn('token_1, token_2, token_3');
    }

    function it_exposes_list_of_tokens(TokenInterface $token)
    {
        $this->beConstructedWith(array($token));

        $this->getTokens()->shouldReturn(array($token));
    }

    function it_returns_score_of_1_if_there_are_no_tokens_and_arguments()
    {
        $this->beConstructedWith(array());

        $this->scoreArguments(array())->shouldReturn(1);
    }

    function it_should_return_match_score_based_on_all_tokens_score(
        TokenInterface $token1,
        TokenInterface $token2,
        TokenInterface $token3
    ) {
        $token1->scoreArgument('one')->willReturn(3);
        $token1->isLast()->willReturn(false);
        $token2->scoreArgument(2)->willReturn(5);
        $token2->isLast()->willReturn(false);
        $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
        $token3->isLast()->willReturn(false);

        $this->beConstructedWith(array($token1, $token2, $token3));
        $this->scoreArguments(array('one', 2, $obj))->shouldReturn(18);
    }

    function it_returns_false_if_there_is_less_arguments_than_tokens(
        TokenInterface $token1,
        TokenInterface $token2,
        TokenInterface $token3
    ) {
        $token1->scoreArgument('one')->willReturn(3);
        $token1->isLast()->willReturn(false);
        $token2->scoreArgument(2)->willReturn(5);
        $token2->isLast()->willReturn(false);
        $token3->scoreArgument(null)->willReturn(false);
        $token3->isLast()->willReturn(false);

        $this->beConstructedWith(array($token1, $token2, $token3));
        $this->scoreArguments(array('one', 2))->shouldReturn(false);
    }

    function it_returns_false_if_there_is_less_tokens_than_arguments(
        TokenInterface $token1,
        TokenInterface $token2,
        TokenInterface $token3
    ) {
        $token1->scoreArgument('one')->willReturn(3);
        $token1->isLast()->willReturn(false);
        $token2->scoreArgument(2)->willReturn(5);
        $token2->isLast()->willReturn(false);
        $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
        $token3->isLast()->willReturn(false);

        $this->beConstructedWith(array($token1, $token2, $token3));
        $this->scoreArguments(array('one', 2, $obj, 4))->shouldReturn(false);
    }

    function it_should_return_false_if_one_of_the_tokens_returns_false(
        TokenInterface $token1,
        TokenInterface $token2,
        TokenInterface $token3
    ) {
        $token1->scoreArgument('one')->willReturn(3);
        $token1->isLast()->willReturn(false);
        $token2->scoreArgument(2)->willReturn(false);
        $token2->isLast()->willReturn(false);
        $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
        $token3->isLast()->willReturn(false);

        $this->beConstructedWith(array($token1, $token2, $token3));
        $this->scoreArguments(array('one', 2, $obj))->shouldReturn(false);
    }

    function it_should_calculate_score_until_last_token(
        TokenInterface $token1,
        TokenInterface $token2,
        TokenInterface $token3
    ) {
        $token1->scoreArgument('one')->willReturn(3);
        $token1->isLast()->willReturn(false);

        $token2->scoreArgument(2)->willReturn(7);
        $token2->isLast()->willReturn(true);

        $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
        $token3->isLast()->willReturn(false);

        $this->beConstructedWith(array($token1, $token2, $token3));
        $this->scoreArguments(array('one', 2, $obj))->shouldReturn(10);
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/AnyValueTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class AnyValueTokenSpec extends ObjectBehavior
{
    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function its_string_representation_is_star()
    {
        $this->__toString()->shouldReturn('*');
    }

    function it_scores_any_argument_as_3()
    {
        $this->scoreArgument(42)->shouldReturn(3);
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class AnyValuesTokenSpec extends ObjectBehavior
{
    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_last()
    {
        $this->shouldBeLast();
    }

    function its_string_representation_is_star_with_followup()
    {
        $this->__toString()->shouldReturn('* [, ...]');
    }

    function it_scores_any_argument_as_2()
    {
        $this->scoreArgument(42)->shouldReturn(2);
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class ApproximateValueTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith(10.12345678, 4);
    }

    function it_is_initializable()
    {
        $this->shouldHaveType('Prophecy\Argument\Token\ApproximateValueToken');
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_scores_10_if_rounded_argument_matches_rounded_value()
    {
        $this->scoreArgument(10.12345)->shouldReturn(10);
    }

    function it_does_not_score_if_rounded_argument_does_not_match_rounded_value()
    {
        $this->scoreArgument(10.1234)->shouldReturn(false);
    }

    function it_uses_a_default_precision_of_zero()
    {
        $this->beConstructedWith(10.7);
        $this->scoreArgument(11.4)->shouldReturn(10);
    }

    function it_does_not_score_if_rounded_argument_is_not_numeric()
    {
        $this->scoreArgument('hello')->shouldReturn(false);
        $this->scoreArgument(new \stdClass())->shouldReturn(false);
        $this->scoreArgument(false)->shouldReturn(false);
    }

    function it_has_simple_string_representation()
    {
        $this->__toString()->shouldBe('≅10.1235');
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class ArrayCountTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith(2);
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_scores_6_if_argument_array_has_proper_count()
    {
        $this->scoreArgument(array(1,2))->shouldReturn(6);
    }

    function it_scores_6_if_argument_countable_object_has_proper_count(\Countable $countable)
    {
        $countable->count()->willReturn(2);
        $this->scoreArgument($countable)->shouldReturn(6);
    }

    function it_does_not_score_if_argument_is_neither_array_nor_countable_object()
    {
        $this->scoreArgument('string')->shouldBe(false);
        $this->scoreArgument(5)->shouldBe(false);
        $this->scoreArgument(new \stdClass())->shouldBe(false);
    }

    function it_does_not_score_if_argument_array_has_wrong_count()
    {
        $this->scoreArgument(array(1))->shouldReturn(false);
    }

    function it_does_not_score_if_argument_countable_object_has_wrong_count(\Countable $countable)
    {
        $countable->count()->willReturn(3);
        $this->scoreArgument($countable)->shouldReturn(false);
    }

    function it_has_simple_string_representation()
    {
        $this->__toString()->shouldBe('count(2)');
    }

}


================================================
FILE: spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument\Token\ExactValueToken;
use Prophecy\Argument\Token\TokenInterface;
use Prophecy\Exception\InvalidArgumentException;

class ArrayEntryTokenSpec extends ObjectBehavior
{
    function let(TokenInterface $key, TokenInterface $value)
    {
        $this->beConstructedWith($key, $value);
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_holds_key_and_value($key, $value)
    {
        $this->getKey()->shouldBe($key);
        $this->getValue()->shouldBe($value);
    }

    function its_string_representation_tells_that_its_an_array_containing_the_key_value_pair($key, $value)
    {
        $key->__toString()->willReturn('key');
        $value->__toString()->willReturn('value');
        $this->__toString()->shouldBe('[..., key => value, ...]');
    }

    function it_wraps_non_token_value_into_ExactValueToken(TokenInterface $key, \stdClass $object)
    {
        $this->beConstructedWith($key, $object);
        $this->getValue()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken');
    }

    function it_wraps_non_token_key_into_ExactValueToken(\stdClass $object, TokenInterface $value)
    {
        $this->beConstructedWith($object, $value);
        $this->getKey()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken');
    }

    function it_scores_array_half_of_combined_scores_from_key_and_value_tokens($key, $value)
    {
        $key->scoreArgument('key')->willReturn(4);
        $value->scoreArgument('value')->willReturn(6);
        $this->scoreArgument(array('key' => 'value'))->shouldBe(5);
    }

    function it_scores_traversable_object_half_of_combined_scores_from_key_and_value_tokens(
        TokenInterface $key,
        TokenInterface $value,
        \Iterator $object
    ) {
        $object->current()->will(function () use ($object) {
            $object->valid()->willReturn(false);

            return 'value';
        });
        $object->key()->willReturn('key');
        (\PHP_VERSION_ID < 80100) ? $object->rewind()->willReturn(null) : $object->rewind()->shouldBeCalled();
        (\PHP_VERSION_ID < 80100) ? $object->next()->willReturn(null) : $object->next()->shouldBeCalled();
        $object->valid()->willReturn(true);
        $key->scoreArgument('key')->willReturn(6);
        $value->scoreArgument('value')->willReturn(2);
        $this->scoreArgument($object)->shouldBe(4);
    }

    function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken(
        TokenInterface $key,
        TokenInterface $value,
        \ArrayAccess $object
    ) {
        $key->__toString()->willReturn('any_token');
        $this->beConstructedWith($key, $value);
        $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL
                        .'But you used `any_token`.';
        $this->shouldThrow(new InvalidArgumentException($errorMessage))->duringScoreArgument($object);
    }

    function it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens(
        ExactValueToken $key,
        TokenInterface $value,
        \ArrayAccess $object
    ) {
        $object->offsetExists('key')->willReturn(true);
        $object->offsetGet('key')->willReturn('value');
        $key->getValue()->willReturn('key');
        $key->scoreArgument('key')->willReturn(3);
        $value->scoreArgument('value')->willReturn(1);
        $this->scoreArgument($object)->shouldBe(2);
    }

    function it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible(
        TokenInterface $key,
        TokenInterface $value,
        \ArrayIterator $object
    ) {
        $this->beConstructedWith($key, $value);
        $object->current()->will(function () use ($object) {
            $object->valid()->willReturn(false);

            return 'value';
        });
        $object->key()->willReturn('key');
        (\PHP_VERSION_ID < 80100) ? $object->rewind()->willReturn(null) : $object->rewind()->shouldBeCalled();
        (\PHP_VERSION_ID < 80100) ? $object->next()->willReturn(null) : $object->next()->shouldBeCalled();
        $object->valid()->willReturn(true);
        $this->shouldNotThrow(new InvalidArgumentException())->duringScoreArgument($object);
    }

    function it_does_not_score_if_argument_is_neither_array_nor_traversable_nor_array_accessible()
    {
        $this->scoreArgument('string')->shouldBe(false);
        $this->scoreArgument(new \stdClass())->shouldBe(false);
    }

    function it_does_not_score_empty_array()
    {
        $this->scoreArgument(array())->shouldBe(false);
    }

    function it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry($key, $value)
    {
        $argument = array(1 => 'foo', 2 => 'bar');
        $key->scoreArgument(1)->willReturn(true);
        $key->scoreArgument(2)->willReturn(false);
        $value->scoreArgument('foo')->willReturn(false);
        $value->scoreArgument('bar')->willReturn(true);
        $this->scoreArgument($argument)->shouldBe(false);
    }

    function it_does_not_score_traversable_object_without_entries(\Iterator $object)
    {
        (\PHP_VERSION_ID < 80100) ? $object->rewind()->willReturn(null) : $object->rewind()->shouldBeCalled();
        (\PHP_VERSION_ID < 80100) && $object->next()->willReturn(null);
        $object->valid()->willReturn(false);
        $this->scoreArgument($object)->shouldBe(false);
    }

    function it_does_not_score_traversable_object_if_key_and_value_tokens_do_not_score_same_entry(
        TokenInterface $key,
        TokenInterface $value,
        \Iterator $object
    ) {
        $object->current()->willReturn('foo');
        $object->current()->will(static function () use ($object) {
            $object->valid()->willReturn(false);

            return 'bar';
        });
        $object->key()->willReturn(1);
        $object->key()->willReturn(2);
        (\PHP_VERSION_ID < 80100) ? $object->rewind()->willReturn(null) : $object->rewind()->shouldBeCalled();
        (\PHP_VERSION_ID < 80100) ? $object->next()->willReturn(null) : $object->next()->shouldBeCalled();
        $object->valid()->willReturn(true);
        $key->scoreArgument(1)->willReturn(true);
        $key->scoreArgument(2)->willReturn(false);
        $value->scoreArgument('foo')->willReturn(false);
        $value->scoreArgument('bar')->willReturn(true);
        $this->scoreArgument($object)->shouldBe(false);
    }

    function it_does_not_score_array_accessible_object_if_it_has_no_offset_with_key_token_value(
        ExactValueToken $key,
        \ArrayAccess $object
    ) {
        $object->offsetExists('key')->willReturn(false);
        $key->getValue()->willReturn('key');
        $this->scoreArgument($object)->shouldBe(false);
    }

    function it_does_not_score_array_accessible_object_if_key_and_value_tokens_do_not_score_same_entry(
        ExactValueToken $key,
        TokenInterface $value,
        \ArrayAccess $object
    ) {
        $object->offsetExists('key')->willReturn(true);
        $object->offsetGet('key')->willReturn('value');
        $key->getValue()->willReturn('key');
        $value->scoreArgument('value')->willReturn(false);
        $key->scoreArgument('key')->willReturn(true);
        $this->scoreArgument($object)->shouldBe(false);
    }

    function its_score_is_capped_at_8($key, $value)
    {
        $key->scoreArgument('key')->willReturn(10);
        $value->scoreArgument('value')->willReturn(10);
        $this->scoreArgument(array('key' => 'value'))->shouldBe(8);
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument\Token\TokenInterface;

class ArrayEveryEntryTokenSpec extends ObjectBehavior
{
    function let(TokenInterface $value)
    {
        $this->beConstructedWith($value);
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_holds_value($value)
    {
        $this->getValue()->shouldBe($value);
    }

    function its_string_representation_tells_that_its_an_array_containing_only_value($value)
    {
        $value->__toString()->willReturn('value');
        $this->__toString()->shouldBe('[value, ..., value]');
    }

    function it_wraps_non_token_value_into_ExactValueToken(\stdClass $stdClass)
    {
        $this->beConstructedWith($stdClass);
        $this->getValue()->shouldHaveType('Prophecy\Argument\Token\ExactValueToken');
    }

    function it_does_not_score_if_argument_is_neither_array_nor_traversable()
    {
        $this->scoreArgument('string')->shouldBe(false);
        $this->scoreArgument(new \stdClass())->shouldBe(false);
    }

    function it_does_not_score_empty_array()
    {
        $this->scoreArgument(array())->shouldBe(false);
    }

    function it_does_not_score_traversable_object_without_entries(\Iterator $object)
    {
        (\PHP_VERSION_ID < 80100) ? $object->rewind()->willReturn(null) : $object->rewind()->shouldBeCalled();
        (\PHP_VERSION_ID < 80100) && $object->next()->willReturn(null);
        $object->valid()->willReturn(false);
        $this->scoreArgument($object)->shouldBe(false);
    }

    function it_scores_avg_of_scores_from_value_tokens($value)
    {
        $value->scoreArgument('value1')->willReturn(6);
        $value->scoreArgument('value2')->willReturn(3);
        $this->scoreArgument(array('value1', 'value2'))->shouldBe(4.5);
    }

    function it_scores_false_if_entry_scores_false($value)
    {
        $value->scoreArgument('value1')->willReturn(6);
        $value->scoreArgument('value2')->willReturn(false);
        $this->scoreArgument(array('value1', 'value2'))->shouldBe(false);
    }

    function it_does_not_score_array_keys($value)
    {
        $value->scoreArgument('value')->willReturn(6);
        $value->scoreArgument('key')->shouldNotBeCalled(0);
        $this->scoreArgument(array('key' => 'value'))->shouldBe(6);
    }

    function it_scores_traversable_object_from_value_token(TokenInterface $value, \Iterator $object)
    {
        $object->current()->will(function ($args, $object) {
            $object->valid()->willReturn(false);

            return 'value';
        });
        $object->key()->willReturn('key');
        (\PHP_VERSION_ID < 80100) ? $object->rewind()->willReturn(null) : $object->rewind()->shouldBeCalled();
        (\PHP_VERSION_ID < 80100) ? $object->next()->willReturn(null) : $object->next()->shouldBeCalled();
        $object->valid()->willReturn(true);
        $value->scoreArgument('value')->willReturn(2);
        $this->scoreArgument($object)->shouldBe(2);
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/CallbackTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class CallbackTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('get_class');
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_scores_7_if_argument_matches_callback()
    {
        $this->beConstructedWith(function ($argument) { return 2 === $argument; });

        $this->scoreArgument(2)->shouldReturn(7);
    }

    function it_does_not_scores_if_argument_does_not_match_callback()
    {
        $this->beConstructedWith(function ($argument) { return 2 === $argument; });

        $this->scoreArgument(5)->shouldReturn(false);
    }

    function its_string_representation_should_tell_that_its_callback()
    {
        $this->__toString()->shouldReturn('callback()');
    }

    function its_string_representation_can_be_customized()
    {
        $this->beConstructedWith('get_class', 'MyCustomTestCase');

        $this->__toString()->shouldReturn('MyCustomTestCase');
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/ExactValueTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class ExactValueTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith(42);
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_holds_value()
    {
        $this->getValue()->shouldReturn(42);
    }

    function it_scores_10_if_value_is_equal_to_argument()
    {
        $this->scoreArgument(42)->shouldReturn(10);
        $this->scoreArgument('42')->shouldReturn(10);
    }

    function it_scores_10_if_value_is_an_object_and_equal_to_argument()
    {
        $value = new \DateTime();
        $value2 = clone $value;

        $this->beConstructedWith($value);
        $this->scoreArgument($value2)->shouldReturn(10);
    }

    function it_scores_10_if_value_is_a_double_object_and_equal_to_argument(\stdClass $value)
    {
        $value2 = clone $value->getWrappedObject();

        $this->beConstructedWith($value);
        $this->scoreArgument($value2)->shouldReturn(10);
    }

    function it_does_not_scores_if_value_is_not_equal_to_argument()
    {
        $this->scoreArgument(50)->shouldReturn(false);
        $this->scoreArgument(new \stdClass())->shouldReturn(false);
    }

    function it_does_not_scores_if_value_an_object_and_is_not_equal_to_argument()
    {
        $value = new ExactValueTokenFixtureB('ABC');
        $value2 = new ExactValueTokenFixtureB('CBA');

        $this->beConstructedWith($value);
        $this->scoreArgument($value2)->shouldReturn(false);
    }

    function it_does_not_scores_if_value_type_and_is_not_equal_to_argument()
    {
        $this->beConstructedWith(false);
        $this->scoreArgument(0)->shouldReturn(false);
    }

    function it_generates_proper_string_representation_for_integer()
    {
        $this->beConstructedWith(42);
        $this->__toString()->shouldReturn('exact(42)');
    }

    function it_generates_proper_string_representation_for_string()
    {
        $this->beConstructedWith('some string');
        $this->__toString()->shouldReturn('exact("some string")');
    }

    function it_generates_single_line_representation_for_multiline_string()
    {
        $this->beConstructedWith("some\nstring");
        $this->__toString()->shouldReturn('exact("some\\nstring")');
    }

    function it_generates_proper_string_representation_for_double()
    {
        $this->beConstructedWith(42.3);
        $this->__toString()->shouldReturn('exact(42.3)');
    }

    function it_generates_proper_string_representation_for_boolean_true()
    {
        $this->beConstructedWith(true);
        $this->__toString()->shouldReturn('exact(true)');
    }

    function it_generates_proper_string_representation_for_boolean_false()
    {
        $this->beConstructedWith(false);
        $this->__toString()->shouldReturn('exact(false)');
    }

    function it_generates_proper_string_representation_for_null()
    {
        $this->beConstructedWith(null);
        $this->__toString()->shouldReturn('exact(null)');
    }

    function it_generates_proper_string_representation_for_empty_array()
    {
        $this->beConstructedWith(array());
        $this->__toString()->shouldReturn('exact([])');
    }

    function it_generates_proper_string_representation_for_array()
    {
        $this->beConstructedWith(array('zet', 42));
        $this->__toString()->shouldReturn('exact(["zet", 42])');
    }

    function it_generates_proper_string_representation_for_resource()
    {
        $resource = fopen(__FILE__, 'r');
        $this->beConstructedWith($resource);
        $this->__toString()->shouldReturn('exact(stream:'.$resource.')');
    }

    function it_generates_proper_string_representation_for_object(\stdClass $object)
    {
        $objHash = sprintf('exact(%s#%s',
            get_class($object->getWrappedObject()),
            spl_object_id($object->getWrappedObject())
        )." Object (\n    'objectProphecyClosure' => Closure#%s Object (\n        0 => Closure#%s Object\n    )\n))";

        $this->beConstructedWith($object);

        $idRegexExpr = '[0-9]+';
        $this->__toString()->shouldMatch(sprintf('/^%s$/', sprintf(preg_quote("$objHash"), $idRegexExpr, $idRegexExpr)));
    }

    function it_scores_10_if_value_an_numeric_and_equal_to_argument_as_stringable()
    {
        $value = 10;
        $argument = new ExactValueTokenC("10");

        $this->beConstructedWith($value);
        $this->scoreArgument($argument)->shouldReturn(10);
    }

    function it_does_not_scores_if_value_an_numeric_and_equal_to_argument_as_stringable()
    {
        $value = 10;
        $argument = new ExactValueTokenC("example");

        $this->beConstructedWith($value);
        $this->scoreArgument($argument)->shouldReturn(false);
    }

    function it_does_not_scores_if_value_an_object_and_not_equal_to_argument_object()
    {
        $value = new ExactValueTokenFixtureA();
        $argument = new ExactValueTokenC("example");

        $this->beConstructedWith($value);
        $this->scoreArgument($argument)->shouldReturn(false);
    }
}

class ExactValueTokenFixtureA
{
    public $errors;
}

class ExactValueTokenFixtureB extends ExactValueTokenFixtureA
{
    public $errors;
    public $value = null;

    public function __construct($value)
    {
        $this->value = $value;
    }
}

class ExactValueTokenC
{
    public $value;
    public function __construct($value)
    {
        $this->value = $value;
    }

    public function __toString()
    {
        return $this->value;
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class IdenticalValueTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith(42);
    }

    function it_is_initializable()
    {
        $this->shouldHaveType('Prophecy\Argument\Token\IdenticalValueToken');
    }

    function it_scores_11_if_string_value_is_identical_to_argument()
    {
        $this->beConstructedWith('foo');
        $this->scoreArgument('foo')->shouldReturn(11);
    }

    function it_scores_11_if_boolean_value_is_identical_to_argument()
    {
        $this->beConstructedWith(false);
        $this->scoreArgument(false)->shouldReturn(11);
    }

    function it_scores_11_if_integer_value_is_identical_to_argument()
    {
        $this->beConstructedWith(31);
        $this->scoreArgument(31)->shouldReturn(11);
    }

    function it_scores_11_if_float_value_is_identical_to_argument()
    {
        $this->beConstructedWith(31.12);
        $this->scoreArgument(31.12)->shouldReturn(11);
    }

    function it_scores_11_if_array_value_is_identical_to_argument()
    {
        $this->beConstructedWith(array('foo' => 'bar'));
        $this->scoreArgument(array('foo' => 'bar'))->shouldReturn(11);
    }

    function it_scores_11_if_object_value_is_identical_to_argument()
    {
        $object = new \stdClass();

        $this->beConstructedWith($object);
        $this->scoreArgument($object)->shouldReturn(11);
    }

    function it_scores_false_if_value_is_not_identical_to_argument()
    {
        $this->beConstructedWith(new \stdClass());
        $this->scoreArgument('foo')->shouldReturn(false);
    }

    function it_scores_false_if_object_value_is_not_the_same_instance_than_argument()
    {
        $this->beConstructedWith(new \stdClass());
        $this->scoreArgument(new \stdClass())->shouldReturn(false);
    }

    function it_scores_false_if_integer_value_is_not_identical_to_boolean_argument()
    {
        $this->beConstructedWith(1);
        $this->scoreArgument(true)->shouldReturn(false);
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_generates_proper_string_representation_for_integer()
    {
        $this->beConstructedWith(42);
        $this->__toString()->shouldReturn('identical(42)');
    }

    function it_generates_proper_string_representation_for_string()
    {
        $this->beConstructedWith('some string');
        $this->__toString()->shouldReturn('identical("some string")');
    }

    function it_generates_single_line_representation_for_multiline_string()
    {
        $this->beConstructedWith("some\nstring");
        $this->__toString()->shouldReturn('identical("some\\nstring")');
    }

    function it_generates_proper_string_representation_for_double()
    {
        $this->beConstructedWith(42.3);
        $this->__toString()->shouldReturn('identical(42.3)');
    }

    function it_generates_proper_string_representation_for_boolean_true()
    {
        $this->beConstructedWith(true);
        $this->__toString()->shouldReturn('identical(true)');
    }

    function it_generates_proper_string_representation_for_boolean_false()
    {
        $this->beConstructedWith(false);
        $this->__toString()->shouldReturn('identical(false)');
    }

    function it_generates_proper_string_representation_for_null()
    {
        $this->beConstructedWith(null);
        $this->__toString()->shouldReturn('identical(null)');
    }

    function it_generates_proper_string_representation_for_empty_array()
    {
        $this->beConstructedWith(array());
        $this->__toString()->shouldReturn('identical([])');
    }

    function it_generates_proper_string_representation_for_array()
    {
        $this->beConstructedWith(array('zet', 42));
        $this->__toString()->shouldReturn('identical(["zet", 42])');
    }

    function it_generates_proper_string_representation_for_resource()
    {
        $resource = fopen(__FILE__, 'r');
        $this->beConstructedWith($resource);
        $this->__toString()->shouldReturn('identical(stream:'.$resource.')');
    }

    function it_generates_proper_string_representation_for_object($object)
    {
        $objHash = sprintf('identical(%s#%s',
            get_class($object->getWrappedObject()),
            spl_object_id($object->getWrappedObject())
        )." Object (\n    'objectProphecyClosure' => Closure#%s Object (\n        0 => Closure#%s Object\n    )\n))";

        $this->beConstructedWith($object);

        $idRegexExpr = '[0-9]+';
        $this->__toString()->shouldMatch(sprintf('/^%s$/', sprintf(preg_quote("$objHash"), $idRegexExpr, $idRegexExpr)));
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/InArrayTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class InArrayTokenSpec extends ObjectBehavior
{
    function it_implements_TokenInterface()
    {
        $this->beConstructedWith(array());
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->beConstructedWith(array());
        $this->shouldNotBeLast();
    }

    function it_scores_8_if_argument_is_in_array()
    {
        $this->beConstructedWith(array(1, 2, 3));
        $this->scoreArgument(2)->shouldReturn(8);
    }

    function it_scores_false_if_argument_is_not_in_array()
    {
        $this->beConstructedWith(array(1, 2, 3));
        $this->scoreArgument(5)->shouldReturn(false);
    }

    function it_generates_array_in_string_format()
    {
        $this->beConstructedWith(array(1, 2, 3));
        $this->__toString()->shouldBe('[1, 2, 3]');
    }

    function it_generates_an_empty_array_as_string_when_token_is_empty()
    {
        $this->beConstructedWith(array());
        $this->__toString()->shouldBe('[]');
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument\Token\TokenInterface;

class LogicalAndTokenSpec extends ObjectBehavior
{
    function it_implements_TokenInterface()
    {
        $this->beConstructedWith(array());
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->beConstructedWith(array());
        $this->shouldNotBeLast();
    }

    function it_generates_string_representation_from_all_tokens_imploded(
        TokenInterface $token1,
        TokenInterface $token2,
        TokenInterface $token3
    ) {
        $token1->__toString()->willReturn('token_1');
        $token2->__toString()->willReturn('token_2');
        $token3->__toString()->willReturn('token_3');

        $this->beConstructedWith(array($token1, $token2, $token3));
        $this->__toString()->shouldReturn('bool(token_1 AND token_2 AND token_3)');
    }

    function it_wraps_non_token_arguments_into_ExactValueToken()
    {
        $this->beConstructedWith(array(15, '1985'));
        $this->__toString()->shouldReturn("bool(exact(15) AND exact(\"1985\"))");
    }

    function it_scores_the_maximum_score_from_all_scores_returned_by_tokens(TokenInterface $token1, TokenInterface $token2)
    {
        $token1->scoreArgument(1)->willReturn(10);
        $token2->scoreArgument(1)->willReturn(5);
        $this->beConstructedWith(array($token1, $token2));
        $this->scoreArgument(1)->shouldReturn(10);
    }

    function it_does_not_score_if_there_are_no_arguments_or_tokens()
    {
        $this->beConstructedWith(array());
        $this->scoreArgument('any')->shouldReturn(false);
    }

    function it_does_not_score_if_either_of_tokens_does_not_score(TokenInterface $token1, TokenInterface $token2)
    {
        $token1->scoreArgument(1)->willReturn(10);
        $token1->scoreArgument(2)->willReturn(false);

        $token2->scoreArgument(1)->willReturn(false);
        $token2->scoreArgument(2)->willReturn(10);

        $this->beConstructedWith(array($token1, $token2));

        $this->scoreArgument(1)->shouldReturn(false);
        $this->scoreArgument(2)->shouldReturn(false);
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument\Token\TokenInterface;

class LogicalNotTokenSpec extends ObjectBehavior
{
    function let(TokenInterface $token)
    {
        $this->beConstructedWith($token);
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_holds_originating_token($token)
    {
        $this->getOriginatingToken()->shouldReturn($token);
    }

    function it_has_simple_string_representation($token)
    {
        $token->__toString()->willReturn('value');
        $this->__toString()->shouldBe('not(value)');
    }

    function it_wraps_non_token_argument_into_ExactValueToken()
    {
        $this->beConstructedWith(5);
        $token = $this->getOriginatingToken();
        $token->shouldhaveType('Prophecy\Argument\Token\ExactValueToken');
        $token->getValue()->shouldBe(5);
    }

    function it_scores_4_if_preset_token_does_not_match_the_argument($token)
    {
        $token->scoreArgument('argument')->willReturn(false);
        $this->scoreArgument('argument')->shouldBe(4);
    }

    function it_does_not_score_if_preset_token_matches_argument($token)
    {
        $token->scoreArgument('argument')->willReturn(5);
        $this->scoreArgument('argument')->shouldBe(false);
    }

    function it_is_last_if_preset_token_is_last($token)
    {
        $token->isLast()->willReturn(true);
        $this->shouldBeLast();
    }

    function it_is_not_last_if_preset_token_is_not_last($token)
    {
        $token->isLast()->willReturn(false);
        $this->shouldNotBeLast();
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/NotInArrayTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class NotInArrayTokenSpec extends ObjectBehavior
{
    function it_implements_TokenInterface()
    {
        $this->beConstructedWith(array());
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->beConstructedWith(array());
        $this->shouldNotBeLast();
    }

    function it_scores_8_if_argument_is_not_in_array()
    {
        $this->beConstructedWith(array(1, 2, 3));
        $this->scoreArgument(5)->shouldReturn(8);
    }

    function it_scores_false_if_argument_is_in_array()
    {
        $this->beConstructedWith(array(1, 2, 3));
        $this->scoreArgument(2)->shouldReturn(false);
    }

    function it_generates_array_in_string_format()
    {
        $this->beConstructedWith(array(1, 2, 3));
        $this->__toString()->shouldBe('[1, 2, 3]');
    }

    function it_generates_an_empty_array_as_string_when_token_is_empty()
    {
        $this->beConstructedWith(array());
        $this->__toString()->shouldBe('[]');
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class ObjectStateTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('getName', 'stdClass');
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_scores_8_if_argument_object_has_specific_method_state(\ReflectionClass $reflection)
    {
        $reflection->getName()->willReturn('stdClass');

        $this->scoreArgument($reflection)->shouldReturn(8);
    }

    function it_scores_8_if_argument_object_has_specific_property_state(\stdClass $class)
    {
        $class->getName = 'stdClass';

        $this->scoreArgument($class)->shouldReturn(8);
    }

    function it_does_not_score_if_argument_method_state_does_not_match()
    {
        $value = new ObjectStateTokenFixtureB('ABC');
        $value2 = new ObjectStateTokenFixtureB('CBA');

        $this->beConstructedWith('getSelf', $value);
        $this->scoreArgument($value2)->shouldReturn(false);
    }

    function it_does_not_score_if_argument_property_state_does_not_match(\stdClass $class)
    {
        $class->getName = 'SplFileInfo';

        $this->scoreArgument($class)->shouldReturn(false);
    }

    function it_does_not_score_if_argument_object_does_not_have_method_or_property(ObjectStateTokenFixtureA $class)
    {
        $this->scoreArgument($class)->shouldReturn(false);
    }

    function it_does_not_score_if_argument_is_not_object()
    {
        $this->scoreArgument(42)->shouldReturn(false);
    }

    function it_has_simple_string_representation()
    {
        $this->__toString()->shouldReturn('state(getName(), "stdClass")');
    }
}

class ObjectStateTokenFixtureA
{
    public $errors;
}

class ObjectStateTokenFixtureB extends ObjectStateTokenFixtureA
{
    public $errors;
    public $value = null;

    public function __construct($value)
    {
        $this->value = $value;
    }

    public function getSelf()
    {
        return $this;
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/StringContainsTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;

class StringContainsTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('a substring');
    }

    function it_is_initializable()
    {
        $this->shouldHaveType('Prophecy\Argument\Token\StringContainsToken');
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_holds_value()
    {
        $this->getValue()->shouldReturn('a substring');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_scores_6_if_the_argument_contains_the_value()
    {
        $this->scoreArgument('Argument containing a substring')->shouldReturn(6);
    }

    function it_does_not_score_if_the_argument_does_not_contain_the_value()
    {
        $this->scoreArgument('Argument will not match')->shouldReturn(false);
    }

    function it_does_not_score_if_the_argument_is_not_a_string()
    {
        $this->scoreArgument(array('a substring', 'other value'))->shouldReturn(false);
    }

    function its_string_representation_shows_substring()
    {
        $this->__toString()->shouldReturn('contains("a substring")');
    }
}


================================================
FILE: spec/Prophecy/Argument/Token/TypeTokenSpec.php
================================================
<?php

namespace spec\Prophecy\Argument\Token;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument\Token\TokenInterface;

class TypeTokenSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('integer');
    }

    function it_implements_TokenInterface()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
    }

    function it_is_not_last()
    {
        $this->shouldNotBeLast();
    }

    function it_scores_5_if_argument_matches_simple_type()
    {
        $this->beConstructedWith('integer');

        $this->scoreArgument(42)->shouldReturn(5);
    }

    function it_does_not_scores_if_argument_does_not_match_simple_type()
    {
        $this->beConstructedWith('integer');

        $this->scoreArgument(42.0)->shouldReturn(false);
    }

    function it_scores_5_if_argument_is_an_instance_of_specified_class(\ReflectionObject $object)
    {
        $this->beConstructedWith('ReflectionClass');

        $this->scoreArgument($object)->shouldReturn(5);
    }

    function it_has_simple_string_representation()
    {
        $this->__toString()->shouldReturn('type(integer)');
    }

    function it_scores_5_if_argument_is_an_instance_of_specified_interface(TokenInterface $interface)
    {
        $this->beConstructedWith('Prophecy\Argument\Token\TokenInterface');

        $this->scoreArgument($interface)->shouldReturn(5);
    }
}


================================================
FILE: spec/Prophecy/ArgumentSpec.php
================================================
<?php

namespace spec\Prophecy;

use PhpSpec\ObjectBehavior;

class ArgumentSpec extends ObjectBehavior
{
    function it_has_a_shortcut_for_exact_argument_token()
    {
        $token = $this->exact(42);
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ExactValueToken');
        $token->getValue()->shouldReturn(42);
    }

    function it_has_a_shortcut_for_any_argument_token()
    {
        $token = $this->any();
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValueToken');
    }

    function it_has_a_shortcut_for_multiple_arguments_token()
    {
        $token = $this->cetera();
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValuesToken');
    }

    function it_has_a_shortcut_for_type_token()
    {
        $token = $this->type('integer');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\TypeToken');
    }

    function it_has_a_shortcut_for_callback_token()
    {
        $token = $this->that('get_class');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\CallbackToken');
    }

    function it_supports_customizing_tostring_representation_for_callback_token()
    {
        $token = $this->that('get_class', 'MyCustomTestCase');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\CallbackToken');
        $token->__toString()->shouldReturn('MyCustomTestCase');
    }

    function it_has_a_shortcut_for_object_state_token()
    {
        $token = $this->which('getName', 'everzet');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ObjectStateToken');
    }

    function it_has_a_shortcut_for_logical_and_token()
    {
        $token = $this->allOf('integer', 5);
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalAndToken');
    }

    function it_has_a_shortcut_for_array_count_token()
    {
        $token = $this->size(5);
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayCountToken');
    }

    function it_has_a_shortcut_for_array_entry_token()
    {
        $token = $this->withEntry('key', 'value');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken');
    }

    function it_has_a_shortcut_for_array_every_entry_token()
    {
        $token = $this->withEveryEntry('value');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEveryEntryToken');
    }

    function it_has_a_shortcut_for_identical_value_token()
    {
        $token = $this->is('value');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\IdenticalValueToken');
    }

    function it_has_a_shortcut_for_array_entry_token_matching_any_key()
    {
        $token = $this->containing('value');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken');
        $token->getKey()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken');
    }

    function it_has_a_shortcut_for_array_entry_token_matching_any_value()
    {
        $token = $this->withKey('key');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken');
        $token->getValue()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken');
    }

    function it_has_a_shortcut_for_logical_not_token()
    {
        $token = $this->not('kagux');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalNotToken');
    }

    function it_has_a_shortcut_for_string_contains_token()
    {
        $token = $this->containingString('string');
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\StringContainsToken');
    }

    function it_has_a_shortcut_for_approximate_token()
    {
        $token = $this->approximate(10);
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ApproximateValueToken');
    }

    function it_has_a_shortcut_for_in_token()
    {
        $token = $this->in(array(1, 2, 3));
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\InArrayToken');
    }

    function it_has_a_shortcut_for_not_in_token()
    {
        $token = $this->notIn(array(1, 2, 3));
        $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\NotInArrayToken');
    }
}


================================================
FILE: spec/Prophecy/Call/CallCenterSpec.php
================================================
<?php

namespace spec\Prophecy\Call;

use PhpSpec\ObjectBehavior;
use Prophecy\Promise\PromiseInterface;
use Prophecy\Prophecy\MethodProphecy;
use Prophecy\Prophecy\ObjectProphecy;
use Prophecy\Argument\ArgumentsWildcard;

class CallCenterSpec extends ObjectBehavior
{
    function let(ObjectProphecy $objectProphecy) {}

    function it_records_calls_made_through_makeCall_method(ObjectProphecy $objectProphecy, ArgumentsWildcard $wildcard)
    {
        $wildcard->scoreArguments(array(5, 2, 3))->willReturn(10);
        $objectProphecy->getMethodProphecies()->willReturn(array());

        $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3));

        $calls = $this->findCalls('setValues', $wildcard);
        $calls->shouldHaveCount(1);

        $calls[0]->shouldBeAnInstanceOf('Prophecy\Call\Call');
        $calls[0]->getMethodName()->shouldReturn('setValues');
        $calls[0]->getArguments()->shouldReturn(array(5, 2, 3));
        $calls[0]->getReturnValue()->shouldReturn(null);
    }

    function it_returns_null_for_any_call_through_makeCall_if_no_method_prophecies_added(
        $objectProphecy
    ) {
        $objectProphecy->getMethodProphecies()->willReturn(array());

        $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3))->shouldReturn(null);
    }

    function it_executes_promise_of_method_prophecy_that_matches_signature_passed_to_makeCall(
        $objectProphecy,
        MethodProphecy $method1,
        MethodProphecy $method2,
        MethodProphecy $method3,
        ArgumentsWildcard $arguments1,
        ArgumentsWildcard $arguments2,
        ArgumentsWildcard $arguments3,
        PromiseInterface $promise
    ) {
        $method1->hasReturnVoid()->willReturn(false);
        $method1->getMethodName()->willReturn('getName');
        $method1->getArgumentsWildcard()->willReturn($arguments1);
        $arguments1->scoreArguments(array('world', 'everything'))->willReturn(false);

        $method2->hasReturnVoid()->willReturn(false);
        $method2->getMethodName()->willReturn('setTitle');
        $method2->getArgumentsWildcard()->willReturn($arguments2);
        $arguments2->scoreArguments(array('world', 'everything'))->willReturn(false);

        $method3->hasReturnVoid()->willReturn(false);
        $method3->getMethodName()->willReturn('getName');
        $method3->getArgumentsWildcard()->willReturn($arguments3);
        $method3->getPromise()->willReturn($promise);
        $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200);

        $objectProphecy->getMethodProphecies()->willReturn(array(
            'method1' => array($method1),
            'method2' => array($method2, $method3),
        ));
        $objectProphecy->getMethodProphecies('getName')->willReturn(array($method1, $method3));
        $objectProphecy->reveal()->willReturn(new \stdClass());

        $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method3)->willReturn(42);

        $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))->shouldReturn(42);

        $calls = $this->findCalls('getName', $arguments3);
        $calls->shouldHaveCount(1);
        $calls[0]->getReturnValue()->shouldReturn(42);
    }

    function it_executes_promise_of_method_prophecy_that_matches_with_highest_score_to_makeCall(
        $objectProphecy,
        MethodProphecy $method1,
        MethodProphecy $method2,
        MethodProphecy $method3,
        ArgumentsWildcard $arguments1,
        ArgumentsWildcard $arguments2,
        ArgumentsWildcard $arguments3,
        PromiseInterface $promise
    ) {
        $method1->hasReturnVoid()->willReturn(false);
        $method1->getMethodName()->willReturn('getName');
        $method1->getArgumentsWildcard()->willReturn($arguments1);
        $arguments1->scoreArguments(array('world', 'everything'))->willReturn(50);

        $method2->hasReturnVoid()->willReturn(false);
        $method2->getMethodName()->willReturn('getName');
        $method2->getArgumentsWildcard()->willReturn($arguments2);
        $method2->getPromise()->willReturn($promise);
        $arguments2->scoreArguments(array('world', 'everything'))->willReturn(300);

        $method3->hasReturnVoid()->willReturn(false);
        $method3->getMethodName()->willReturn('getName');
        $method3->getArgumentsWildcard()->willReturn($arguments3);
        $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200);

        $objectProphecy->getMethodProphecies()->willReturn(array(
            'method1' => array($method1),
            'method2' => array($method2, $method3),
        ));
        $objectProphecy->getMethodProphecies('getName')->willReturn(array(
            $method1, $method2, $method3,
        ));
        $objectProphecy->reveal()->willReturn(new \stdClass());

        $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method2)
            ->willReturn('second');

        $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))
            ->shouldReturn('second');
    }

    function it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise(
        $objectProphecy,
        MethodProphecy $method,
        ArgumentsWildcard $arguments
    ) {
        $method->hasReturnVoid()->willReturn(false);
        $method->getMethodName()->willReturn('getName');
        $method->getArgumentsWildcard()->willReturn($arguments);
        $method->getPromise()->willReturn(null);
        $arguments->scoreArguments(array('world', 'everything'))->willReturn(100);

        $objectProphecy->getMethodProphecies()->willReturn(array($method));
        $objectProphecy->getMethodProphecies('getName')->willReturn(array($method));

        $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))
            ->shouldReturn(null);
    }

    function it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard(
        $objectProphecy,
        ArgumentsWildcard $wildcard
    ) {
        $objectProphecy->getMethodProphecies()->willReturn(array());

        $this->makeCall($objectProphecy, 'getName', array('world'));
        $this->makeCall($objectProphecy, 'getName', array('everything'));
        $this->makeCall($objectProphecy, 'setName', array(42));

        $wildcard->scoreArguments(array('world'))->willReturn(false);
        $wildcard->scoreArguments(array('everything'))->willReturn(10);

        $calls = $this->findCalls('getName', $wildcard);

        $calls->shouldHaveCount(1);
        $calls[0]->getMethodName()->shouldReturn('getName');
        $calls[0]->getArguments()->shouldReturn(array('everything'));
    }

    function it_records_the_error_when_stub_has_got_unexpected_method_calls(
        $objectProphecy,
        MethodProphecy $method,
        ArgumentsWildcard $arguments
    ) {
        $method->getMethodName()->willReturn('getName');
        $method->getArgumentsWildcard()->willReturn($arguments);

        $arguments->getTokens()->willReturn(array());

        $objectProphecy->getMethodProphecies()->willReturn(array('getName' => array($method)));
        $objectProphecy->getMethodProphecies('getName')->willReturn(array($method));
        $objectProphecy->getMethodProphecies('method1')->willReturn(array());
        $objectProphecy->reveal()->willReturn(new \stdClass());

        $this->shouldNotThrow('Prophecy\Exception\Call\UnexpectedCallException')
             ->duringMakeCall($objectProphecy, 'method1', array());

        $this->shouldThrow('Prophecy\Exception\Call\UnexpectedCallException')->duringCheckUnexpectedCalls();
    }
}


================================================
FILE: spec/Prophecy/Call/CallSpec.php
================================================
<?php

namespace spec\Prophecy\Call;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument\ArgumentsWildcard;

class CallSpec extends ObjectBehavior
{
    function let(\Exception $exception)
    {
        $this->beConstructedWith('setValues', array(5, 2), 42, $exception, 'some_file.php', 23);
    }

    function it_exposes_method_name_through_getter()
    {
        $this->getMethodName()->shouldReturn('setValues');
    }

    function it_exposes_arguments_through_getter()
    {
        $this->getArguments()->shouldReturn(array(5, 2));
    }

    function it_exposes_return_value_through_getter()
    {
        $this->getReturnValue()->shouldReturn(42);
    }

    function it_exposes_exception_through_getter($exception)
    {
        $this->getException()->shouldReturn($exception);
    }

    function it_exposes_file_and_line_through_getter()
    {
        $this->getFile()->shouldReturn('some_file.php');
        $this->getLine()->shouldReturn(23);
    }

    function it_returns_shortpath_to_callPlace()
    {
        $this->getCallPlace()->shouldReturn('some_file.php:23');
    }

    function it_returns_unknown_as_callPlace_if_no_file_or_line_provided()
    {
        $this->beConstructedWith('setValues', array(), 0, null, null, null);

        $this->getCallPlace()->shouldReturn('unknown');
    }

    function it_adds_wildcard_match_score(ArgumentsWildcard $wildcard)
    {
        $this->addScore($wildcard, 99)->shouldReturn($this);
        $this->getScore($wildcard)->shouldReturn(99);
    }

    function it_caches_and_returns_wildcard_match_score(ArgumentsWildcard $wildcard)
    {
        $wildcard->scoreArguments(array(5, 2))->willReturn(13)->shouldBeCalledTimes(1);
        $this->getScore($wildcard)->shouldReturn(13);
        $this->getScore($wildcard)->shouldReturn(13);
    }
}


================================================
FILE: spec/Prophecy/Comparator/ClosureComparatorSpec.php
================================================
<?php

namespace spec\Prophecy\Comparator;

use PhpSpec\ObjectBehavior;

class ClosureComparatorSpec extends ObjectBehavior
{
    function it_is_comparator()
    {
        $this->shouldHaveType('SebastianBergmann\Comparator\Comparator');
    }

    function it_accepts_only_closures()
    {
        $this->accepts(123, 321)->shouldReturn(false);
        $this->accepts('string', 'string')->shouldReturn(false);
        $this->accepts(false, true)->shouldReturn(false);
        $this->accepts(true, false)->shouldReturn(false);
        $this->accepts((object) array(), (object) array())->shouldReturn(false);
        $this->accepts(function () {}, (object) array())->shouldReturn(false);
        $this->accepts(function () {}, (object) array())->shouldReturn(false);

        $this->accepts(function () {}, function () {})->shouldReturn(true);
    }

    function it_asserts_that_different_closures_are_different()
    {
        $this->shouldThrow()->duringAssertEquals(function () {}, function () {});
    }

    function it_asserts_that_closures_are_equal_if_its_the_same_closure()
    {
        $closure = function () {};

        $this->shouldNotThrow()->duringAssertEquals($closure, $closure);
    }
}


================================================
FILE: spec/Prophecy/Comparator/FactorySpec.php
================================================
<?php

namespace spec\Prophecy\Comparator;

use PhpSpec\Exception\Example\SkippingException;
use PhpSpec\ObjectBehavior;
use Prophecy\Comparator\Factory;
use SebastianBergmann\Comparator\Factory as BaseFactory;

class FactorySpec extends ObjectBehavior
{
    function let()
    {
        $ref = new \ReflectionClass(BaseFactory::class);

        if ($ref->isFinal()) {
            throw new SkippingException(sprintf('The deprecated "%s" class cannot be used with sebastian/comparator 5+.', Factory::class));
        }
    }

    function it_extends_Sebastian_Comparator_Factory()
    {
        $this->shouldHaveType('SebastianBergmann\Comparator\Factory');
    }

    function it_should_have_ClosureComparator_registered()
    {
        $comparator = $this->getInstance()->getComparatorFor(function () {}, function () {});
        $comparator->shouldHaveType('Prophecy\Comparator\ClosureComparator');
    }
}


================================================
FILE: spec/Prophecy/Comparator/ProphecyComparatorSpec.php
================================================
<?php

namespace spec\Prophecy\Comparator;

use PhpSpec\ObjectBehavior;
use Prophecy\Prophet;
use SebastianBergmann\Comparator\Comparator;
use SebastianBergmann\Comparator\Factory;

class ProphecyComparatorSpec extends ObjectBehavior
{
    function it_is_a_comparator()
    {
        $this->shouldHaveType(Comparator::class);
    }

    function it_accepts_only_prophecy_objects()
    {
        $this->accepts(123, 321)->shouldReturn(false);
        $this->accepts('string', 'string')->shouldReturn(false);
        $this->accepts(false, true)->shouldReturn(false);
        $this->accepts(true, false)->shouldReturn(false);
        $this->accepts((object) array(), (object) array())->shouldReturn(false);
        $this->accepts(function () {}, (object) array())->shouldReturn(false);
        $this->accepts(function () {}, function () {})->shouldReturn(false);

        $prophet = new Prophet();
        $prophecy = $prophet->prophesize('Prophecy\Prophecy\ObjectProphecy');

        $this->accepts($prophecy, $prophecy)->shouldReturn(true);
    }

    function it_asserts_that_an_object_is_equal_to_its_revealed_prophecy()
    {
        $prophet = new Prophet();
        $prophecy = $prophet->prophesize('Prophecy\Prophecy\ObjectProphecy');
        $prophecy->__call('reveal', array())->willReturn(new \stdClass());

        $factory = new Factory();
        $factory->register($this->getWrappedObject());

        $this->shouldNotThrow()->duringAssertEquals($prophecy->reveal(), $prophecy);
    }
}


================================================
FILE: spec/Prophecy/Doubler/CachedDoublerSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\ClassPatch\ClassPatchInterface;
use Prophecy\Doubler\Generator\ClassCreator;
use Prophecy\Doubler\Generator\ClassMirror;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\NameGenerator;

class CachedDoublerSpec extends ObjectBehavior
{
    function let(ClassMirror $mirror, ClassCreator $creator, NameGenerator $namer)
    {
        $this->beConstructedWith($mirror, $creator, $namer);
        $this->resetCache();
    }

    /**
     * @todo implement
     * T - T
     * T - F
     * F - T
     * F - F
     * F T F
     * F T T
     */

    // T - -
    function it_creates_only_one_class_definition_for_the_same_class_without_interfaces_and_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        \ReflectionClass $class,
        ClassNode $node
    ) {
        $mirror->reflect($class, array())->willReturn($node);
        $namer->name($class, array())->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');

        $creator->create('SplStack', $node)->shouldBeCalledTimes(1);

        $this->double($class, array());
        $this->double($class, array());
    }

    // F - -
    function it_creates_two_class_definitions_for_different_classes_without_interfaces_and_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        \ReflectionClass $class1,
        \ReflectionClass $class2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class1, array())->willReturn($node1);
        $mirror->reflect($class2, array())->willReturn($node2);
        $namer->name($class1, array())->willReturn('SplStack');
        $namer->name($class2, array())->willReturn('spec\Prophecy\Doubler\aClass');
        $class1->getName()->willReturn('stdClass');
        $class2->getName()->willReturn('aClass');

        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('spec\Prophecy\Doubler\aClass', $node2)->shouldBeCalledTimes(1);

        $this->double($class1, array());
        $this->double($class2, array());
    }

    // T F T
    function it_creates_two_different_class_definitions_for_the_same_class_with_different_interfaces_and_same_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        \ReflectionClass $class,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class, array($interface1))->willReturn($node1);
        $mirror->reflect($class, array($interface2))->willReturn($node2);
        $alt1->supports($node1)->willReturn(true);
        $alt1->supports($node2)->willReturn(true);
        $alt2->supports($node1)->willReturn(false);
        $alt2->supports($node2)->willReturn(false);
        $alt1->getPriority()->willReturn(1);
        $alt2->getPriority()->willReturn(2);
        $namer->name($class, array($interface1))->willReturn('SplStack');
        $namer->name($class, array($interface2))->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $alt1->apply($node1)->shouldBeCalled();
        $alt1->apply($node2)->shouldBeCalled();
        $alt2->apply($node1)->shouldNotBeCalled();
        $alt2->apply($node2)->shouldNotBeCalled();
        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('SplStack', $node2)->shouldBeCalledTimes(1);

        $this->registerClassPatch($alt1);
        $this->registerClassPatch($alt2);

        $this->double($class, array($interface1));
        $this->double($class, array($interface2));
    }

    // F F T
    function it_creates_two_different_class_definitions_for_different_classes_with_different_interfaces_and_same_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        \ReflectionClass $class1,
        \ReflectionClass $class2,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class1, array($interface1))->willReturn($node1);
        $mirror->reflect($class2, array($interface2))->willReturn($node2);
        $alt1->supports($node1)->willReturn(true);
        $alt1->supports($node2)->willReturn(true);
        $alt2->supports($node1)->willReturn(false);
        $alt2->supports($node2)->willReturn(false);
        $alt1->getPriority()->willReturn(1);
        $alt2->getPriority()->willReturn(2);
        $namer->name($class1, array($interface1))->willReturn('SplStack');
        $namer->name($class2, array($interface2))->willReturn('spec\Prophecy\Doubler\aClass');
        $class1->getName()->willReturn('stdClass');
        $class2->getName()->willReturn('aClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $alt1->apply($node1)->shouldBeCalled();
        $alt1->apply($node2)->shouldBeCalled();
        $alt2->apply($node1)->shouldNotBeCalled();
        $alt2->apply($node2)->shouldNotBeCalled();
        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('spec\Prophecy\Doubler\aClass', $node2)->shouldBeCalledTimes(1);

        $this->registerClassPatch($alt1);
        $this->registerClassPatch($alt2);

        $this->double($class1, array($interface1));
        $this->double($class2, array($interface2));
    }

    // T T -
    function it_creates_only_one_class_definition_for_the_same_class_with_same_interfaces_and_without_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        \ReflectionClass $class,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node
    ) {
        $mirror->reflect($class, array($interface1, $interface2))->willReturn($node);
        $namer->name($class, array($interface1, $interface2))->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $creator->create('SplStack', $node)->shouldBeCalledTimes(1);

        $this->double($class, array($interface1, $interface2));
        $this->double($class, array($interface1, $interface2));
    }

    // F T -
    function it_creates_only_one_class_definition_for_different_classes_with_same_interfaces_and_without_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        \ReflectionClass $class1,
        \ReflectionClass $class2,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class1, array($interface1, $interface2))->willReturn($node1);
        $mirror->reflect($class2, array($interface1, $interface2))->willReturn($node2);
        $namer->name($class1, array($interface1, $interface2))->willReturn('SplStack');
        $namer->name($class2, array($interface1, $interface2))->willReturn('spec\Prophecy\Doubler\aClass');
        $class1->getName()->willReturn('stdClass');
        $class2->getName()->willReturn('aClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('spec\Prophecy\Doubler\aClass', $node2)->shouldBeCalledTimes(1);

        $this->double($class1, array($interface1, $interface2));
        $this->double($class2, array($interface1, $interface2));
    }

    // T F -
    function it_creates_two_different_class_definitions_for_the_same_class_with_different_interfaces_and_without_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        \ReflectionClass $class,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class, array($interface1))->willReturn($node1);
        $mirror->reflect($class, array($interface2))->willReturn($node2);
        $namer->name($class, array($interface1))->willReturn('SplStack');
        $namer->name($class, array($interface2))->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('SplStack', $node2)->shouldBeCalledTimes(1);

        $this->double($class, array($interface1));
        $this->double($class, array($interface2));
    }

    // F F -
    function it_creates_two_different_class_definitions_for_different_classes_with_different_interfaces_and_without_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        \ReflectionClass $class1,
        \ReflectionClass $class2,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class1, array($interface1))->willReturn($node1);
        $mirror->reflect($class2, array($interface2))->willReturn($node2);
        $namer->name($class1, array($interface1))->willReturn('SplStack');
        $namer->name($class2, array($interface2))->willReturn('spec\Prophecy\Doubler\aClass');
        $class1->getName()->willReturn('stdClass');
        $class2->getName()->willReturn('aClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('spec\Prophecy\Doubler\aClass', $node2)->shouldBeCalledTimes(1);

        $this->double($class1, array($interface1));
        $this->double($class2, array($interface2));
    }

    // T T T
    function it_creates_only_one_class_definition_for_the_same_class_with_same_interfaces_and_same_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        \ReflectionClass $class,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node
    ) {
        $mirror->reflect($class, array($interface1, $interface2))->willReturn($node);
        $alt1->supports($node)->willReturn(true);
        $alt2->supports($node)->willReturn(false);
        $alt1->getPriority()->willReturn(1);
        $alt2->getPriority()->willReturn(2);
        $namer->name($class, array($interface1, $interface2))->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $alt1->apply($node)->shouldBeCalled();
        $alt2->apply($node)->shouldNotBeCalled();
        $creator->create('SplStack', $node)->shouldBeCalledTimes(1);

        $this->registerClassPatch($alt1);
        $this->registerClassPatch($alt2);

        $this->double($class, array($interface1, $interface2));
        $this->double($class, array($interface1, $interface2));
    }

    // F F F
    function it_creates_two_class_definitions_for_different_classes_with_different_interfaces_and_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        \ReflectionClass $class1,
        \ReflectionClass $class2,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class1, array($interface1))->willReturn($node1);
        $mirror->reflect($class2, array($interface2))->willReturn($node2);
        $alt1->supports($node1)->willReturn(true);
        $alt1->supports($node2)->willReturn(true);
        $alt2->supports($node2)->willReturn(false);
        $alt1->getPriority()->willReturn(1);
        $alt2->getPriority()->willReturn(2);
        $namer->name($class1, array($interface1))->willReturn('SplStack');
        $namer->name($class2, array($interface2))->willReturn('spec\Prophecy\Doubler\aClass');
        $class1->getName()->willReturn('stdClass');
        $class2->getName()->willReturn('aClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $alt1->apply($node1)->shouldBeCalled();
        $alt1->apply($node2)->shouldBeCalled();
        $alt2->apply($node2)->shouldNotBeCalled();
        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('spec\Prophecy\Doubler\aClass', $node2)->shouldBeCalledTimes(1);

        $this->registerClassPatch($alt1);
        $this->double($class1, array($interface1));

        $this->registerClassPatch($alt2);
        $this->double($class2, array($interface2));
    }

    // T F F
    function it_creates_two_class_definitions_for_the_same_class_with_different_interfaces_and_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        \ReflectionClass $class,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class, array($interface1))->willReturn($node1);
        $mirror->reflect($class, array($interface2))->willReturn($node2);
        $alt1->supports($node1)->willReturn(true);
        $alt1->supports($node2)->willReturn(true);
        $alt2->supports($node2)->willReturn(false);
        $alt1->getPriority()->willReturn(1);
        $alt2->getPriority()->willReturn(2);
        $namer->name($class, array($interface1))->willReturn('SplStack');
        $namer->name($class, array($interface2))->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $alt1->apply($node1)->shouldBeCalled();
        $alt1->apply($node2)->shouldBeCalled();
        $alt2->apply($node2)->shouldNotBeCalled();
        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);
        $creator->create('SplStack', $node2)->shouldBeCalledTimes(1);

        $this->registerClassPatch($alt1);
        $this->double($class, array($interface1));

        $this->registerClassPatch($alt2);
        $this->double($class, array($interface2));
    }

    // T T F
    function it_creates_two_different_class_definitions_for_the_same_class_with_same_interfaces_and_different_patches(
        ClassMirror $mirror,
        ClassCreator $creator,
        NameGenerator $namer,
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        \ReflectionClass $class,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node1,
        ClassNode $node2
    ) {
        $mirror->reflect($class, array($interface1, $interface2))->willReturn($node1, $node2);
        $alt1->supports($node1)->willReturn(true);
        $alt1->supports($node2)->willReturn(true);
        $alt2->supports($node2)->willReturn(false);
        $alt1->getPriority()->willReturn(1);
        $alt2->getPriority()->willReturn(2);
        $namer->name($class, array($interface1, $interface2))->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $alt1->apply($node1)->shouldBeCalled();
        $creator->create('SplStack', $node1)->shouldBeCalledTimes(1);

        $this->registerClassPatch($alt1);
        $this->double($class, array($interface1, $interface2));

        $alt1->apply($node2)->shouldBeCalled();
        $alt2->apply($node2)->shouldNotBeCalled();
        $creator->create('SplStack', $node2)->shouldBeCalledTimes(1);

        $this->registerClassPatch($alt2);
        $this->double($class, array($interface1, $interface2));
    }
}

class aClass {}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Prophecy\Doubler\Generator\Node\ArgumentNode;
use Prophecy\Doubler\Generator\Node\ArgumentTypeNode;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;
use Prophecy\Doubler\Generator\Node\Type\BuiltinType;
use Prophecy\Doubler\Generator\Node\Type\UnionType;

class DisableConstructorPatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function its_priority_is_100()
    {
        $this->getPriority()->shouldReturn(100);
    }

    function it_supports_anything(ClassNode $node)
    {
        $this->supports($node)->shouldReturn(true);
    }

    function it_makes_all_constructor_arguments_optional(
        ClassNode $class,
        MethodNode $method,
        ArgumentNode $arg1,
        ArgumentNode $arg2,
        ArgumentNode $arg3
    ) {
        $arg1->getTypeNode()->willReturn(new ArgumentTypeNode(new UnionType([
            new BuiltinType('string'),
            new BuiltinType('null'),
        ])));
        $arg2->getTypeNode()->willReturn(new ArgumentTypeNode(new BuiltinType('mixed')));
        $arg3->getTypeNode()->willReturn(new ArgumentTypeNode(new BuiltinType('string')));

        $class->isExtendable('__construct')->willReturn(true);
        $class->hasMethod('__construct')->willReturn(true);
        $class->getMethod('__construct')->willReturn($method);
        $method->getArguments()->willReturn(array($arg1, $arg2, $arg3));

        $arg1->setDefault(null)->shouldBeCalled();
        $arg2->setDefault(null)->shouldBeCalled();
        $arg3->setDefault(null)->shouldBeCalled();

        $arg3->setTypeNode(new ArgumentTypeNode(new UnionType([new BuiltinType('null'), new BuiltinType('string')])))->shouldBeCalled();

        $method->setCode(Argument::type('string'))->shouldBeCalled();

        $this->apply($class);
    }

    function it_creates_new_constructor_if_object_has_none(ClassNode $class)
    {
        $class->isExtendable('__construct')->willReturn(true);
        $class->hasMethod('__construct')->willReturn(false);
        $class->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))
            ->shouldBeCalled();

        $this->apply($class);
    }

    function it_ignores_final_constructor(ClassNode $class)
    {
        $class->isExtendable('__construct')->willReturn(false);

        $this->apply($class);
    }
}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;

class KeywordPatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function its_priority_is_49()
    {
        $this->getPriority()->shouldReturn(49);
    }

    function it_will_remove_halt_compiler_method(
        ClassNode $node,
        MethodNode $method1,
        MethodNode $method2,
        MethodNode $method3
    ) {
        $node->removeMethod('__halt_compiler')->shouldBeCalled();

        $method1->getName()->willReturn('__halt_compiler');
        $method2->getName()->willReturn('echo');
        $method3->getName()->willReturn('notKeyword');

        $node->getMethods()->willReturn(array(
            '__halt_compiler' => $method1,
            'echo' => $method2,
            'notKeyword' => $method3,
        ));

        $this->apply($node);
    }
}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;

class MagicCallPatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function it_supports_anything(ClassNode $node)
    {
        $this->supports($node)->shouldReturn(true);
    }

    function it_discovers_api_using_phpdoc(ClassNode $node)
    {
        $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApi');
        $node->getInterfaces()->willReturn(array());

        $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled();

        $this->apply($node);
    }

    function it_ignores_existing_methods(ClassNode $node)
    {
        $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiExtended');
        $node->getInterfaces()->willReturn(array());

        $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled();
        $node->addMethod(new MethodNode('definedMethod'))->shouldNotBeCalled();

        $this->apply($node);
    }

    function it_ignores_empty_methods_from_phpdoc(ClassNode $node)
    {
        $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiInvalidMethodDefinition');
        $node->getInterfaces()->willReturn(array());

        $node->addMethod(new MethodNode(''))->shouldNotBeCalled();

        $this->apply($node);
    }

    function it_discovers_api_using_phpdoc_from_implemented_interfaces(ClassNode $node)
    {
        $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiImplemented');
        $node->getInterfaces()->willReturn(array());

        $node->addMethod(new MethodNode('implementedMethod'))->shouldBeCalled();

        $this->apply($node);
    }

    function it_discovers_api_using_phpdoc_from_own_interfaces(ClassNode $node)
    {
        $node->getParentClass()->willReturn('stdClass');
        $node->getInterfaces()->willReturn(array('spec\Prophecy\Doubler\ClassPatch\MagicalApiImplemented'));

        $node->addMethod(new MethodNode('implementedMethod'))->shouldBeCalled();

        $this->apply($node);
    }

    function it_discovers_api_using_phpdoc_from_extended_parent_interfaces(ClassNode $node)
    {
        $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiImplementedExtended');
        $node->getInterfaces()->willReturn(array());

        $node->addMethod(new MethodNode('implementedMethod'))->shouldBeCalled();

        $this->apply($node);
    }

    function it_has_50_priority()
    {
        $this->getPriority()->shouldReturn(50);
    }
}

/**
 * @method void undefinedMethod()
 */
class MagicalApi
{
    /**
     * @return void
     */
    public function definedMethod() {}
}

/**
 * @method
 */
class MagicalApiInvalidMethodDefinition {}

/**
 * @method void definedMethod()
 */
class MagicalApiExtended extends MagicalApi {}

/**
 */
class MagicalApiImplemented implements MagicalApiInterface {}

/**
 */
class MagicalApiImplementedExtended extends MagicalApiImplemented {}

/**
 * @method void implementedMethod()
 */
interface MagicalApiInterface {}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;
use Prophecy\Doubler\Generator\Node\ReturnTypeNode;
use Prophecy\Doubler\Generator\Node\Type\BuiltinType;

class ProphecySubjectPatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function it_has_priority_of_0()
    {
        $this->getPriority()->shouldReturn(0);
    }

    function it_supports_any_class(ClassNode $node)
    {
        $this->supports($node)->shouldReturn(true);
    }

    function it_forces_class_to_implement_ProphecySubjectInterface(ClassNode $node)
    {
        $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->shouldBeCalled();

        $node->addProperty('objectProphecyClosure', 'private')->willReturn(null);
        $node->getMethods()->willReturn(array());
        $node->hasMethod(Argument::any())->willReturn(false);
        $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'), true)->willReturn(null);
        $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'), true)->willReturn(null);

        $this->apply($node);
    }

    function it_forces_all_class_methods_except_constructor_to_proxy_calls_into_prophecy_makeCall(
        ClassNode $node,
        MethodNode $constructor,
        MethodNode $method1,
        MethodNode $method2,
        MethodNode $method3,
        MethodNode $method4
    ) {
        $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->willReturn(null);
        $node->addProperty('objectProphecyClosure', 'private')->willReturn(null);
        $node->hasMethod(Argument::any())->willReturn(false);
        $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'), true)->willReturn(null);
        $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'), true)->willReturn(null);

        $constructor->getName()->willReturn('__construct');
        $method1->getName()->willReturn('method1');
        $method2->getName()->willReturn('method2');
        $method3->getName()->willReturn('method3');
        $method4->getName()->willReturn('method4');

        $method1->getReturnTypeNode()->willReturn(new ReturnTypeNode(new BuiltinType('int')));
        $method2->getReturnTypeNode()->willReturn(new ReturnTypeNode(new BuiltinType('int')));
        $method3->getReturnTypeNode()->willReturn(new ReturnTypeNode(new BuiltinType('void')));
        $method4->getReturnTypeNode()->willReturn(new ReturnTypeNode(new BuiltinType('never')));

        $node->getMethods()->willReturn(array(
            'method1' => $method1,
            'method2' => $method2,
            'method3' => $method3,
            'method4' => $method4,
        ));

        $constructor->setCode(Argument::any())->shouldNotBeCalled();

        $method1->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());')
            ->shouldBeCalled();
        $method2->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());')
            ->shouldBeCalled();
        $method3->setCode('$this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());')
            ->shouldBeCalled();
        $method4->setCode('$this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());')
            ->shouldBeCalled();

        $this->apply($node);
    }
}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\ArgumentNode;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;

class ReflectionClassNewInstancePatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function its_priority_is_50()
    {
        $this->getPriority()->shouldReturn(50);
    }

    function it_supports_ReflectionClass_only(ClassNode $reflectionClassNode, ClassNode $anotherClassNode)
    {
        $reflectionClassNode->getParentClass()->willReturn('ReflectionClass');
        $anotherClassNode->getParentClass()->willReturn('stdClass');

        $this->supports($reflectionClassNode)->shouldReturn(true);
        $this->supports($anotherClassNode)->shouldReturn(false);
    }

    function it_makes_all_newInstance_arguments_optional(
        ClassNode $class,
        MethodNode $method,
        ArgumentNode $arg1
    ) {
        $class->getMethod('newInstance')->willReturn($method);
        $method->getArguments()->willReturn(array($arg1));
        $arg1->setDefault(null)->shouldBeCalled();

        $this->apply($class);
    }
}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;

class SplFileInfoPatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function its_priority_is_50()
    {
        $this->getPriority()->shouldReturn(50);
    }

    function it_does_not_support_nodes_without_parent_class(ClassNode $node)
    {
        $node->getParentClass()->willReturn('stdClass');
        $this->supports($node)->shouldReturn(false);
    }

    function it_supports_nodes_with_SplFileInfo_as_parent_class(ClassNode $node)
    {
        $node->getParentClass()->willReturn('SplFileInfo');
        $this->supports($node)->shouldReturn(true);
    }

    function it_supports_nodes_with_derivative_of_SplFileInfo_as_parent_class(ClassNode $node)
    {
        $node->getParentClass()->willReturn('SplFileInfo');
        $this->supports($node)->shouldReturn(true);
    }

    function it_adds_a_method_to_node_if_not_exists(ClassNode $node)
    {
        $node->hasMethod('__construct')->willReturn(false);
        $node->addMethod(Argument::any())->shouldBeCalled();
        $node->getParentClass()->shouldBeCalled();

        $this->apply($node);
    }

    function it_updates_existing_method_if_found(ClassNode $node, MethodNode $method)
    {
        $node->hasMethod('__construct')->willReturn(true);
        $node->getMethod('__construct')->willReturn($method);
        $node->getParentClass()->shouldBeCalled();

        $method->useParentCode()->shouldBeCalled();

        $this->apply($node);
    }

    function it_should_not_supply_a_file_for_a_directory_iterator(ClassNode $node, MethodNode $method)
    {
        $node->hasMethod('__construct')->willReturn(true);
        $node->getMethod('__construct')->willReturn($method);
        $node->getParentClass()->willReturn('DirectoryIterator');

        $method->setCode(Argument::that(function ($value) {
            return strpos($value, '.php') === false;
        }))->shouldBeCalled();

        $this->apply($node);
    }

    function it_should_supply_a_file_for_a_spl_file_object(ClassNode $node, MethodNode $method)
    {
        $node->hasMethod('__construct')->willReturn(true);
        $node->getMethod('__construct')->willReturn($method);
        $node->getParentClass()->willReturn('SplFileObject');

        $method->setCode(Argument::that(function ($value) {
            return strpos($value, '.php') !== false;
        }))->shouldBeCalled();

        $this->apply($node);
    }

    function it_should_supply_a_file_for_a_symfony_spl_file_info(ClassNode $node, MethodNode $method)
    {
        $node->hasMethod('__construct')->willReturn(true);
        $node->getMethod('__construct')->willReturn($method);
        $node->getParentClass()->willReturn('Symfony\\Component\\Finder\\SplFileInfo');

        $method->setCode(Argument::that(function ($value) {
            return strpos($value, '.php') !== false;
        }))->shouldBeCalled();

        $this->apply($node);
    }
}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/ThrowablePatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\ClassNode;

class ThrowablePatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function it_does_not_support_class_that_does_not_implement_throwable(ClassNode $node)
    {
        $node->getInterfaces()->willReturn(array());
        $node->getParentClass()->willReturn('stdClass');

        $this->supports($node)->shouldReturn(false);
    }

    function it_supports_class_that_extends_not_throwable_class(ClassNode $node)
    {
        $node->getInterfaces()->willReturn(array('Throwable'));
        $node->getParentClass()->willReturn('stdClass');

        $this->supports($node)->shouldReturn(true);
    }

    function it_does_not_support_class_that_already_extends_a_throwable_class(ClassNode $node)
    {
        $node->getInterfaces()->willReturn(array('Throwable'));
        $node->getParentClass()->willReturn('InvalidArgumentException');

        $this->supports($node)->shouldReturn(false);
    }

    function it_supports_class_implementing_interface_that_extends_throwable(ClassNode $node)
    {
        $node->getInterfaces()->willReturn(array('Fixtures\Prophecy\ThrowableInterface'));
        $node->getParentClass()->willReturn('stdClass');

        $this->supports($node)->shouldReturn(true);
    }

    function it_sets_the_parent_class_to_exception(ClassNode $node)
    {
        $node->getParentClass()->willReturn('stdClass');

        $node->setParentClass('Exception')->shouldBeCalled();

        $node->removeMethod('getMessage')->shouldBeCalled();
        $node->removeMethod('getCode')->shouldBeCalled();
        $node->removeMethod('getFile')->shouldBeCalled();
        $node->removeMethod('getLine')->shouldBeCalled();
        $node->removeMethod('getTrace')->shouldBeCalled();
        $node->removeMethod('getPrevious')->shouldBeCalled();
        $node->removeMethod('getNext')->shouldBeCalled();
        $node->removeMethod('getTraceAsString')->shouldBeCalled();

        $this->apply($node);
    }

    function it_throws_error_when_trying_to_double_concrete_class_and_throwable_interface(ClassNode $node)
    {
        $node->getParentClass()->willReturn('ArrayObject');

        $this->shouldThrow('Prophecy\Exception\Doubler\ClassCreatorException')->duringApply($node);
    }
}


================================================
FILE: spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\ClassPatch;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;

class TraversablePatchSpec extends ObjectBehavior
{
    function it_is_a_patch()
    {
        $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
    }

    function it_supports_class_that_implements_only_Traversable(ClassNode $node)
    {
        $node->getInterfaces()->willReturn(array('Traversable'));

        $this->supports($node)->shouldReturn(true);
    }

    function it_does_not_support_class_that_implements_Iterator(ClassNode $node)
    {
        $node->getInterfaces()->willReturn(array('Traversable', 'Iterator'));

        $this->supports($node)->shouldReturn(false);
    }

    function it_does_not_support_class_that_implements_IteratorAggregate(ClassNode $node)
    {
        $node->getInterfaces()->willReturn(array('Traversable', 'IteratorAggregate'));

        $this->supports($node)->shouldReturn(false);
    }

    function it_has_100_priority()
    {
        $this->getPriority()->shouldReturn(100);
    }

    function it_forces_node_to_implement_IteratorAggregate(ClassNode $node)
    {
        $node->addInterface('Iterator')->shouldBeCalled();

        $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null);

        $this->apply($node);
    }

    function it_adds_methods_to_implement_iterator(ClassNode $node)
    {
        $node->addInterface('Iterator')->shouldBeCalled();

        $methodReturnTypes = [
            'current' => 'mixed',
            'key' => 'mixed',
            'next' => 'void',
            'rewind' => 'void',
            'valid' => 'bool',
        ];

        foreach ($methodReturnTypes as $methodName => $returnType) {
            $node->addMethod(Argument::that(static function ($value) use ($methodName, $returnType) {
                return $value instanceof MethodNode
                    && $value->getName() === $methodName
                    && (\PHP_VERSION_ID < 80100 || $value->getReturnTypeNode()->getTypes() === [$returnType]);
            }))->shouldBeCalled();
        }

        $this->apply($node);
    }
}


================================================
FILE: spec/Prophecy/Doubler/DoublerSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\ClassPatch\ClassPatchInterface;
use Prophecy\Doubler\Generator\ClassCreator;
use Prophecy\Doubler\Generator\ClassMirror;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\NameGenerator;

class DoublerSpec extends ObjectBehavior
{
    function let(ClassMirror $mirror, ClassCreator $creator, NameGenerator $namer)
    {
        $this->beConstructedWith($mirror, $creator, $namer);
    }

    function it_does_not_have_patches_by_default()
    {
        $this->getClassPatches()->shouldHaveCount(0);
    }

    function its_registerClassPatch_adds_a_patch_to_the_doubler(ClassPatchInterface $patch)
    {
        $this->registerClassPatch($patch);
        $this->getClassPatches()->shouldReturn(array($patch));
    }

    function its_getClassPatches_sorts_patches_by_priority(
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        ClassPatchInterface $alt3,
        ClassPatchInterface $alt4
    ) {
        $alt1->getPriority()->willReturn(2);
        $alt2->getPriority()->willReturn(50);
        $alt3->getPriority()->willReturn(10);
        $alt4->getPriority()->willReturn(0);

        $this->registerClassPatch($alt1);
        $this->registerClassPatch($alt2);
        $this->registerClassPatch($alt3);
        $this->registerClassPatch($alt4);

        $this->getClassPatches()->shouldReturn(array($alt2, $alt3, $alt1, $alt4));
    }

    function its_double_mirrors_alterates_and_instantiates_provided_class(
        $mirror,
        $creator,
        $namer,
        ClassPatchInterface $alt1,
        ClassPatchInterface $alt2,
        \ReflectionClass $class,
        \ReflectionClass $interface1,
        \ReflectionClass $interface2,
        ClassNode $node
    ) {
        $mirror->reflect($class, array($interface1, $interface2))->willReturn($node);
        $alt1->supports($node)->willReturn(true);
        $alt2->supports($node)->willReturn(false);
        $alt1->getPriority()->willReturn(1);
        $alt2->getPriority()->willReturn(2);
        $namer->name($class, array($interface1, $interface2))->willReturn('SplStack');
        $class->getName()->willReturn('stdClass');
        $interface1->getName()->willReturn('ArrayAccess');
        $interface2->getName()->willReturn('Iterator');

        $alt1->apply($node)->shouldBeCalled();
        $alt2->apply($node)->shouldNotBeCalled();
        $creator->create('SplStack', $node)->shouldBeCalled();

        $this->registerClassPatch($alt1);
        $this->registerClassPatch($alt2);

        $this->double($class, array($interface1, $interface2))
            ->shouldReturnAnInstanceOf('SplStack');
    }

    function it_double_instantiates_a_class_with_constructor_argument(
        $mirror,
        \ReflectionClass $class,
        ClassNode $node,
        $namer
    ) {
        $class->getName()->willReturn('ReflectionClass');
        $mirror->reflect($class, array())->willReturn($node);
        $namer->name($class, array())->willReturn('ReflectionClass');

        $double = $this->double($class, array(), array('stdClass'));
        $double->shouldBeAnInstanceOf('ReflectionClass');
        $double->getName()->shouldReturn('stdClass');
    }

    function it_can_instantiate_class_with_final_constructor(
        $mirror,
        \ReflectionClass $class,
        ClassNode $node,
        $namer
    ) {
        $class->getName()->willReturn('spec\Prophecy\Doubler\WithFinalConstructor');
        $mirror->reflect($class, array())->willReturn($node);
        $namer->name($class, array())->willReturn('spec\Prophecy\Doubler\WithFinalConstructor');

        $double = $this->double($class, array());

        $double->shouldBeAnInstanceOf('spec\Prophecy\Doubler\WithFinalConstructor');
    }
}

class WithFinalConstructor
{
    final public function __construct() {}
}


================================================
FILE: spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\Generator;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\ArgumentNode;
use Prophecy\Doubler\Generator\Node\ArgumentTypeNode;
use Prophecy\Doubler\Generator\Node\ClassNode;
use Prophecy\Doubler\Generator\Node\MethodNode;
use Prophecy\Doubler\Generator\Node\ReturnTypeNode;
use Prophecy\Doubler\Generator\Node\Type\BuiltinType;
use Prophecy\Doubler\Generator\Node\Type\IntersectionType;
use Prophecy\Doubler\Generator\Node\Type\ObjectType;
use Prophecy\Doubler\Generator\Node\Type\UnionType;

class ClassCodeGeneratorSpec extends ObjectBehavior
{
    function it_generates_proper_php_code_for_specific_ClassNode(
        ClassNode $class,
        MethodNode $method1,
        MethodNode $method2,
        MethodNode $method3,
        MethodNode $method4,
        MethodNode $method5,
        ArgumentNode $argument11,
        ArgumentNode $argument12,
        ArgumentNode $argument13,
        ArgumentNode $argument21,
        ArgumentNode $argument31
    ) {
        $class->getParentClass()->willReturn('RuntimeException');
        $class->getInterfaces()->willReturn(array(
            'Prophecy\Doubler\Generator\MirroredInterface', 'ArrayAccess', 'ArrayIterator',
        ));
        $class->getProperties()->willReturn(array('name' => 'public', 'email' => 'private'));
        $class->getMethods()->willReturn(array($method1, $method2, $method3, $method4, $method5));
        $class->isReadOnly()->willReturn(false);

        $method1->getName()->willReturn('getName');
        $method1->getVisibility()->willReturn('public');
        $method1->returnsReference()->willReturn(false);
        $method1->isStatic()->willReturn(true);
        $method1->getArguments()->willReturn(array($argument11, $argument12, $argument13));
        $method1->getReturnTypeNode()->willReturn(new ReturnTypeNode(new UnionType([
            new BuiltinType('string'),
            new BuiltinType('null'),
        ])));
        $method1->getCode()->willReturn('return $this->name;');

        $method2->getName()->willReturn('getEmail');
        $method2->getVisibility()->willReturn('protected');
        $method2->returnsReference()->willReturn(false);
        $method2->isStatic()->willReturn(false);
        $method2->getArguments()->willReturn(array($argument21));
        $method2->getReturnTypeNode()->willReturn(new ReturnTypeNode());
        $method2->getCode()->willReturn('return $this->email;');

        $method3->getName()->willReturn('getRefValue');
        $method3->getVisibility()->willReturn('public');
        $method3->returnsReference()->willReturn(true);
        $method3->isStatic()->willReturn(false);
        $method3->getArguments()->willReturn(array($argument31));
        $method3->getReturnTypeNode()->willReturn(new ReturnTypeNode(new BuiltinType('string')));
        $method3->getCode()->willReturn('return $this->refValue;');

        $method4->getName()->willReturn('doSomething');
        $method4->getVisibility()->willReturn('public');
        $method4->returnsReference()->willReturn(false);
        $method4->isStatic()->willReturn(false);
        $method4->getArguments()->willReturn(array());
        $method4->getReturnTypeNode()->willReturn(new ReturnTypeNode(new BuiltinType('void')));
        $method4->getCode()->willReturn('return;');

        $method5->getName()->willReturn('returnObject');
        $method5->getVisibility()->willReturn('public');
        $method5->returnsReference()->willReturn(false);
        $method5->isStatic()->willReturn(false);
        $method5->getArguments()->willReturn(array());
        $method5->getReturnTypeNode()->willReturn(new ReturnTypeNode(new BuiltinType('object')));
        $method5->getCode()->willReturn('return;');

        $argument11->getName()->willReturn('fullname');
        $argument11->isOptional()->willReturn(false);
        $argument11->isPassedByReference()->willReturn(false);
        $argument11->isVariadic()->willReturn(false);
        $argument11->getTypeNode()->willReturn(new ArgumentTypeNode(new BuiltinType('array')));

        $argument12->getName()->willReturn('class');
        $argument12->isOptional()->willReturn(false);
        $argument12->isPassedByReference()->willReturn(false);
        $argument12->isVariadic()->willReturn(false);
        $argument12->getTypeNode()->willReturn(new ArgumentTypeNode(new ObjectType('ReflectionClass')));

        $argument13->getName()->willReturn('instance');
        $argument13->isOptional()->willReturn(false);
        $argument13->isPassedByReference()->willReturn(false);
        $argument13->isVariadic()->willReturn(false);
        $argument13->getTypeNode()->willReturn(new ArgumentTypeNode(new BuiltinType('object')));

        $argument21->getName()->willReturn('default');
        $argument21->isOptional()->willReturn(true);
        $argument21->getDefault()->willReturn('ever.zet@gmail.com');
        $argument21->isPassedByReference()->willReturn(false);
        $argument21->isVariadic()->willReturn(false);
        $argument21->getTypeNode()->willReturn(new ArgumentTypeNode(new UnionType([
            new BuiltinType('string'),
            new BuiltinType('null'),
        ])));

        $argument31->getName()->willReturn('refValue');
        $argument31->isOptional()->willReturn(false);
        $argument31->getDefault()->willReturn();
        $argument31->isPassedByReference()->willReturn(false);
        $argument31->isVariadic()->willReturn(false);
        $argument31->getTypeNode()->willReturn(new ArgumentTypeNode());


        $code = $this->generate('CustomClass', $class);

        $expected = <<<'PHP'
namespace  {
class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface, \ArrayAccess, \ArrayIterator {
public $name;
private $email;

public static function getName(array $fullname, \ReflectionClass $class, object $instance): string|null {
return $this->name;
}
protected  function getEmail(string|null $default = 'ever.zet@gmail.com') {
return $this->email;
}
public  function &getRefValue( $refValue): string {
return $this->refValue;
}
public  function doSomething(): void {
return;
}
public  function returnObject(): object {
return;
}

}
}
PHP;

        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
        $code->shouldBe($expected);
    }

    function it_generates_proper_php_code_for_variadics(
        ClassNode $class,
        MethodNode $method1,
        MethodNode $method2,
        MethodNode $method3,
        MethodNode $method4,
        ArgumentNode $argument1,
        ArgumentNode $argument2,
        ArgumentNode $argument3,
        ArgumentNode $argument4
    ) {
        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
        $class->getProperties()->willReturn(array());
        $class->getMethods()->willReturn(array(
            $method1, $method2, $method3, $method4,
        ));
        $class->isReadOnly()->willReturn(false);

        $method1->getName()->willReturn('variadic');
        $method1->getVisibility()->willReturn('public');
        $method1->returnsReference()->willReturn(false);
        $method1->isStatic()->willReturn(false);
        $method1->getArguments()->willReturn(array($argument1));
        $method1->getReturnTypeNode()->willReturn(new ReturnTypeNode());
        $method1->getCode()->willReturn('');

        $method2->getName()->willReturn('variadicByRef');
        $method2->getVisibility()->willReturn('public');
        $method2->returnsReference()->willReturn(false);
        $method2->isStatic()->willReturn(false);
        $method2->getArguments()->willReturn(array($argument2));
        $method2->getReturnTypeNode()->willReturn(new ReturnTypeNode());
        $method2->getCode()->willReturn('');

        $method3->getName()->willReturn('variadicWithType');
        $method3->getVisibility()->willReturn('public');
        $method3->returnsReference()->willReturn(false);
        $method3->isStatic()->willReturn(false);
        $method3->getArguments()->willReturn(array($argument3));
        $method3->getReturnTypeNode()->willReturn(new ReturnTypeNode());
        $method3->getCode()->willReturn('');

        $method4->getName()->willReturn('variadicWithTypeByRef');
        $method4->getVisibility()->willReturn('public');
        $method4->returnsReference()->willReturn(false);
        $method4->isStatic()->willReturn(false);
        $method4->getArguments()->willReturn(array($argument4));
        $method4->getReturnTypeNode()->willReturn(new ReturnTypeNode());
        $method4->getCode()->willReturn('');

        $argument1->getName()->willReturn('args');
        $argument1->isOptional()->willReturn(false);
        $argument1->isPassedByReference()->willReturn(false);
        $argument1->isVariadic()->willReturn(true);
        $argument1->getTypeNode()->willReturn(new ArgumentTypeNode());

        $argument2->getName()->willReturn('args');
        $argument2->isOptional()->willReturn(false);
        $argument2->isPassedByReference()->willReturn(true);
        $argument2->isVariadic()->willReturn(true);
        $argument2->getTypeNode()->willReturn(new ArgumentTypeNode());

        $argument3->getName()->willReturn('args');
        $argument3->isOptional()->willReturn(false);
        $argument3->isPassedByReference()->willReturn(false);
        $argument3->isVariadic()->willReturn(true);
        $argument3->getTypeNode()->willReturn(new ArgumentTypeNode(new ObjectType('ReflectionClass')));

        $argument4->getName()->willReturn('args');
        $argument4->isOptional()->willReturn(false);
        $argument4->isPassedByReference()->willReturn(true);
        $argument4->isVariadic()->willReturn(true);
        $argument4->getTypeNode()->willReturn(new ArgumentTypeNode(new ObjectType('ReflectionClass')));


        $code = $this->generate('CustomClass', $class);
        $expected = <<<'PHP'
namespace  {
class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface {

public  function variadic( ...$args) {

}
public  function variadicByRef( &...$args) {

}
public  function variadicWithType(\ReflectionClass ...$args) {

}
public  function variadicWithTypeByRef(\ReflectionClass &...$args) {

}

}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
        $code->shouldBe($expected);
    }

    function it_overrides_properly_methods_with_args_passed_by_reference(
        ClassNode $class,
        MethodNode $method,
        ArgumentNode $argument
    ) {
        $class->getParentClass()->willReturn('RuntimeException');
        $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
        $class->getProperties()->willReturn(array());
        $class->getMethods()->willReturn(array($method));
        $class->isReadOnly()->willReturn(false);

        $method->getName()->willReturn('getName');
        $method->getVisibility()->willReturn('public');
        $method->isStatic()->willReturn(false);
        $method->getArguments()->willReturn(array($argument));
        $method->getReturnTypeNode()->willReturn(new ReturnTypeNode());
        $method->returnsReference()->willReturn(false);
        $method->getCode()->willReturn('return $this->name;');

        $argument->getName()->willReturn('fullname');
        $argument->isOptional()->willReturn(true);
        $argument->getDefault()->willReturn(null);
        $argument->isPassedByReference()->willReturn(true);
        $argument->isVariadic()->willReturn(false);
        $argument->getTypeNode()->willReturn(new ArgumentTypeNode(new UnionType([
            new BuiltinType('array'),
            new BuiltinType('null'),
        ])));

        $code = $this->generate('CustomClass', $class);
        $expected = <<<'PHP'
namespace  {
class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface {

public  function getName(array|null &$fullname = NULL) {
return $this->name;
}

}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
        $code->shouldBe($expected);
    }

    function it_generates_proper_code_for_union_return_types(
        ClassNode $class,
        MethodNode $method
    ) {
        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn([]);
        $class->getProperties()->willReturn([]);
        $class->getMethods()->willReturn(array($method));
        $class->isReadOnly()->willReturn(false);

        $method->getName()->willReturn('foo');
        $method->getVisibility()->willReturn('public');
        $method->isStatic()->willReturn(false);
        $method->getArguments()->willReturn([]);
        $method->getReturnTypeNode()->willReturn(new ReturnTypeNode(new UnionType([
            new BuiltinType('int'),
            new BuiltinType('string'),
            new BuiltinType('null'),
        ])));
        $method->returnsReference()->willReturn(false);
        $method->getCode()->willReturn('');

        $code = $this->generate('CustomClass', $class);

        $expected = <<<'PHP'
namespace  {
class CustomClass extends \stdClass implements  {

public  function foo(): int|string|null {

}

}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));

        $code->shouldBe($expected);
    }

    function it_generates_proper_code_for_dnf_types(
        ClassNode $class,
        MethodNode $method
    ) {
        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn([]);
        $class->getProperties()->willReturn([]);
        $class->getMethods()->willReturn(array($method));
        $class->isReadOnly()->willReturn(false);

        $method->getName()->willReturn('foo');
        $method->getVisibility()->willReturn('public');
        $method->isStatic()->willReturn(false);
        $method->getArguments()->willReturn([]);
        $method->getReturnTypeNode()->willReturn(new ReturnTypeNode(
            new UnionType([
                new IntersectionType([new ObjectType('Foo'), new ObjectType('Bar')]),
                new BuiltinType('string'),
            ])
        ));
        $method->returnsReference()->willReturn(false);
        $method->getCode()->willReturn('');

        $code = $this->generate('CustomClass', $class);

        $expected = <<<'PHP'
namespace  {
class CustomClass extends \stdClass implements  {

public  function foo(): (\Foo&\Bar)|string {

}

}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));

        $code->shouldBe($expected);
    }


    function it_generates_proper_code_for_intersection_return_types(
        ClassNode $class,
        MethodNode $method
    ) {
        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn([]);
        $class->getProperties()->willReturn([]);
        $class->getMethods()->willReturn(array($method));
        $class->isReadOnly()->willReturn(false);

        $method->getName()->willReturn('foo');
        $method->getVisibility()->willReturn('public');
        $method->isStatic()->willReturn(false);
        $method->getArguments()->willReturn([]);
        $method->getReturnTypeNode()->willReturn(new ReturnTypeNode(
            new IntersectionType([new ObjectType('Foo'), new ObjectType('Bar')])
        ));
        $method->returnsReference()->willReturn(false);
        $method->getCode()->willReturn('');

        $code = $this->generate('CustomClass', $class);

        $expected = <<<'PHP'
namespace  {
class CustomClass extends \stdClass implements  {

public  function foo(): \Foo&\Bar {

}

}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));

        $code->shouldBe($expected);
    }

    function it_generates_proper_code_for_union_argument_types(
        ClassNode $class,
        MethodNode $method,
        ArgumentNode $argument
    ) {
        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn([]);
        $class->getProperties()->willReturn([]);
        $class->getMethods()->willReturn(array($method));
        $class->isReadOnly()->willReturn(false);

        $method->getName()->willReturn('foo');
        $method->getVisibility()->willReturn('public');
        $method->isStatic()->willReturn(false);
        $method->getArguments()->willReturn([$argument]);
        $method->getReturnTypeNode()->willReturn(new ReturnTypeNode());
        $method->returnsReference()->willReturn(false);
        $method->getCode()->willReturn('');

        $argument->getTypeNode()->willReturn(new ArgumentTypeNode(new UnionType([
            new BuiltinType('int'),
            new BuiltinType('string'),
            new BuiltinType('null'),
        ])));
        $argument->getName()->willReturn('arg');
        $argument->isPassedByReference()->willReturn(false);
        $argument->isVariadic()->willReturn(false);
        $argument->isOptional()->willReturn(false);

        $code = $this->generate('CustomClass', $class);

        $expected = <<<'PHP'
namespace  {
class CustomClass extends \stdClass implements  {

public  function foo(int|string|null $arg) {

}

}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));

        $code->shouldBe($expected);
    }

    function it_generates_empty_class_for_empty_ClassNode(ClassNode $class)
    {
        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
        $class->getProperties()->willReturn(array());
        $class->getMethods()->willReturn(array());
        $class->isReadOnly()->willReturn(false);

        $code = $this->generate('CustomClass', $class);
        $expected = <<<'PHP'
namespace  {
class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface {


}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
        $code->shouldBe($expected);
    }

    function it_wraps_class_in_namespace_if_it_is_namespaced(ClassNode $class)
    {
        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
        $class->getProperties()->willReturn(array());
        $class->getMethods()->willReturn(array());
        $class->isReadOnly()->willReturn(false);

        $code = $this->generate('My\Awesome\CustomClass', $class);
        $expected = <<<'PHP'
namespace My\Awesome {
class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface {


}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
        $code->shouldBe($expected);
    }

    function it_generates_read_only_class_if_parent_class_is_read_only(ClassNode $class)
    {
        $class->getParentClass()->willReturn('ReadOnlyClass');
        $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
        $class->getProperties()->willReturn(array());
        $class->getMethods()->willReturn(array());
        $class->isReadOnly()->willReturn(true);

        $code = $this->generate('CustomClass', $class);
        $expected = <<<'PHP'
namespace  {
readonly class CustomClass extends \ReadOnlyClass implements \Prophecy\Doubler\Generator\MirroredInterface {


}
}
PHP;
        $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
        $code->shouldBe($expected);
    }
}


================================================
FILE: spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\Generator;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\ClassCodeGenerator;
use Prophecy\Doubler\Generator\Node\ClassNode;

class ClassCreatorSpec extends ObjectBehavior
{
    function let(ClassCodeGenerator $generator)
    {
        $this->beConstructedWith($generator);
    }

    function it_evaluates_code_generated_by_ClassCodeGenerator($generator, ClassNode $class)
    {
        $generator->generate('stdClass', $class)->shouldBeCalled()->willReturn(
            'return 42;'
        );

        $this->create('stdClass', $class)->shouldReturn(42);
    }

    function it_throws_an_exception_if_class_does_not_exist_after_evaluation($generator, ClassNode $class)
    {
        $generator->generate('CustomClass', $class)->shouldBeCalled()->willReturn(
            'return 42;'
        );

        $class->getParentClass()->willReturn('stdClass');
        $class->getInterfaces()->willReturn(array('Interface1', 'Interface2'));

        $this->shouldThrow('Prophecy\Exception\Doubler\ClassCreatorException')
            ->duringCreate('CustomClass', $class);
    }
}


================================================
FILE: spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\Generator\Node;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\ArgumentTypeNode;
use Prophecy\Doubler\Generator\Node\Type\BuiltinType;

class ArgumentNodeSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('name');
    }

    function it_is_not_be_passed_by_reference_by_default()
    {
        $this->shouldNotBePassedByReference();
    }

    function it_is_passed_by_reference_if_marked()
    {
        $this->setAsPassedByReference();
        $this->shouldBePassedByReference();
    }

    function it_is_not_variadic_by_default()
    {
        $this->shouldNotBeVariadic();
    }

    function it_is_variadic_if_marked()
    {
        $this->setAsVariadic();
        $this->shouldBeVariadic();
    }

    function it_does_not_have_default_by_default()
    {
        $this->shouldNotHaveDefault();
    }

    function it_does_not_have_default_if_variadic()
    {
        $this->setDefault(null);
        $this->setAsVariadic();
        $this->shouldNotHaveDefault();
    }

    function it_does_have_default_if_not_variadic()
    {
        $this->setDefault(null);
        $this->setAsVariadic(false);
        $this->hasDefault()->shouldReturn(true);
    }

    function it_has_name_with_which_it_was_been_constructed()
    {
        $this->getName()->shouldReturn('name');
    }

    function it_has_no_typehint_by_default()
    {
        $this->getTypeHint()->shouldReturn(null);
    }

    function its_typeHint_is_mutable_with_deprecated_accessors()
    {
        $this->setTypeHint('array');
        $this->getTypeHint()->shouldReturn('array');
    }

    function it_can_set_nullable_type_using_deprecated_method()
    {
        $this->setTypeHint('int');

        $this->setAsNullable();

        $this->shouldBeNullable();
    }

    function it_can_unset_nullable_type_using_deprecated_method()
    {
        $this->setTypeHint('int');

        $this->setAsNullable(false);

        $this->shouldNotBeNullable();
    }

    function it_has_an_empty_type_by_default()
    {
        $this->getTypeNode()->shouldBeLike(new ArgumentTypeNode());
    }

    function it_has_a_mutable_type()
    {
        $this->setTypeNode(new ArgumentTypeNode(new BuiltinType('int')));

        $this->getTypeNode()->shouldBeLike(new ArgumentTypeNode(new BuiltinType('int')));
    }

    function it_does_not_have_default_value_by_default()
    {
        $this->getDefault()->shouldReturn(null);
    }

    function it_is_not_optional_by_default()
    {
        $this->isOptional()->shouldReturn(false);
    }

    function its_default_is_mutable()
    {
        $this->setDefault(array());
        $this->getDefault()->shouldReturn(array());
    }

    function it_is_marked_as_optional_when_default_is_set()
    {
        $this->setDefault(null);
        $this->isOptional()->shouldReturn(true);
    }
}


================================================
FILE: spec/Prophecy/Doubler/Generator/Node/ArgumentTypeNodeSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\Generator\Node;

use PhpSpec\ObjectBehavior;
use Prophecy\Exception\Doubler\DoubleException;

class ArgumentTypeNodeSpec extends ObjectBehavior
{
    function it_has_no_types_at_start()
    {
        $this->getTypes()->shouldReturn([]);
    }

    function it_can_have_a_simple_type()
    {
        $this->beConstructedWith('int');

        $this->getTypes()->shouldReturn(['int']);
    }

    function it_can_have_multiple_types()
    {
        $this->beConstructedWith('int', 'string');

        $this->getTypes()->shouldReturn(['int', 'string']);
    }

    function it_will_prefix_fcqns()
    {
        $this->beConstructedWith('Foo');

        $this->getTypes()->shouldReturn(['\\Foo']);
    }

    function it_will_not_prefix_fcqns_that_already_have_prefix()
    {
        $this->beConstructedWith('\\Foo');

        $this->getTypes()->shouldReturn(['\\Foo']);
    }

    function it_can_use_shorthand_null_syntax_if_it_has_single_type_plus_null()
    {
        $this->beConstructedWith('int', 'null');

        $this->canUseNullShorthand()->shouldReturn(true);
    }

    function it_can_not_use_shorthand_null_syntax_if_it_does_not_allow_null()
    {
        $this->beConstructedWith('int');

        $this->canUseNullShorthand()->shouldReturn(false);
    }

    function it_can_not_use_shorthand_null_syntax_if_it_has_more_than_one_non_null_type()
    {
        $this->beConstructedWith('int', 'string', 'null');

        $this->canUseNullShorthand()->shouldReturn(false);
    }

    function it_can_return_non_null_types()
    {
        $this->beConstructedWith('int', 'null');

        $this->getNonNullTypes()->shouldReturn(['int']);
    }

    function it_does_not_allow_union_mixed()
    {
        $this->beConstructedWith('mixed', 'int');

        if (PHP_VERSION_ID >= 80000) {
            $this->shouldThrow(DoubleException::class)->duringInstantiation();
        }
    }

    function it_does_not_prefix_false()
    {
        $this->beConstructedWith('false', 'array');

        $this->getTypes()->shouldReturn(['false', 'array']);
    }

    function it_allows_standalone_false()
    {
        $this->beConstructedWith('false');

        if (PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80200) {
            $this->shouldThrow(DoubleException::class)->duringInstantiation();
        }

        if (PHP_VERSION_ID >= 80200) {
            $this->getTypes()->shouldReturn(['false']);
        }
    }

    function it_allows_standalone_null()
    {
        $this->beConstructedWith('null');

        if (PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80200) {
            $this->shouldThrow(DoubleException::class)->duringInstantiation();
        }

        if (PHP_VERSION_ID >= 80200) {
            $this->getTypes()->shouldReturn(['null']);
        }
    }

    function it_allows_standalone_true()
    {
        $this->beConstructedWith('true');

        if (PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80200) {
            $this->shouldThrow(DoubleException::class)->duringInstantiation();
        }

        if (PHP_VERSION_ID >= 80200) {
            $this->getTypes()->shouldReturn(['true']);
        }
    }

    function it_allows_nullable_false()
    {
        $this->beConstructedWith('null', 'false');

        if (PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80200) {
            $this->shouldThrow(DoubleException::class)->duringInstantiation();
        }

        if (PHP_VERSION_ID >= 80200) {
            $this->getTypes()->shouldReturn(['null', 'false']);
        }
    }

    function it_allows_nullable_true()
    {
        $this->beConstructedWith('null', 'true');

        if (PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80200) {
            $this->shouldThrow(DoubleException::class)->duringInstantiation();
        }

        if (PHP_VERSION_ID >= 80200) {
            $this->getTypes()->shouldReturn(['null', 'true']);
        }
    }

    function it_allows_union_with_false()
    {
        $this->beConstructedWith('false', 'Foo');

        if (PHP_VERSION_ID >= 80000) {
            $this->getTypes()->shouldReturn(['false', '\\Foo']);
        }
    }
}


================================================
FILE: spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\Generator\Node;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\MethodNode;
use Prophecy\Exception\Doubler\MethodNotExtendableException;

class ClassNodeSpec extends ObjectBehavior
{
    function its_parentClass_is_a_stdClass_by_default()
    {
        $this->getParentClass()->shouldReturn('stdClass');
    }

    function its_parentClass_is_mutable()
    {
        $this->setParentClass('Exception');
        $this->getParentClass()->shouldReturn('Exception');
    }

    function its_parentClass_is_set_to_stdClass_if_user_set_null()
    {
        $this->setParentClass(null);
        $this->getParentClass()->shouldReturn('stdClass');
    }

    function it_does_not_implement_any_interface_by_default()
    {
        $this->getInterfaces()->shouldHaveCount(0);
    }

    function its_addInterface_adds_item_to_the_list_of_implemented_interfaces()
    {
        $this->addInterface('MyInterface');
        $this->getInterfaces()->shouldHaveCount(1);
    }

    function its_hasInterface_returns_true_if_class_implements_interface()
    {
        $this->addInterface('MyInterface');
        $this->hasInterface('MyInterface')->shouldReturn(true);
    }

    function its_hasInterface_returns_false_if_class_does_not_implements_interface()
    {
        $this->hasInterface('MyInterface')->shouldReturn(false);
    }

    function it_supports_implementation_of_multiple_interfaces()
    {
        $this->addInterface('MyInterface');
        $this->addInterface('MySecondInterface');
        $this->getInterfaces()->shouldHaveCount(2);
    }

    function it_ignores_same_interfaces_added_twice()
    {
        $this->addInterface('MyInterface');
        $this->addInterface('MyInterface');

        $this->getInterfaces()->shouldHaveCount(1);
        $this->getInterfaces()->shouldReturn(array('MyInterface'));
    }

    function it_does_not_have_methods_by_default()
    {
        $this->getMethods()->shouldHaveCount(0);
    }

    function it_can_has_methods(MethodNode $method1, MethodNode $method2)
    {
        $method1->getName()->willReturn('__construct');
        $method2->getName()->willReturn('getName');

        $this->addMethod($method1);
        $this->addMethod($method2);

        $this->getMethods()->shouldReturn([
            '__construct' => $method1,
            'getName'     => $method2,
        ]);
    }

    function its_hasMethod_returns_true_if_method_exists(MethodNode $method)
    {
        $method->getName()->willReturn('getName');

        $this->addMethod($method);

        $this->hasMethod('getName')->shouldReturn(true);
    }

    function its_getMethod_returns_method_by_name(MethodNode $method)
    {
        $method->getName()->willReturn('getName');

        $this->addMethod($method);

        $this->getMethod('getName')->shouldReturn($method);
    }

    function its_hasMethod_returns_false_if_method_does_not_exists()
    {
        $this->hasMethod('getName')->shouldReturn(false);
    }

    function its_hasMethod_returns_false_if_method_has_been_removed(MethodNode $method)
    {
        $method->getName()->willReturn('getName');
        $this->addMethod($method);
        $this->removeMethod('getName');

        $this->hasMethod('getName')->shouldReturn(false);
    }


    function it_does_not_have_properties_by_default()
    {
        $this->getProperties()->shouldHaveCount(0);
    }

    function it_is_able_to_have_properties()
    {
        $this->addProperty('title');
        $this->addProperty('text', 'private');
        $this->getProperties()->shouldReturn(array(
            'title' => 'public',
            'text'  => 'private',
        ));
    }

    function its_addProperty_does_not_accept_unsupported_visibility()
    {
        $this->shouldThrow('InvalidArgumentException')->duringAddProperty('title', 'town');
    }

    function its_addProperty_lowercases_visibility_before_setting()
    {
        $this->addProperty('text', 'PRIVATE');
        $this->getProperties()->shouldReturn(array('text' => 'private'));
    }

    function its_has_no_unextendable_methods_by_default()
    {
        $this->getUnextendableMethods()->shouldHaveCount(0);
    }

    function its_addUnextendableMethods_adds_an_unextendable_method()
    {
        $this->addUnextendableMethod('testMethod');
        $this->getUnextendableMethods()->shouldHaveCount(1);
    }

    function its_methods_are_extendable_by_default()
    {
        $this->isExtendable('testMethod')->shouldReturn(true);
    }

    function its_unextendable_methods_are_not_extendable()
    {
        $this->addUnextendableMethod('testMethod');
        $this->isExtendable('testMethod')->shouldReturn(false);
    }

    function its_addUnextendableMethods_doesnt_create_duplicates()
    {
        $this->addUnextendableMethod('testMethod');
        $this->addUnextendableMethod('testMethod');
        $this->getUnextendableMethods()->shouldHaveCount(1);
    }

    function it_throws_an_exception_when_adding_a_method_that_isnt_extendable(MethodNode $method)
    {
        $this->addUnextendableMethod('testMethod');
        $method->getName()->willReturn('testMethod');

        $expectedException = new MethodNotExtendableException(
            "Method `testMethod` is not extendable, so can not be added.",
            "stdClass",
            "testMethod"
        );
        $this->shouldThrow($expectedException)->duringAddMethod($method);
    }

    function it_is_non_read_only_by_default()
    {
        $this->isReadOnly()->shouldReturn(false);
    }

    function its_read_only_is_mutable()
    {
        $this->setReadOnly(true);

        $this->isReadOnly()->shouldReturn(true);
    }
}


================================================
FILE: spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php
================================================
<?php

namespace spec\Prophecy\Doubler\Generator\Node;

use PhpSpec\ObjectBehavior;
use Prophecy\Doubler\Generator\Node\ArgumentNode;
use Prophecy\Doubler\Generator\Node\ReturnTypeNode;
use Prophecy\Doubler\Generator\Node\Type\BuiltinType;

class MethodNodeSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('getTitle');
    }

    function it_has_a_name()
    {
        $this->getName()->shouldReturn('getTitle');
    }

    function it_has_public_visibility_by_default()
    {
        $this->getVisibility()->shouldReturn('public');
    }

    function its_visibility_is_mutable()
    {
        $this->setVisibility('private');
        $this->getVisibility()->shouldReturn('private');
    }

    function it_is_not_static_by_default()
    {
        $this->shouldNotBeStatic();
    }

    function it_does_not_return_a_reference_by_default()
    {
        $this->returnsReference()->shouldReturn(false);
    }

    function it_should_be_settable_as_returning_a_reference_through_setter()
    {
        $this->setReturnsReference();
        $this->returnsReference()->shouldReturn(true);
    }

    function it_should_be_settable_as_static_through_setter()
    {
        $this->setStatic();
        $this->shouldBeStatic();
    }

    function it_accepts_only_supported_visibilities()
    {
        $this->shouldThrow('InvalidArgumentException')->duringSetVisibility('stealth');
    }

    function it_lowercases_visibility_before_setting_it()
    {
        $this->setVisibility('Public');
        $this->getVisibility()->shouldReturn('public');
    }

    function its_useParentCode_causes_method_to_call_parent(ArgumentNode $argument1, ArgumentNode $argument2)
    {
        $argument1->getName()->willReturn('objectName');
        $argument2->getName()->willReturn('default');

        $argument1->isVariadic()->willReturn(false);
        $argument2->isVariadic()->willReturn(true);

        $this->addArgument($argument1);
        $this->addArgument($argument2);

        $this->useParentCode();

        $this->getCode()->shouldReturn(
            'return parent::getTitle($objectName, ...$default);'
        );
    }

    function its_code_is_mutable()
    {
        $this->setCode('echo "code";');
        $this->getCode()->shouldReturn('echo "code";');
    }

    function its_reference_returning_methods_will_generate_exceptions()
    {
        $this->setCode('echo "code";');
        $this->setReturnsReference();
        $this->getCode()->shouldReturn("throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), 'getTitle');");
    }

    function its_setCode_provided_with_null_cleans_method_body()
    {
        $this->setCode(null);
        $this->getCode()->shouldReturn('');
    }

    function it_is_constructable_with_code()
    {
        $this->beCons
Download .txt
gitextract_tlvewwen/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .php-cs-fixer.dist.php
├── CHANGES.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── composer.json
├── fixtures/
│   ├── AbstractBaseClassWithMethodWithReturnType.php
│   ├── ClassExtendAbstractWithMethodWithReturnType.php
│   ├── DnfArgumentType.php
│   ├── DnfReturnType.php
│   ├── EmptyClass.php
│   ├── EmptyInterface.php
│   ├── Enum.php
│   ├── FinalClass.php
│   ├── IntersectionArgumentType.php
│   ├── IntersectionReturnType.php
│   ├── MethodWithAdditionalParam.php
│   ├── MixedTypes.php
│   ├── ModifierInterface.php
│   ├── Named.php
│   ├── NeverType.php
│   ├── NullableArrayParameter.php
│   ├── NullableParameterTypeFalse.php
│   ├── NullableParameterTypeTrue.php
│   ├── NullableReturnTypeFalse.php
│   ├── NullableReturnTypeTrue.php
│   ├── OptionalDepsClass.php
│   ├── ReadOnlyClass.php
│   ├── ReturningFinalClass.php
│   ├── SelfReferencing.php
│   ├── SpecialMethods.php
│   ├── StandaloneParameterTypeFalse.php
│   ├── StandaloneParameterTypeNull.php
│   ├── StandaloneParameterTypeTrue.php
│   ├── StandaloneReturnTypeFalse.php
│   ├── StandaloneReturnTypeNull.php
│   ├── StandaloneReturnTypeTrue.php
│   ├── TentativeReturnTypeNull.php
│   ├── ThrowableInterface.php
│   ├── UnionArgumentTypeFalse.php
│   ├── UnionArgumentTypes.php
│   ├── UnionReturnTypeFalse.php
│   ├── UnionReturnTypes.php
│   ├── WithArguments.php
│   ├── WithCallableArgument.php
│   ├── WithFinalMethod.php
│   ├── WithFinalVirtuallyPrivateMethod.php
│   ├── WithPhpdocClass.php
│   ├── WithProtectedAbstractMethod.php
│   ├── WithReferences.php
│   ├── WithReturnTypehints.php
│   ├── WithStaticMethod.php
│   ├── WithTypehintedVariadicArgument.php
│   ├── WithVariadicArgument.php
│   └── WithVirtuallyPrivateMethod.php
├── phpstan-baseline.neon
├── phpstan.dist.neon
├── phpunit.xml.dist
├── spec/
│   └── Prophecy/
│       ├── Argument/
│       │   ├── ArgumentsWildcardSpec.php
│       │   └── Token/
│       │       ├── AnyValueTokenSpec.php
│       │       ├── AnyValuesTokenSpec.php
│       │       ├── ApproximateValueTokenSpec.php
│       │       ├── ArrayCountTokenSpec.php
│       │       ├── ArrayEntryTokenSpec.php
│       │       ├── ArrayEveryEntryTokenSpec.php
│       │       ├── CallbackTokenSpec.php
│       │       ├── ExactValueTokenSpec.php
│       │       ├── IdenticalValueTokenSpec.php
│       │       ├── InArrayTokenSpec.php
│       │       ├── LogicalAndTokenSpec.php
│       │       ├── LogicalNotTokenSpec.php
│       │       ├── NotInArrayTokenSpec.php
│       │       ├── ObjectStateTokenSpec.php
│       │       ├── StringContainsTokenSpec.php
│       │       └── TypeTokenSpec.php
│       ├── ArgumentSpec.php
│       ├── Call/
│       │   ├── CallCenterSpec.php
│       │   └── CallSpec.php
│       ├── Comparator/
│       │   ├── ClosureComparatorSpec.php
│       │   ├── FactorySpec.php
│       │   └── ProphecyComparatorSpec.php
│       ├── Doubler/
│       │   ├── CachedDoublerSpec.php
│       │   ├── ClassPatch/
│       │   │   ├── DisableConstructorPatchSpec.php
│       │   │   ├── KeywordPatchSpec.php
│       │   │   ├── MagicCallPatchSpec.php
│       │   │   ├── ProphecySubjectPatchSpec.php
│       │   │   ├── ReflectionClassNewInstancePatchSpec.php
│       │   │   ├── SplFileInfoPatchSpec.php
│       │   │   ├── ThrowablePatchSpec.php
│       │   │   └── TraversablePatchSpec.php
│       │   ├── DoublerSpec.php
│       │   ├── Generator/
│       │   │   ├── ClassCodeGeneratorSpec.php
│       │   │   ├── ClassCreatorSpec.php
│       │   │   └── Node/
│       │   │       ├── ArgumentNodeSpec.php
│       │   │       ├── ArgumentTypeNodeSpec.php
│       │   │       ├── ClassNodeSpec.php
│       │   │       ├── MethodNodeSpec.php
│       │   │       ├── ReturnTypeNodeSpec.php
│       │   │       └── Type/
│       │   │           ├── BuiltinTypeSpec.php
│       │   │           ├── IntersectionTypeSpec.php
│       │   │           ├── ObjectTypeSpec.php
│       │   │           └── UnionTypeSpec.php
│       │   ├── LazyDoubleSpec.php
│       │   └── NameGeneratorSpec.php
│       ├── Exception/
│       │   ├── Call/
│       │   │   └── UnexpectedCallExceptionSpec.php
│       │   ├── Doubler/
│       │   │   ├── ClassCreatorExceptionSpec.php
│       │   │   ├── ClassMirrorExceptionSpec.php
│       │   │   ├── ClassNotFoundExceptionSpec.php
│       │   │   ├── DoubleExceptionSpec.php
│       │   │   ├── InterfaceNotFoundExceptionSpec.php
│       │   │   ├── MethodNotExtendableExceptionSpec.php
│       │   │   └── MethodNotFoundExceptionSpec.php
│       │   ├── Prediction/
│       │   │   ├── AggregateExceptionSpec.php
│       │   │   ├── NoCallsExceptionSpec.php
│       │   │   ├── UnexpectedCallsCountExceptionSpec.php
│       │   │   └── UnexpectedCallsExceptionSpec.php
│       │   └── Prophecy/
│       │       ├── MethodProphecyExceptionSpec.php
│       │       └── ObjectProphecyExceptionSpec.php
│       ├── Prediction/
│       │   ├── CallPredictionSpec.php
│       │   ├── CallTimesPredictionSpec.php
│       │   ├── CallbackPredictionSpec.php
│       │   └── NoCallsPredictionSpec.php
│       ├── Promise/
│       │   ├── CallbackPromiseSpec.php
│       │   ├── ReturnArgumentPromiseSpec.php
│       │   ├── ReturnPromiseSpec.php
│       │   └── ThrowPromiseSpec.php
│       ├── Prophecy/
│       │   ├── MethodProphecySpec.php
│       │   ├── ObjectProphecySpec.php
│       │   └── RevealerSpec.php
│       ├── ProphetSpec.php
│       └── Util/
│           └── StringUtilSpec.php
├── src/
│   └── Prophecy/
│       ├── Argument/
│       │   ├── ArgumentsWildcard.php
│       │   └── Token/
│       │       ├── AnyValueToken.php
│       │       ├── AnyValuesToken.php
│       │       ├── ApproximateValueToken.php
│       │       ├── ArrayCountToken.php
│       │       ├── ArrayEntryToken.php
│       │       ├── ArrayEveryEntryToken.php
│       │       ├── CallbackToken.php
│       │       ├── ExactValueToken.php
│       │       ├── IdenticalValueToken.php
│       │       ├── InArrayToken.php
│       │       ├── LogicalAndToken.php
│       │       ├── LogicalNotToken.php
│       │       ├── NotInArrayToken.php
│       │       ├── ObjectStateToken.php
│       │       ├── StringContainsToken.php
│       │       ├── TokenInterface.php
│       │       └── TypeToken.php
│       ├── Argument.php
│       ├── Call/
│       │   ├── Call.php
│       │   └── CallCenter.php
│       ├── Comparator/
│       │   ├── ClosureComparator.php
│       │   ├── Factory.php
│       │   ├── FactoryProvider.php
│       │   └── ProphecyComparator.php
│       ├── Doubler/
│       │   ├── CachedDoubler.php
│       │   ├── ClassPatch/
│       │   │   ├── ClassPatchInterface.php
│       │   │   ├── DisableConstructorPatch.php
│       │   │   ├── KeywordPatch.php
│       │   │   ├── MagicCallPatch.php
│       │   │   ├── ProphecySubjectPatch.php
│       │   │   ├── ReflectionClassNewInstancePatch.php
│       │   │   ├── SplFileInfoPatch.php
│       │   │   ├── ThrowablePatch.php
│       │   │   └── TraversablePatch.php
│       │   ├── DoubleInterface.php
│       │   ├── Doubler.php
│       │   ├── Generator/
│       │   │   ├── ClassCodeGenerator.php
│       │   │   ├── ClassCreator.php
│       │   │   ├── ClassMirror.php
│       │   │   ├── Node/
│       │   │   │   ├── ArgumentNode.php
│       │   │   │   ├── ArgumentTypeNode.php
│       │   │   │   ├── ClassNode.php
│       │   │   │   ├── MethodNode.php
│       │   │   │   ├── ReturnTypeNode.php
│       │   │   │   ├── Type/
│       │   │   │   │   ├── BuiltinType.php
│       │   │   │   │   ├── IntersectionType.php
│       │   │   │   │   ├── ObjectType.php
│       │   │   │   │   ├── SimpleType.php
│       │   │   │   │   ├── TypeInterface.php
│       │   │   │   │   └── UnionType.php
│       │   │   │   └── TypeNodeAbstract.php
│       │   │   ├── ReflectionInterface.php
│       │   │   └── TypeHintReference.php
│       │   ├── LazyDouble.php
│       │   └── NameGenerator.php
│       ├── Exception/
│       │   ├── Call/
│       │   │   └── UnexpectedCallException.php
│       │   ├── Doubler/
│       │   │   ├── ClassCreatorException.php
│       │   │   ├── ClassMirrorException.php
│       │   │   ├── ClassNotFoundException.php
│       │   │   ├── DoubleException.php
│       │   │   ├── DoublerException.php
│       │   │   ├── InterfaceNotFoundException.php
│       │   │   ├── MethodNotExtendableException.php
│       │   │   ├── MethodNotFoundException.php
│       │   │   └── ReturnByReferenceException.php
│       │   ├── Exception.php
│       │   ├── InvalidArgumentException.php
│       │   ├── Prediction/
│       │   │   ├── AggregateException.php
│       │   │   ├── FailedPredictionException.php
│       │   │   ├── NoCallsException.php
│       │   │   ├── PredictionException.php
│       │   │   ├── UnexpectedCallsCountException.php
│       │   │   └── UnexpectedCallsException.php
│       │   └── Prophecy/
│       │       ├── MethodProphecyException.php
│       │       ├── ObjectProphecyException.php
│       │       └── ProphecyException.php
│       ├── PhpDocumentor/
│       │   ├── ClassAndInterfaceTagRetriever.php
│       │   ├── ClassTagRetriever.php
│       │   └── MethodTagRetrieverInterface.php
│       ├── Prediction/
│       │   ├── CallPrediction.php
│       │   ├── CallTimesPrediction.php
│       │   ├── CallbackPrediction.php
│       │   ├── NoCallsPrediction.php
│       │   └── PredictionInterface.php
│       ├── Promise/
│       │   ├── CallbackPromise.php
│       │   ├── PromiseInterface.php
│       │   ├── ReturnArgumentPromise.php
│       │   ├── ReturnPromise.php
│       │   └── ThrowPromise.php
│       ├── Prophecy/
│       │   ├── MethodProphecy.php
│       │   ├── ObjectProphecy.php
│       │   ├── ProphecyInterface.php
│       │   ├── ProphecySubjectInterface.php
│       │   ├── Revealer.php
│       │   └── RevealerInterface.php
│       ├── Prophet.php
│       └── Util/
│           ├── ExportUtil.php
│           └── StringUtil.php
└── tests/
    ├── Argument/
    │   └── Token/
    │       └── ExactValueTokenTest.php
    ├── Comparator/
    │   └── FactoryProviderTest.php
    ├── Doubler/
    │   ├── ClassPatch/
    │   │   └── MagicCallPatchTest.php
    │   └── Generator/
    │       ├── ClassMirrorTest.php
    │       └── Node/
    │           └── TypeNodeAbstractTest.php
    └── FunctionalTest.php
Download .txt
SYMBOL INDEX (1433 symbols across 226 files)

FILE: fixtures/AbstractBaseClassWithMethodWithReturnType.php
  class AbstractBaseClassWithMethodWithReturnType (line 7) | abstract class AbstractBaseClassWithMethodWithReturnType
    method returnSelf (line 9) | public function returnSelf(?\DateTimeInterface $test): self

FILE: fixtures/ClassExtendAbstractWithMethodWithReturnType.php
  class ClassExtendAbstractWithMethodWithReturnType (line 7) | class ClassExtendAbstractWithMethodWithReturnType extends AbstractBaseCl...

FILE: fixtures/DnfArgumentType.php
  class DnfArgumentType (line 5) | class DnfArgumentType
    method doSomething (line 7) | public function doSomething ((A&B)|C $foo)

FILE: fixtures/DnfReturnType.php
  class DnfReturnType (line 5) | class DnfReturnType
    method doSomething (line 7) | public function doSomething () : (A&B)|C

FILE: fixtures/EmptyClass.php
  class EmptyClass (line 5) | class EmptyClass

FILE: fixtures/EmptyInterface.php
  type EmptyInterface (line 5) | interface EmptyInterface

FILE: fixtures/FinalClass.php
  class FinalClass (line 5) | final class FinalClass

FILE: fixtures/IntersectionArgumentType.php
  class IntersectionArgumentType (line 5) | class IntersectionArgumentType
    method doSomething (line 7) | public function doSomething (Bar&Baz $foo)

FILE: fixtures/IntersectionReturnType.php
  class IntersectionReturnType (line 5) | class IntersectionReturnType
    method doSomething (line 7) | public function doSomething () : Bar&Baz

FILE: fixtures/MethodWithAdditionalParam.php
  class MethodWithAdditionalParam (line 5) | abstract class MethodWithAdditionalParam extends WithArguments implement...
    method getName (line 7) | abstract public function getName($name = null);
    method methodWithoutTypeHints (line 9) | public function methodWithoutTypeHints($arg, $arg2 = null)

FILE: fixtures/MixedTypes.php
  class MixedTypes (line 5) | class MixedTypes
    method doSomething (line 7) | public function doSomething(mixed $arg1): mixed

FILE: fixtures/ModifierInterface.php
  type ModifierInterface (line 5) | interface ModifierInterface
    method isAbstract (line 7) | public function isAbstract();
    method getVisibility (line 9) | public function getVisibility();

FILE: fixtures/Named.php
  type Named (line 5) | interface Named
    method getName (line 7) | public function getName();

FILE: fixtures/NeverType.php
  class NeverType (line 5) | class NeverType
    method doSomething (line 7) | public function doSomething(): never

FILE: fixtures/NullableArrayParameter.php
  class NullableArrayParameter (line 5) | class NullableArrayParameter
    method iHaveNullableArrayParameterWithNotNullDefaultValue (line 7) | public function iHaveNullableArrayParameterWithNotNullDefaultValue(?ar...

FILE: fixtures/NullableParameterTypeFalse.php
  class NullableParameterTypeFalse (line 5) | class NullableParameterTypeFalse
    method method (line 7) | public function method(?false $arg)

FILE: fixtures/NullableParameterTypeTrue.php
  class NullableParameterTypeTrue (line 5) | class NullableParameterTypeTrue
    method method (line 7) | public function method(?true $arg)

FILE: fixtures/NullableReturnTypeFalse.php
  class NullableReturnTypeFalse (line 5) | class NullableReturnTypeFalse
    method method (line 7) | public function method(): ?false

FILE: fixtures/NullableReturnTypeTrue.php
  class NullableReturnTypeTrue (line 5) | class NullableReturnTypeTrue
    method method (line 7) | public function method(): ?true

FILE: fixtures/OptionalDepsClass.php
  class OptionalDepsClass (line 7) | class OptionalDepsClass
    method iHaveAStrangeTypeHintedArg (line 9) | public function iHaveAStrangeTypeHintedArg(\I\Simply\Am\Nonexistent $c...
    method iHaveAnEvenStrangerTypeHintedArg (line 13) | public function iHaveAnEvenStrangerTypeHintedArg(Simply\Am\Not $class)

FILE: fixtures/ReadOnlyClass.php
  class ReadOnlyClass (line 5) | readonly class ReadOnlyClass

FILE: fixtures/ReturningFinalClass.php
  type ReturningFinalClass (line 5) | interface ReturningFinalClass
    method doSomething (line 7) | public function doSomething(): FinalClass;

FILE: fixtures/SelfReferencing.php
  type SelfReferencing (line 5) | interface SelfReferencing
    method __invoke (line 7) | public function __invoke(self $self): self;

FILE: fixtures/SpecialMethods.php
  class SpecialMethods (line 5) | class SpecialMethods
    method __construct (line 7) | public function __construct()
    method __destruct (line 11) | function __destruct()
    method __call (line 15) | function __call($name, $arguments)
    method __sleep (line 19) | function __sleep()
    method __wakeup (line 23) | function __wakeup()
    method __toString (line 27) | function __toString()
    method __invoke (line 32) | function __invoke()

FILE: fixtures/StandaloneParameterTypeFalse.php
  class StandaloneParameterTypeFalse (line 5) | class StandaloneParameterTypeFalse
    method method (line 7) | public function method(false $arg)

FILE: fixtures/StandaloneParameterTypeNull.php
  class StandaloneParameterTypeNull (line 5) | class StandaloneParameterTypeNull
    method method (line 7) | public function method(null $arg)

FILE: fixtures/StandaloneParameterTypeTrue.php
  class StandaloneParameterTypeTrue (line 5) | class StandaloneParameterTypeTrue
    method method (line 7) | public function method(true $arg)

FILE: fixtures/StandaloneReturnTypeFalse.php
  class StandaloneReturnTypeFalse (line 5) | class StandaloneReturnTypeFalse
    method method (line 7) | public function method(): false

FILE: fixtures/StandaloneReturnTypeNull.php
  class StandaloneReturnTypeNull (line 5) | class StandaloneReturnTypeNull
    method method (line 7) | public function method(): null

FILE: fixtures/StandaloneReturnTypeTrue.php
  class StandaloneReturnTypeTrue (line 5) | class StandaloneReturnTypeTrue
    method method (line 7) | public function method(): true

FILE: fixtures/TentativeReturnTypeNull.php
  class TentativeReturnTypeNull (line 5) | class TentativeReturnTypeNull
    method method (line 7) | #[\ReturnTypeWillChange()]

FILE: fixtures/ThrowableInterface.php
  type ThrowableInterface (line 5) | interface ThrowableInterface extends \Throwable

FILE: fixtures/UnionArgumentTypeFalse.php
  class UnionArgumentTypeFalse (line 5) | class UnionArgumentTypeFalse
    method method (line 7) | public function method(false|\stdClass $arg)

FILE: fixtures/UnionArgumentTypes.php
  class UnionArgumentTypes (line 5) | class UnionArgumentTypes
    method doSomething (line 7) | public function doSomething(bool|\stdClass $arg)

FILE: fixtures/UnionReturnTypeFalse.php
  class UnionReturnTypeFalse (line 5) | class UnionReturnTypeFalse
    method method (line 7) | public function method(): false|\stdClass

FILE: fixtures/UnionReturnTypes.php
  class UnionReturnTypes (line 5) | class UnionReturnTypes
    method doSomething (line 7) | public function doSomething(): bool|\stdClass

FILE: fixtures/WithArguments.php
  class WithArguments (line 5) | class WithArguments
    method methodWithArgs (line 7) | public function methodWithArgs(\ArrayAccess $arg_1, array $arg_2 = [],...
    method methodWithoutTypeHints (line 11) | public function methodWithoutTypeHints($arg)

FILE: fixtures/WithCallableArgument.php
  class WithCallableArgument (line 5) | class WithCallableArgument
    method methodWithArgs (line 7) | public function methodWithArgs(callable $arg_1, ?callable $arg_2 = null)

FILE: fixtures/WithFinalMethod.php
  class WithFinalMethod (line 5) | class WithFinalMethod
    method finalImplementation (line 7) | final public function finalImplementation()

FILE: fixtures/WithFinalVirtuallyPrivateMethod.php
  class WithFinalVirtuallyPrivateMethod (line 5) | class WithFinalVirtuallyPrivateMethod
    method __toString (line 7) | final public function __toString()
    method _getName (line 12) | final public function _getName()

FILE: fixtures/WithPhpdocClass.php
  class WithPhpdocClass (line 10) | class WithPhpdocClass
    method __call (line 12) | public function __call($name, $arguments)

FILE: fixtures/WithProtectedAbstractMethod.php
  class WithProtectedAbstractMethod (line 5) | abstract class WithProtectedAbstractMethod
    method innerDetail (line 7) | abstract protected function innerDetail();

FILE: fixtures/WithReferences.php
  class WithReferences (line 5) | class WithReferences
    method methodWithReferenceArgument (line 7) | public function methodWithReferenceArgument(&$arg_1, \ArrayAccess &$ar...

FILE: fixtures/WithReturnTypehints.php
  class WithReturnTypehints (line 5) | class WithReturnTypehints extends EmptyClass
    method getSelf (line 7) | public function getSelf(): self {
    method getName (line 11) | public function getName(): string {
    method getParent (line 15) | public function getParent(): parent {

FILE: fixtures/WithStaticMethod.php
  class WithStaticMethod (line 5) | class WithStaticMethod
    method innerDetail (line 7) | public static function innerDetail()

FILE: fixtures/WithTypehintedVariadicArgument.php
  class WithTypehintedVariadicArgument (line 5) | class WithTypehintedVariadicArgument
    method methodWithTypeHintedArgs (line 7) | function methodWithTypeHintedArgs(array ...$args)

FILE: fixtures/WithVariadicArgument.php
  class WithVariadicArgument (line 5) | class WithVariadicArgument
    method methodWithArgs (line 7) | function methodWithArgs(...$args)

FILE: fixtures/WithVirtuallyPrivateMethod.php
  class WithVirtuallyPrivateMethod (line 5) | class WithVirtuallyPrivateMethod
    method __toString (line 7) | public function __toString()
    method _getName (line 12) | public function _getName()
    method isAbstract (line 16) | public function isAbstract()

FILE: spec/Prophecy/Argument/ArgumentsWildcardSpec.php
  class ArgumentsWildcardSpec (line 8) | class ArgumentsWildcardSpec extends ObjectBehavior
    method it_wraps_non_token_arguments_into_ExactValueToken (line 10) | function it_wraps_non_token_arguments_into_ExactValueToken(\stdClass $...
    method it_generates_string_representation_from_all_tokens_imploded (line 23) | function it_generates_string_representation_from_all_tokens_imploded(
    method it_exposes_list_of_tokens (line 36) | function it_exposes_list_of_tokens(TokenInterface $token)
    method it_returns_score_of_1_if_there_are_no_tokens_and_arguments (line 43) | function it_returns_score_of_1_if_there_are_no_tokens_and_arguments()
    method it_should_return_match_score_based_on_all_tokens_score (line 50) | function it_should_return_match_score_based_on_all_tokens_score(
    method it_returns_false_if_there_is_less_arguments_than_tokens (line 66) | function it_returns_false_if_there_is_less_arguments_than_tokens(
    method it_returns_false_if_there_is_less_tokens_than_arguments (line 82) | function it_returns_false_if_there_is_less_tokens_than_arguments(
    method it_should_return_false_if_one_of_the_tokens_returns_false (line 98) | function it_should_return_false_if_one_of_the_tokens_returns_false(
    method it_should_calculate_score_until_last_token (line 114) | function it_should_calculate_score_until_last_token(

FILE: spec/Prophecy/Argument/Token/AnyValueTokenSpec.php
  class AnyValueTokenSpec (line 7) | class AnyValueTokenSpec extends ObjectBehavior
    method it_implements_TokenInterface (line 9) | function it_implements_TokenInterface()
    method it_is_not_last (line 14) | function it_is_not_last()
    method its_string_representation_is_star (line 19) | function its_string_representation_is_star()
    method it_scores_any_argument_as_3 (line 24) | function it_scores_any_argument_as_3()

FILE: spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php
  class AnyValuesTokenSpec (line 7) | class AnyValuesTokenSpec extends ObjectBehavior
    method it_implements_TokenInterface (line 9) | function it_implements_TokenInterface()
    method it_is_last (line 14) | function it_is_last()
    method its_string_representation_is_star_with_followup (line 19) | function its_string_representation_is_star_with_followup()
    method it_scores_any_argument_as_2 (line 24) | function it_scores_any_argument_as_2()

FILE: spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php
  class ApproximateValueTokenSpec (line 7) | class ApproximateValueTokenSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_is_initializable (line 14) | function it_is_initializable()
    method it_implements_TokenInterface (line 19) | function it_implements_TokenInterface()
    method it_is_not_last (line 24) | function it_is_not_last()
    method it_scores_10_if_rounded_argument_matches_rounded_value (line 29) | function it_scores_10_if_rounded_argument_matches_rounded_value()
    method it_does_not_score_if_rounded_argument_does_not_match_rounded_value (line 34) | function it_does_not_score_if_rounded_argument_does_not_match_rounded_...
    method it_uses_a_default_precision_of_zero (line 39) | function it_uses_a_default_precision_of_zero()
    method it_does_not_score_if_rounded_argument_is_not_numeric (line 45) | function it_does_not_score_if_rounded_argument_is_not_numeric()
    method it_has_simple_string_representation (line 52) | function it_has_simple_string_representation()

FILE: spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php
  class ArrayCountTokenSpec (line 7) | class ArrayCountTokenSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_implements_TokenInterface (line 14) | function it_implements_TokenInterface()
    method it_is_not_last (line 19) | function it_is_not_last()
    method it_scores_6_if_argument_array_has_proper_count (line 24) | function it_scores_6_if_argument_array_has_proper_count()
    method it_scores_6_if_argument_countable_object_has_proper_count (line 29) | function it_scores_6_if_argument_countable_object_has_proper_count(\Co...
    method it_does_not_score_if_argument_is_neither_array_nor_countable_object (line 35) | function it_does_not_score_if_argument_is_neither_array_nor_countable_...
    method it_does_not_score_if_argument_array_has_wrong_count (line 42) | function it_does_not_score_if_argument_array_has_wrong_count()
    method it_does_not_score_if_argument_countable_object_has_wrong_count (line 47) | function it_does_not_score_if_argument_countable_object_has_wrong_coun...
    method it_has_simple_string_representation (line 53) | function it_has_simple_string_representation()

FILE: spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php
  class ArrayEntryTokenSpec (line 10) | class ArrayEntryTokenSpec extends ObjectBehavior
    method let (line 12) | function let(TokenInterface $key, TokenInterface $value)
    method it_implements_TokenInterface (line 17) | function it_implements_TokenInterface()
    method it_is_not_last (line 22) | function it_is_not_last()
    method it_holds_key_and_value (line 27) | function it_holds_key_and_value($key, $value)
    method its_string_representation_tells_that_its_an_array_containing_the_key_value_pair (line 33) | function its_string_representation_tells_that_its_an_array_containing_...
    method it_wraps_non_token_value_into_ExactValueToken (line 40) | function it_wraps_non_token_value_into_ExactValueToken(TokenInterface ...
    method it_wraps_non_token_key_into_ExactValueToken (line 46) | function it_wraps_non_token_key_into_ExactValueToken(\stdClass $object...
    method it_scores_array_half_of_combined_scores_from_key_and_value_tokens (line 52) | function it_scores_array_half_of_combined_scores_from_key_and_value_to...
    method it_scores_traversable_object_half_of_combined_scores_from_key_and_value_tokens (line 59) | function it_scores_traversable_object_half_of_combined_scores_from_key...
    method it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken (line 78) | function it_throws_exception_during_scoring_of_array_accessible_object...
    method it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens (line 90) | function it_scores_array_accessible_object_half_of_combined_scores_fro...
    method it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible (line 103) | function it_accepts_any_key_token_type_to_score_object_that_is_both_tr...
    method it_does_not_score_if_argument_is_neither_array_nor_traversable_nor_array_accessible (line 121) | function it_does_not_score_if_argument_is_neither_array_nor_traversabl...
    method it_does_not_score_empty_array (line 127) | function it_does_not_score_empty_array()
    method it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry (line 132) | function it_does_not_score_array_if_key_and_value_tokens_do_not_score_...
    method it_does_not_score_traversable_object_without_entries (line 142) | function it_does_not_score_traversable_object_without_entries(\Iterato...
    method it_does_not_score_traversable_object_if_key_and_value_tokens_do_not_score_same_entry (line 150) | function it_does_not_score_traversable_object_if_key_and_value_tokens_...
    method it_does_not_score_array_accessible_object_if_it_has_no_offset_with_key_token_value (line 173) | function it_does_not_score_array_accessible_object_if_it_has_no_offset...
    method it_does_not_score_array_accessible_object_if_key_and_value_tokens_do_not_score_same_entry (line 182) | function it_does_not_score_array_accessible_object_if_key_and_value_to...
    method its_score_is_capped_at_8 (line 195) | function its_score_is_capped_at_8($key, $value)

FILE: spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php
  class ArrayEveryEntryTokenSpec (line 8) | class ArrayEveryEntryTokenSpec extends ObjectBehavior
    method let (line 10) | function let(TokenInterface $value)
    method it_implements_TokenInterface (line 15) | function it_implements_TokenInterface()
    method it_is_not_last (line 20) | function it_is_not_last()
    method it_holds_value (line 25) | function it_holds_value($value)
    method its_string_representation_tells_that_its_an_array_containing_only_value (line 30) | function its_string_representation_tells_that_its_an_array_containing_...
    method it_wraps_non_token_value_into_ExactValueToken (line 36) | function it_wraps_non_token_value_into_ExactValueToken(\stdClass $stdC...
    method it_does_not_score_if_argument_is_neither_array_nor_traversable (line 42) | function it_does_not_score_if_argument_is_neither_array_nor_traversable()
    method it_does_not_score_empty_array (line 48) | function it_does_not_score_empty_array()
    method it_does_not_score_traversable_object_without_entries (line 53) | function it_does_not_score_traversable_object_without_entries(\Iterato...
    method it_scores_avg_of_scores_from_value_tokens (line 61) | function it_scores_avg_of_scores_from_value_tokens($value)
    method it_scores_false_if_entry_scores_false (line 68) | function it_scores_false_if_entry_scores_false($value)
    method it_does_not_score_array_keys (line 75) | function it_does_not_score_array_keys($value)
    method it_scores_traversable_object_from_value_token (line 82) | function it_scores_traversable_object_from_value_token(TokenInterface ...

FILE: spec/Prophecy/Argument/Token/CallbackTokenSpec.php
  class CallbackTokenSpec (line 7) | class CallbackTokenSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_implements_TokenInterface (line 14) | function it_implements_TokenInterface()
    method it_is_not_last (line 19) | function it_is_not_last()
    method it_scores_7_if_argument_matches_callback (line 24) | function it_scores_7_if_argument_matches_callback()
    method it_does_not_scores_if_argument_does_not_match_callback (line 31) | function it_does_not_scores_if_argument_does_not_match_callback()
    method its_string_representation_should_tell_that_its_callback (line 38) | function its_string_representation_should_tell_that_its_callback()
    method its_string_representation_can_be_customized (line 43) | function its_string_representation_can_be_customized()

FILE: spec/Prophecy/Argument/Token/ExactValueTokenSpec.php
  class ExactValueTokenSpec (line 7) | class ExactValueTokenSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_implements_TokenInterface (line 14) | function it_implements_TokenInterface()
    method it_is_not_last (line 19) | function it_is_not_last()
    method it_holds_value (line 24) | function it_holds_value()
    method it_scores_10_if_value_is_equal_to_argument (line 29) | function it_scores_10_if_value_is_equal_to_argument()
    method it_scores_10_if_value_is_an_object_and_equal_to_argument (line 35) | function it_scores_10_if_value_is_an_object_and_equal_to_argument()
    method it_scores_10_if_value_is_a_double_object_and_equal_to_argument (line 44) | function it_scores_10_if_value_is_a_double_object_and_equal_to_argumen...
    method it_does_not_scores_if_value_is_not_equal_to_argument (line 52) | function it_does_not_scores_if_value_is_not_equal_to_argument()
    method it_does_not_scores_if_value_an_object_and_is_not_equal_to_argument (line 58) | function it_does_not_scores_if_value_an_object_and_is_not_equal_to_arg...
    method it_does_not_scores_if_value_type_and_is_not_equal_to_argument (line 67) | function it_does_not_scores_if_value_type_and_is_not_equal_to_argument()
    method it_generates_proper_string_representation_for_integer (line 73) | function it_generates_proper_string_representation_for_integer()
    method it_generates_proper_string_representation_for_string (line 79) | function it_generates_proper_string_representation_for_string()
    method it_generates_single_line_representation_for_multiline_string (line 85) | function it_generates_single_line_representation_for_multiline_string()
    method it_generates_proper_string_representation_for_double (line 91) | function it_generates_proper_string_representation_for_double()
    method it_generates_proper_string_representation_for_boolean_true (line 97) | function it_generates_proper_string_representation_for_boolean_true()
    method it_generates_proper_string_representation_for_boolean_false (line 103) | function it_generates_proper_string_representation_for_boolean_false()
    method it_generates_proper_string_representation_for_null (line 109) | function it_generates_proper_string_representation_for_null()
    method it_generates_proper_string_representation_for_empty_array (line 115) | function it_generates_proper_string_representation_for_empty_array()
    method it_generates_proper_string_representation_for_array (line 121) | function it_generates_proper_string_representation_for_array()
    method it_generates_proper_string_representation_for_resource (line 127) | function it_generates_proper_string_representation_for_resource()
    method it_generates_proper_string_representation_for_object (line 134) | function it_generates_proper_string_representation_for_object(\stdClas...
    method it_scores_10_if_value_an_numeric_and_equal_to_argument_as_stringable (line 147) | function it_scores_10_if_value_an_numeric_and_equal_to_argument_as_str...
    method it_does_not_scores_if_value_an_numeric_and_equal_to_argument_as_stringable (line 156) | function it_does_not_scores_if_value_an_numeric_and_equal_to_argument_...
    method it_does_not_scores_if_value_an_object_and_not_equal_to_argument_object (line 165) | function it_does_not_scores_if_value_an_object_and_not_equal_to_argume...
  class ExactValueTokenFixtureA (line 175) | class ExactValueTokenFixtureA
  class ExactValueTokenFixtureB (line 180) | class ExactValueTokenFixtureB extends ExactValueTokenFixtureA
    method __construct (line 185) | public function __construct($value)
  class ExactValueTokenC (line 191) | class ExactValueTokenC
    method __construct (line 194) | public function __construct($value)
    method __toString (line 199) | public function __toString()

FILE: spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php
  class IdenticalValueTokenSpec (line 7) | class IdenticalValueTokenSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_is_initializable (line 14) | function it_is_initializable()
    method it_scores_11_if_string_value_is_identical_to_argument (line 19) | function it_scores_11_if_string_value_is_identical_to_argument()
    method it_scores_11_if_boolean_value_is_identical_to_argument (line 25) | function it_scores_11_if_boolean_value_is_identical_to_argument()
    method it_scores_11_if_integer_value_is_identical_to_argument (line 31) | function it_scores_11_if_integer_value_is_identical_to_argument()
    method it_scores_11_if_float_value_is_identical_to_argument (line 37) | function it_scores_11_if_float_value_is_identical_to_argument()
    method it_scores_11_if_array_value_is_identical_to_argument (line 43) | function it_scores_11_if_array_value_is_identical_to_argument()
    method it_scores_11_if_object_value_is_identical_to_argument (line 49) | function it_scores_11_if_object_value_is_identical_to_argument()
    method it_scores_false_if_value_is_not_identical_to_argument (line 57) | function it_scores_false_if_value_is_not_identical_to_argument()
    method it_scores_false_if_object_value_is_not_the_same_instance_than_argument (line 63) | function it_scores_false_if_object_value_is_not_the_same_instance_than...
    method it_scores_false_if_integer_value_is_not_identical_to_boolean_argument (line 69) | function it_scores_false_if_integer_value_is_not_identical_to_boolean_...
    method it_is_not_last (line 75) | function it_is_not_last()
    method it_generates_proper_string_representation_for_integer (line 80) | function it_generates_proper_string_representation_for_integer()
    method it_generates_proper_string_representation_for_string (line 86) | function it_generates_proper_string_representation_for_string()
    method it_generates_single_line_representation_for_multiline_string (line 92) | function it_generates_single_line_representation_for_multiline_string()
    method it_generates_proper_string_representation_for_double (line 98) | function it_generates_proper_string_representation_for_double()
    method it_generates_proper_string_representation_for_boolean_true (line 104) | function it_generates_proper_string_representation_for_boolean_true()
    method it_generates_proper_string_representation_for_boolean_false (line 110) | function it_generates_proper_string_representation_for_boolean_false()
    method it_generates_proper_string_representation_for_null (line 116) | function it_generates_proper_string_representation_for_null()
    method it_generates_proper_string_representation_for_empty_array (line 122) | function it_generates_proper_string_representation_for_empty_array()
    method it_generates_proper_string_representation_for_array (line 128) | function it_generates_proper_string_representation_for_array()
    method it_generates_proper_string_representation_for_resource (line 134) | function it_generates_proper_string_representation_for_resource()
    method it_generates_proper_string_representation_for_object (line 141) | function it_generates_proper_string_representation_for_object($object)

FILE: spec/Prophecy/Argument/Token/InArrayTokenSpec.php
  class InArrayTokenSpec (line 7) | class InArrayTokenSpec extends ObjectBehavior
    method it_implements_TokenInterface (line 9) | function it_implements_TokenInterface()
    method it_is_not_last (line 15) | function it_is_not_last()
    method it_scores_8_if_argument_is_in_array (line 21) | function it_scores_8_if_argument_is_in_array()
    method it_scores_false_if_argument_is_not_in_array (line 27) | function it_scores_false_if_argument_is_not_in_array()
    method it_generates_array_in_string_format (line 33) | function it_generates_array_in_string_format()
    method it_generates_an_empty_array_as_string_when_token_is_empty (line 39) | function it_generates_an_empty_array_as_string_when_token_is_empty()

FILE: spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php
  class LogicalAndTokenSpec (line 8) | class LogicalAndTokenSpec extends ObjectBehavior
    method it_implements_TokenInterface (line 10) | function it_implements_TokenInterface()
    method it_is_not_last (line 16) | function it_is_not_last()
    method it_generates_string_representation_from_all_tokens_imploded (line 22) | function it_generates_string_representation_from_all_tokens_imploded(
    method it_wraps_non_token_arguments_into_ExactValueToken (line 35) | function it_wraps_non_token_arguments_into_ExactValueToken()
    method it_scores_the_maximum_score_from_all_scores_returned_by_tokens (line 41) | function it_scores_the_maximum_score_from_all_scores_returned_by_token...
    method it_does_not_score_if_there_are_no_arguments_or_tokens (line 49) | function it_does_not_score_if_there_are_no_arguments_or_tokens()
    method it_does_not_score_if_either_of_tokens_does_not_score (line 55) | function it_does_not_score_if_either_of_tokens_does_not_score(TokenInt...

FILE: spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php
  class LogicalNotTokenSpec (line 8) | class LogicalNotTokenSpec extends ObjectBehavior
    method let (line 10) | function let(TokenInterface $token)
    method it_implements_TokenInterface (line 15) | function it_implements_TokenInterface()
    method it_holds_originating_token (line 20) | function it_holds_originating_token($token)
    method it_has_simple_string_representation (line 25) | function it_has_simple_string_representation($token)
    method it_wraps_non_token_argument_into_ExactValueToken (line 31) | function it_wraps_non_token_argument_into_ExactValueToken()
    method it_scores_4_if_preset_token_does_not_match_the_argument (line 39) | function it_scores_4_if_preset_token_does_not_match_the_argument($token)
    method it_does_not_score_if_preset_token_matches_argument (line 45) | function it_does_not_score_if_preset_token_matches_argument($token)
    method it_is_last_if_preset_token_is_last (line 51) | function it_is_last_if_preset_token_is_last($token)
    method it_is_not_last_if_preset_token_is_not_last (line 57) | function it_is_not_last_if_preset_token_is_not_last($token)

FILE: spec/Prophecy/Argument/Token/NotInArrayTokenSpec.php
  class NotInArrayTokenSpec (line 7) | class NotInArrayTokenSpec extends ObjectBehavior
    method it_implements_TokenInterface (line 9) | function it_implements_TokenInterface()
    method it_is_not_last (line 15) | function it_is_not_last()
    method it_scores_8_if_argument_is_not_in_array (line 21) | function it_scores_8_if_argument_is_not_in_array()
    method it_scores_false_if_argument_is_in_array (line 27) | function it_scores_false_if_argument_is_in_array()
    method it_generates_array_in_string_format (line 33) | function it_generates_array_in_string_format()
    method it_generates_an_empty_array_as_string_when_token_is_empty (line 39) | function it_generates_an_empty_array_as_string_when_token_is_empty()

FILE: spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php
  class ObjectStateTokenSpec (line 7) | class ObjectStateTokenSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_implements_TokenInterface (line 14) | function it_implements_TokenInterface()
    method it_is_not_last (line 19) | function it_is_not_last()
    method it_scores_8_if_argument_object_has_specific_method_state (line 24) | function it_scores_8_if_argument_object_has_specific_method_state(\Ref...
    method it_scores_8_if_argument_object_has_specific_property_state (line 31) | function it_scores_8_if_argument_object_has_specific_property_state(\s...
    method it_does_not_score_if_argument_method_state_does_not_match (line 38) | function it_does_not_score_if_argument_method_state_does_not_match()
    method it_does_not_score_if_argument_property_state_does_not_match (line 47) | function it_does_not_score_if_argument_property_state_does_not_match(\...
    method it_does_not_score_if_argument_object_does_not_have_method_or_property (line 54) | function it_does_not_score_if_argument_object_does_not_have_method_or_...
    method it_does_not_score_if_argument_is_not_object (line 59) | function it_does_not_score_if_argument_is_not_object()
    method it_has_simple_string_representation (line 64) | function it_has_simple_string_representation()
  class ObjectStateTokenFixtureA (line 70) | class ObjectStateTokenFixtureA
  class ObjectStateTokenFixtureB (line 75) | class ObjectStateTokenFixtureB extends ObjectStateTokenFixtureA
    method __construct (line 80) | public function __construct($value)
    method getSelf (line 85) | public function getSelf()

FILE: spec/Prophecy/Argument/Token/StringContainsTokenSpec.php
  class StringContainsTokenSpec (line 7) | class StringContainsTokenSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_is_initializable (line 14) | function it_is_initializable()
    method it_implements_TokenInterface (line 19) | function it_implements_TokenInterface()
    method it_holds_value (line 24) | function it_holds_value()
    method it_is_not_last (line 29) | function it_is_not_last()
    method it_scores_6_if_the_argument_contains_the_value (line 34) | function it_scores_6_if_the_argument_contains_the_value()
    method it_does_not_score_if_the_argument_does_not_contain_the_value (line 39) | function it_does_not_score_if_the_argument_does_not_contain_the_value()
    method it_does_not_score_if_the_argument_is_not_a_string (line 44) | function it_does_not_score_if_the_argument_is_not_a_string()
    method its_string_representation_shows_substring (line 49) | function its_string_representation_shows_substring()

FILE: spec/Prophecy/Argument/Token/TypeTokenSpec.php
  class TypeTokenSpec (line 8) | class TypeTokenSpec extends ObjectBehavior
    method let (line 10) | function let()
    method it_implements_TokenInterface (line 15) | function it_implements_TokenInterface()
    method it_is_not_last (line 20) | function it_is_not_last()
    method it_scores_5_if_argument_matches_simple_type (line 25) | function it_scores_5_if_argument_matches_simple_type()
    method it_does_not_scores_if_argument_does_not_match_simple_type (line 32) | function it_does_not_scores_if_argument_does_not_match_simple_type()
    method it_scores_5_if_argument_is_an_instance_of_specified_class (line 39) | function it_scores_5_if_argument_is_an_instance_of_specified_class(\Re...
    method it_has_simple_string_representation (line 46) | function it_has_simple_string_representation()
    method it_scores_5_if_argument_is_an_instance_of_specified_interface (line 51) | function it_scores_5_if_argument_is_an_instance_of_specified_interface...

FILE: spec/Prophecy/ArgumentSpec.php
  class ArgumentSpec (line 7) | class ArgumentSpec extends ObjectBehavior
    method it_has_a_shortcut_for_exact_argument_token (line 9) | function it_has_a_shortcut_for_exact_argument_token()
    method it_has_a_shortcut_for_any_argument_token (line 16) | function it_has_a_shortcut_for_any_argument_token()
    method it_has_a_shortcut_for_multiple_arguments_token (line 22) | function it_has_a_shortcut_for_multiple_arguments_token()
    method it_has_a_shortcut_for_type_token (line 28) | function it_has_a_shortcut_for_type_token()
    method it_has_a_shortcut_for_callback_token (line 34) | function it_has_a_shortcut_for_callback_token()
    method it_supports_customizing_tostring_representation_for_callback_token (line 40) | function it_supports_customizing_tostring_representation_for_callback_...
    method it_has_a_shortcut_for_object_state_token (line 47) | function it_has_a_shortcut_for_object_state_token()
    method it_has_a_shortcut_for_logical_and_token (line 53) | function it_has_a_shortcut_for_logical_and_token()
    method it_has_a_shortcut_for_array_count_token (line 59) | function it_has_a_shortcut_for_array_count_token()
    method it_has_a_shortcut_for_array_entry_token (line 65) | function it_has_a_shortcut_for_array_entry_token()
    method it_has_a_shortcut_for_array_every_entry_token (line 71) | function it_has_a_shortcut_for_array_every_entry_token()
    method it_has_a_shortcut_for_identical_value_token (line 77) | function it_has_a_shortcut_for_identical_value_token()
    method it_has_a_shortcut_for_array_entry_token_matching_any_key (line 83) | function it_has_a_shortcut_for_array_entry_token_matching_any_key()
    method it_has_a_shortcut_for_array_entry_token_matching_any_value (line 90) | function it_has_a_shortcut_for_array_entry_token_matching_any_value()
    method it_has_a_shortcut_for_logical_not_token (line 97) | function it_has_a_shortcut_for_logical_not_token()
    method it_has_a_shortcut_for_string_contains_token (line 103) | function it_has_a_shortcut_for_string_contains_token()
    method it_has_a_shortcut_for_approximate_token (line 109) | function it_has_a_shortcut_for_approximate_token()
    method it_has_a_shortcut_for_in_token (line 115) | function it_has_a_shortcut_for_in_token()
    method it_has_a_shortcut_for_not_in_token (line 121) | function it_has_a_shortcut_for_not_in_token()

FILE: spec/Prophecy/Call/CallCenterSpec.php
  class CallCenterSpec (line 11) | class CallCenterSpec extends ObjectBehavior
    method let (line 13) | function let(ObjectProphecy $objectProphecy) {}
    method it_records_calls_made_through_makeCall_method (line 15) | function it_records_calls_made_through_makeCall_method(ObjectProphecy ...
    method it_returns_null_for_any_call_through_makeCall_if_no_method_prophecies_added (line 31) | function it_returns_null_for_any_call_through_makeCall_if_no_method_pr...
    method it_executes_promise_of_method_prophecy_that_matches_signature_passed_to_makeCall (line 39) | function it_executes_promise_of_method_prophecy_that_matches_signature...
    method it_executes_promise_of_method_prophecy_that_matches_with_highest_score_to_makeCall (line 81) | function it_executes_promise_of_method_prophecy_that_matches_with_high...
    method it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise (line 123) | function it_returns_null_if_method_prophecy_that_matches_makeCall_argu...
    method it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard (line 141) | function it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard(
    method it_records_the_error_when_stub_has_got_unexpected_method_calls (line 161) | function it_records_the_error_when_stub_has_got_unexpected_method_calls(

FILE: spec/Prophecy/Call/CallSpec.php
  class CallSpec (line 8) | class CallSpec extends ObjectBehavior
    method let (line 10) | function let(\Exception $exception)
    method it_exposes_method_name_through_getter (line 15) | function it_exposes_method_name_through_getter()
    method it_exposes_arguments_through_getter (line 20) | function it_exposes_arguments_through_getter()
    method it_exposes_return_value_through_getter (line 25) | function it_exposes_return_value_through_getter()
    method it_exposes_exception_through_getter (line 30) | function it_exposes_exception_through_getter($exception)
    method it_exposes_file_and_line_through_getter (line 35) | function it_exposes_file_and_line_through_getter()
    method it_returns_shortpath_to_callPlace (line 41) | function it_returns_shortpath_to_callPlace()
    method it_returns_unknown_as_callPlace_if_no_file_or_line_provided (line 46) | function it_returns_unknown_as_callPlace_if_no_file_or_line_provided()
    method it_adds_wildcard_match_score (line 53) | function it_adds_wildcard_match_score(ArgumentsWildcard $wildcard)
    method it_caches_and_returns_wildcard_match_score (line 59) | function it_caches_and_returns_wildcard_match_score(ArgumentsWildcard ...

FILE: spec/Prophecy/Comparator/ClosureComparatorSpec.php
  class ClosureComparatorSpec (line 7) | class ClosureComparatorSpec extends ObjectBehavior
    method it_is_comparator (line 9) | function it_is_comparator()
    method it_accepts_only_closures (line 14) | function it_accepts_only_closures()
    method it_asserts_that_different_closures_are_different (line 27) | function it_asserts_that_different_closures_are_different()
    method it_asserts_that_closures_are_equal_if_its_the_same_closure (line 32) | function it_asserts_that_closures_are_equal_if_its_the_same_closure()

FILE: spec/Prophecy/Comparator/FactorySpec.php
  class FactorySpec (line 10) | class FactorySpec extends ObjectBehavior
    method let (line 12) | function let()
    method it_extends_Sebastian_Comparator_Factory (line 21) | function it_extends_Sebastian_Comparator_Factory()
    method it_should_have_ClosureComparator_registered (line 26) | function it_should_have_ClosureComparator_registered()

FILE: spec/Prophecy/Comparator/ProphecyComparatorSpec.php
  class ProphecyComparatorSpec (line 10) | class ProphecyComparatorSpec extends ObjectBehavior
    method it_is_a_comparator (line 12) | function it_is_a_comparator()
    method it_accepts_only_prophecy_objects (line 17) | function it_accepts_only_prophecy_objects()
    method it_asserts_that_an_object_is_equal_to_its_revealed_prophecy (line 33) | function it_asserts_that_an_object_is_equal_to_its_revealed_prophecy()

FILE: spec/Prophecy/Doubler/CachedDoublerSpec.php
  class CachedDoublerSpec (line 12) | class CachedDoublerSpec extends ObjectBehavior
    method let (line 14) | function let(ClassMirror $mirror, ClassCreator $creator, NameGenerator...
    method it_creates_only_one_class_definition_for_the_same_class_without_interfaces_and_patches (line 31) | function it_creates_only_one_class_definition_for_the_same_class_witho...
    method it_creates_two_class_definitions_for_different_classes_without_interfaces_and_patches (line 49) | function it_creates_two_class_definitions_for_different_classes_withou...
    method it_creates_two_different_class_definitions_for_the_same_class_with_different_interfaces_and_same_patches (line 73) | function it_creates_two_different_class_definitions_for_the_same_class...
    method it_creates_two_different_class_definitions_for_different_classes_with_different_interfaces_and_same_patches (line 114) | function it_creates_two_different_class_definitions_for_different_clas...
    method it_creates_only_one_class_definition_for_the_same_class_with_same_interfaces_and_without_patches (line 157) | function it_creates_only_one_class_definition_for_the_same_class_with_...
    method it_creates_only_one_class_definition_for_different_classes_with_same_interfaces_and_without_patches (line 179) | function it_creates_only_one_class_definition_for_different_classes_wi...
    method it_creates_two_different_class_definitions_for_the_same_class_with_different_interfaces_and_without_patches (line 207) | function it_creates_two_different_class_definitions_for_the_same_class...
    method it_creates_two_different_class_definitions_for_different_classes_with_different_interfaces_and_without_patches (line 233) | function it_creates_two_different_class_definitions_for_different_clas...
    method it_creates_only_one_class_definition_for_the_same_class_with_same_interfaces_and_same_patches (line 261) | function it_creates_only_one_class_definition_for_the_same_class_with_...
    method it_creates_two_class_definitions_for_different_classes_with_different_interfaces_and_patches (line 294) | function it_creates_two_class_definitions_for_different_classes_with_d...
    method it_creates_two_class_definitions_for_the_same_class_with_different_interfaces_and_patches (line 335) | function it_creates_two_class_definitions_for_the_same_class_with_diff...
    method it_creates_two_different_class_definitions_for_the_same_class_with_same_interfaces_and_different_patches (line 374) | function it_creates_two_different_class_definitions_for_the_same_class...
  class aClass (line 412) | class aClass {}

FILE: spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php
  class DisableConstructorPatchSpec (line 14) | class DisableConstructorPatchSpec extends ObjectBehavior
    method it_is_a_patch (line 16) | function it_is_a_patch()
    method its_priority_is_100 (line 21) | function its_priority_is_100()
    method it_supports_anything (line 26) | function it_supports_anything(ClassNode $node)
    method it_makes_all_constructor_arguments_optional (line 31) | function it_makes_all_constructor_arguments_optional(
    method it_creates_new_constructor_if_object_has_none (line 61) | function it_creates_new_constructor_if_object_has_none(ClassNode $class)
    method it_ignores_final_constructor (line 71) | function it_ignores_final_constructor(ClassNode $class)

FILE: spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php
  class KeywordPatchSpec (line 9) | class KeywordPatchSpec extends ObjectBehavior
    method it_is_a_patch (line 11) | function it_is_a_patch()
    method its_priority_is_49 (line 16) | function its_priority_is_49()
    method it_will_remove_halt_compiler_method (line 21) | function it_will_remove_halt_compiler_method(

FILE: spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php
  class MagicCallPatchSpec (line 9) | class MagicCallPatchSpec extends ObjectBehavior
    method it_is_a_patch (line 11) | function it_is_a_patch()
    method it_supports_anything (line 16) | function it_supports_anything(ClassNode $node)
    method it_discovers_api_using_phpdoc (line 21) | function it_discovers_api_using_phpdoc(ClassNode $node)
    method it_ignores_existing_methods (line 31) | function it_ignores_existing_methods(ClassNode $node)
    method it_ignores_empty_methods_from_phpdoc (line 42) | function it_ignores_empty_methods_from_phpdoc(ClassNode $node)
    method it_discovers_api_using_phpdoc_from_implemented_interfaces (line 52) | function it_discovers_api_using_phpdoc_from_implemented_interfaces(Cla...
    method it_discovers_api_using_phpdoc_from_own_interfaces (line 62) | function it_discovers_api_using_phpdoc_from_own_interfaces(ClassNode $...
    method it_discovers_api_using_phpdoc_from_extended_parent_interfaces (line 72) | function it_discovers_api_using_phpdoc_from_extended_parent_interfaces...
    method it_has_50_priority (line 82) | function it_has_50_priority()
  class MagicalApi (line 91) | class MagicalApi
    method definedMethod (line 96) | public function definedMethod() {}
  class MagicalApiInvalidMethodDefinition (line 102) | class MagicalApiInvalidMethodDefinition {}
  class MagicalApiExtended (line 107) | class MagicalApiExtended extends MagicalApi {}
  class MagicalApiImplemented (line 111) | class MagicalApiImplemented implements MagicalApiInterface {}
  class MagicalApiImplementedExtended (line 115) | class MagicalApiImplementedExtended extends MagicalApiImplemented {}
  type MagicalApiInterface (line 120) | interface MagicalApiInterface {}

FILE: spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php
  class ProphecySubjectPatchSpec (line 12) | class ProphecySubjectPatchSpec extends ObjectBehavior
    method it_is_a_patch (line 14) | function it_is_a_patch()
    method it_has_priority_of_0 (line 19) | function it_has_priority_of_0()
    method it_supports_any_class (line 24) | function it_supports_any_class(ClassNode $node)
    method it_forces_class_to_implement_ProphecySubjectInterface (line 29) | function it_forces_class_to_implement_ProphecySubjectInterface(ClassNo...
    method it_forces_all_class_methods_except_constructor_to_proxy_calls_into_prophecy_makeCall (line 42) | function it_forces_all_class_methods_except_constructor_to_proxy_calls...

FILE: spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php
  class ReflectionClassNewInstancePatchSpec (line 10) | class ReflectionClassNewInstancePatchSpec extends ObjectBehavior
    method it_is_a_patch (line 12) | function it_is_a_patch()
    method its_priority_is_50 (line 17) | function its_priority_is_50()
    method it_supports_ReflectionClass_only (line 22) | function it_supports_ReflectionClass_only(ClassNode $reflectionClassNo...
    method it_makes_all_newInstance_arguments_optional (line 31) | function it_makes_all_newInstance_arguments_optional(

FILE: spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php
  class SplFileInfoPatchSpec (line 10) | class SplFileInfoPatchSpec extends ObjectBehavior
    method it_is_a_patch (line 12) | function it_is_a_patch()
    method its_priority_is_50 (line 17) | function its_priority_is_50()
    method it_does_not_support_nodes_without_parent_class (line 22) | function it_does_not_support_nodes_without_parent_class(ClassNode $node)
    method it_supports_nodes_with_SplFileInfo_as_parent_class (line 28) | function it_supports_nodes_with_SplFileInfo_as_parent_class(ClassNode ...
    method it_supports_nodes_with_derivative_of_SplFileInfo_as_parent_class (line 34) | function it_supports_nodes_with_derivative_of_SplFileInfo_as_parent_cl...
    method it_adds_a_method_to_node_if_not_exists (line 40) | function it_adds_a_method_to_node_if_not_exists(ClassNode $node)
    method it_updates_existing_method_if_found (line 49) | function it_updates_existing_method_if_found(ClassNode $node, MethodNo...
    method it_should_not_supply_a_file_for_a_directory_iterator (line 60) | function it_should_not_supply_a_file_for_a_directory_iterator(ClassNod...
    method it_should_supply_a_file_for_a_spl_file_object (line 73) | function it_should_supply_a_file_for_a_spl_file_object(ClassNode $node...
    method it_should_supply_a_file_for_a_symfony_spl_file_info (line 86) | function it_should_supply_a_file_for_a_symfony_spl_file_info(ClassNode...

FILE: spec/Prophecy/Doubler/ClassPatch/ThrowablePatchSpec.php
  class ThrowablePatchSpec (line 8) | class ThrowablePatchSpec extends ObjectBehavior
    method it_is_a_patch (line 10) | function it_is_a_patch()
    method it_does_not_support_class_that_does_not_implement_throwable (line 15) | function it_does_not_support_class_that_does_not_implement_throwable(C...
    method it_supports_class_that_extends_not_throwable_class (line 23) | function it_supports_class_that_extends_not_throwable_class(ClassNode ...
    method it_does_not_support_class_that_already_extends_a_throwable_class (line 31) | function it_does_not_support_class_that_already_extends_a_throwable_cl...
    method it_supports_class_implementing_interface_that_extends_throwable (line 39) | function it_supports_class_implementing_interface_that_extends_throwab...
    method it_sets_the_parent_class_to_exception (line 47) | function it_sets_the_parent_class_to_exception(ClassNode $node)
    method it_throws_error_when_trying_to_double_concrete_class_and_throwable_interface (line 65) | function it_throws_error_when_trying_to_double_concrete_class_and_thro...

FILE: spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php
  class TraversablePatchSpec (line 10) | class TraversablePatchSpec extends ObjectBehavior
    method it_is_a_patch (line 12) | function it_is_a_patch()
    method it_supports_class_that_implements_only_Traversable (line 17) | function it_supports_class_that_implements_only_Traversable(ClassNode ...
    method it_does_not_support_class_that_implements_Iterator (line 24) | function it_does_not_support_class_that_implements_Iterator(ClassNode ...
    method it_does_not_support_class_that_implements_IteratorAggregate (line 31) | function it_does_not_support_class_that_implements_IteratorAggregate(C...
    method it_has_100_priority (line 38) | function it_has_100_priority()
    method it_forces_node_to_implement_IteratorAggregate (line 43) | function it_forces_node_to_implement_IteratorAggregate(ClassNode $node)
    method it_adds_methods_to_implement_iterator (line 52) | function it_adds_methods_to_implement_iterator(ClassNode $node)

FILE: spec/Prophecy/Doubler/DoublerSpec.php
  class DoublerSpec (line 12) | class DoublerSpec extends ObjectBehavior
    method let (line 14) | function let(ClassMirror $mirror, ClassCreator $creator, NameGenerator...
    method it_does_not_have_patches_by_default (line 19) | function it_does_not_have_patches_by_default()
    method its_registerClassPatch_adds_a_patch_to_the_doubler (line 24) | function its_registerClassPatch_adds_a_patch_to_the_doubler(ClassPatch...
    method its_getClassPatches_sorts_patches_by_priority (line 30) | function its_getClassPatches_sorts_patches_by_priority(
    method its_double_mirrors_alterates_and_instantiates_provided_class (line 49) | function its_double_mirrors_alterates_and_instantiates_provided_class(
    method it_double_instantiates_a_class_with_constructor_argument (line 81) | function it_double_instantiates_a_class_with_constructor_argument(
    method it_can_instantiate_class_with_final_constructor (line 96) | function it_can_instantiate_class_with_final_constructor(
  class WithFinalConstructor (line 112) | class WithFinalConstructor
    method __construct (line 114) | final public function __construct() {}

FILE: spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php
  class ClassCodeGeneratorSpec (line 16) | class ClassCodeGeneratorSpec extends ObjectBehavior
    method it_generates_proper_php_code_for_specific_ClassNode (line 18) | function it_generates_proper_php_code_for_specific_ClassNode(
    method it_generates_proper_php_code_for_variadics (line 150) | function it_generates_proper_php_code_for_variadics(
    method it_overrides_properly_methods_with_args_passed_by_reference (line 251) | function it_overrides_properly_methods_with_args_passed_by_reference(
    method it_generates_proper_code_for_union_return_types (line 296) | function it_generates_proper_code_for_union_return_types(
    method it_generates_proper_code_for_dnf_types (line 336) | function it_generates_proper_code_for_dnf_types(
    method it_generates_proper_code_for_intersection_return_types (line 378) | function it_generates_proper_code_for_intersection_return_types(
    method it_generates_proper_code_for_union_argument_types (line 416) | function it_generates_proper_code_for_union_argument_types(
    method it_generates_empty_class_for_empty_ClassNode (line 463) | function it_generates_empty_class_for_empty_ClassNode(ClassNode $class)
    method it_wraps_class_in_namespace_if_it_is_namespaced (line 484) | function it_wraps_class_in_namespace_if_it_is_namespaced(ClassNode $cl...
    method it_generates_read_only_class_if_parent_class_is_read_only (line 505) | function it_generates_read_only_class_if_parent_class_is_read_only(Cla...

FILE: spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php
  class ClassCreatorSpec (line 9) | class ClassCreatorSpec extends ObjectBehavior
    method let (line 11) | function let(ClassCodeGenerator $generator)
    method it_evaluates_code_generated_by_ClassCodeGenerator (line 16) | function it_evaluates_code_generated_by_ClassCodeGenerator($generator,...
    method it_throws_an_exception_if_class_does_not_exist_after_evaluation (line 25) | function it_throws_an_exception_if_class_does_not_exist_after_evaluati...

FILE: spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php
  class ArgumentNodeSpec (line 9) | class ArgumentNodeSpec extends ObjectBehavior
    method let (line 11) | function let()
    method it_is_not_be_passed_by_reference_by_default (line 16) | function it_is_not_be_passed_by_reference_by_default()
    method it_is_passed_by_reference_if_marked (line 21) | function it_is_passed_by_reference_if_marked()
    method it_is_not_variadic_by_default (line 27) | function it_is_not_variadic_by_default()
    method it_is_variadic_if_marked (line 32) | function it_is_variadic_if_marked()
    method it_does_not_have_default_by_default (line 38) | function it_does_not_have_default_by_default()
    method it_does_not_have_default_if_variadic (line 43) | function it_does_not_have_default_if_variadic()
    method it_does_have_default_if_not_variadic (line 50) | function it_does_have_default_if_not_variadic()
    method it_has_name_with_which_it_was_been_constructed (line 57) | function it_has_name_with_which_it_was_been_constructed()
    method it_has_no_typehint_by_default (line 62) | function it_has_no_typehint_by_default()
    method its_typeHint_is_mutable_with_deprecated_accessors (line 67) | function its_typeHint_is_mutable_with_deprecated_accessors()
    method it_can_set_nullable_type_using_deprecated_method (line 73) | function it_can_set_nullable_type_using_deprecated_method()
    method it_can_unset_nullable_type_using_deprecated_method (line 82) | function it_can_unset_nullable_type_using_deprecated_method()
    method it_has_an_empty_type_by_default (line 91) | function it_has_an_empty_type_by_default()
    method it_has_a_mutable_type (line 96) | function it_has_a_mutable_type()
    method it_does_not_have_default_value_by_default (line 103) | function it_does_not_have_default_value_by_default()
    method it_is_not_optional_by_default (line 108) | function it_is_not_optional_by_default()
    method its_default_is_mutable (line 113) | function its_default_is_mutable()
    method it_is_marked_as_optional_when_default_is_set (line 119) | function it_is_marked_as_optional_when_default_is_set()

FILE: spec/Prophecy/Doubler/Generator/Node/ArgumentTypeNodeSpec.php
  class ArgumentTypeNodeSpec (line 8) | class ArgumentTypeNodeSpec extends ObjectBehavior
    method it_has_no_types_at_start (line 10) | function it_has_no_types_at_start()
    method it_can_have_a_simple_type (line 15) | function it_can_have_a_simple_type()
    method it_can_have_multiple_types (line 22) | function it_can_have_multiple_types()
    method it_will_prefix_fcqns (line 29) | function it_will_prefix_fcqns()
    method it_will_not_prefix_fcqns_that_already_have_prefix (line 36) | function it_will_not_prefix_fcqns_that_already_have_prefix()
    method it_can_use_shorthand_null_syntax_if_it_has_single_type_plus_null (line 43) | function it_can_use_shorthand_null_syntax_if_it_has_single_type_plus_n...
    method it_can_not_use_shorthand_null_syntax_if_it_does_not_allow_null (line 50) | function it_can_not_use_shorthand_null_syntax_if_it_does_not_allow_null()
    method it_can_not_use_shorthand_null_syntax_if_it_has_more_than_one_non_null_type (line 57) | function it_can_not_use_shorthand_null_syntax_if_it_has_more_than_one_...
    method it_can_return_non_null_types (line 64) | function it_can_return_non_null_types()
    method it_does_not_allow_union_mixed (line 71) | function it_does_not_allow_union_mixed()
    method it_does_not_prefix_false (line 80) | function it_does_not_prefix_false()
    method it_allows_standalone_false (line 87) | function it_allows_standalone_false()
    method it_allows_standalone_null (line 100) | function it_allows_standalone_null()
    method it_allows_standalone_true (line 113) | function it_allows_standalone_true()
    method it_allows_nullable_false (line 126) | function it_allows_nullable_false()
    method it_allows_nullable_true (line 139) | function it_allows_nullable_true()
    method it_allows_union_with_false (line 152) | function it_allows_union_with_false()

FILE: spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php
  class ClassNodeSpec (line 9) | class ClassNodeSpec extends ObjectBehavior
    method its_parentClass_is_a_stdClass_by_default (line 11) | function its_parentClass_is_a_stdClass_by_default()
    method its_parentClass_is_mutable (line 16) | function its_parentClass_is_mutable()
    method its_parentClass_is_set_to_stdClass_if_user_set_null (line 22) | function its_parentClass_is_set_to_stdClass_if_user_set_null()
    method it_does_not_implement_any_interface_by_default (line 28) | function it_does_not_implement_any_interface_by_default()
    method its_addInterface_adds_item_to_the_list_of_implemented_interfaces (line 33) | function its_addInterface_adds_item_to_the_list_of_implemented_interfa...
    method its_hasInterface_returns_true_if_class_implements_interface (line 39) | function its_hasInterface_returns_true_if_class_implements_interface()
    method its_hasInterface_returns_false_if_class_does_not_implements_interface (line 45) | function its_hasInterface_returns_false_if_class_does_not_implements_i...
    method it_supports_implementation_of_multiple_interfaces (line 50) | function it_supports_implementation_of_multiple_interfaces()
    method it_ignores_same_interfaces_added_twice (line 57) | function it_ignores_same_interfaces_added_twice()
    method it_does_not_have_methods_by_default (line 66) | function it_does_not_have_methods_by_default()
    method it_can_has_methods (line 71) | function it_can_has_methods(MethodNode $method1, MethodNode $method2)
    method its_hasMethod_returns_true_if_method_exists (line 85) | function its_hasMethod_returns_true_if_method_exists(MethodNode $method)
    method its_getMethod_returns_method_by_name (line 94) | function its_getMethod_returns_method_by_name(MethodNode $method)
    method its_hasMethod_returns_false_if_method_does_not_exists (line 103) | function its_hasMethod_returns_false_if_method_does_not_exists()
    method its_hasMethod_returns_false_if_method_has_been_removed (line 108) | function its_hasMethod_returns_false_if_method_has_been_removed(Method...
    method it_does_not_have_properties_by_default (line 118) | function it_does_not_have_properties_by_default()
    method it_is_able_to_have_properties (line 123) | function it_is_able_to_have_properties()
    method its_addProperty_does_not_accept_unsupported_visibility (line 133) | function its_addProperty_does_not_accept_unsupported_visibility()
    method its_addProperty_lowercases_visibility_before_setting (line 138) | function its_addProperty_lowercases_visibility_before_setting()
    method its_has_no_unextendable_methods_by_default (line 144) | function its_has_no_unextendable_methods_by_default()
    method its_addUnextendableMethods_adds_an_unextendable_method (line 149) | function its_addUnextendableMethods_adds_an_unextendable_method()
    method its_methods_are_extendable_by_default (line 155) | function its_methods_are_extendable_by_default()
    method its_unextendable_methods_are_not_extendable (line 160) | function its_unextendable_methods_are_not_extendable()
    method its_addUnextendableMethods_doesnt_create_duplicates (line 166) | function its_addUnextendableMethods_doesnt_create_duplicates()
    method it_throws_an_exception_when_adding_a_method_that_isnt_extendable (line 173) | function it_throws_an_exception_when_adding_a_method_that_isnt_extenda...
    method it_is_non_read_only_by_default (line 186) | function it_is_non_read_only_by_default()
    method its_read_only_is_mutable (line 191) | function its_read_only_is_mutable()

FILE: spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php
  class MethodNodeSpec (line 10) | class MethodNodeSpec extends ObjectBehavior
    method let (line 12) | function let()
    method it_has_a_name (line 17) | function it_has_a_name()
    method it_has_public_visibility_by_default (line 22) | function it_has_public_visibility_by_default()
    method its_visibility_is_mutable (line 27) | function its_visibility_is_mutable()
    method it_is_not_static_by_default (line 33) | function it_is_not_static_by_default()
    method it_does_not_return_a_reference_by_default (line 38) | function it_does_not_return_a_reference_by_default()
    method it_should_be_settable_as_returning_a_reference_through_setter (line 43) | function it_should_be_settable_as_returning_a_reference_through_setter()
    method it_should_be_settable_as_static_through_setter (line 49) | function it_should_be_settable_as_static_through_setter()
    method it_accepts_only_supported_visibilities (line 55) | function it_accepts_only_supported_visibilities()
    method it_lowercases_visibility_before_setting_it (line 60) | function it_lowercases_visibility_before_setting_it()
    method its_useParentCode_causes_method_to_call_parent (line 66) | function its_useParentCode_causes_method_to_call_parent(ArgumentNode $...
    method its_code_is_mutable (line 84) | function its_code_is_mutable()
    method its_reference_returning_methods_will_generate_exceptions (line 90) | function its_reference_returning_methods_will_generate_exceptions()
    method its_setCode_provided_with_null_cleans_method_body (line 97) | function its_setCode_provided_with_null_cleans_method_body()
    method it_is_constructable_with_code (line 103) | function it_is_constructable_with_code()
    method it_does_not_have_arguments_by_default (line 109) | function it_does_not_have_arguments_by_default()
    method it_supports_adding_arguments (line 114) | function it_supports_adding_arguments(ArgumentNode $argument1, Argumen...
    method it_has_an_empty_return_type_by_default (line 122) | function it_has_an_empty_return_type_by_default()
    method it_can_modify_return_type (line 127) | function it_can_modify_return_type()
    method it_can_modify_return_type_as_strings_using_deprecated_methods (line 134) | function it_can_modify_return_type_as_strings_using_deprecated_methods()
    method it_can_set_nullable_type_using_deprecated_method (line 142) | function it_can_set_nullable_type_using_deprecated_method()
    method it_can_unset_nullable_type_using_deprecated_method (line 151) | function it_can_unset_nullable_type_using_deprecated_method()

FILE: spec/Prophecy/Doubler/Generator/Node/ReturnTypeNodeSpec.php
  class ReturnTypeNodeSpec (line 8) | class ReturnTypeNodeSpec extends ObjectBehavior
    method it_has_no_return_types_at_start (line 10) | function it_has_no_return_types_at_start()
    method it_can_have_a_simple_type (line 15) | function it_can_have_a_simple_type()
    method it_can_have_multiple_types (line 22) | function it_can_have_multiple_types()
    method it_can_have_void_type (line 29) | function it_can_have_void_type()
    method it_will_normalise_type_aliases_types (line 36) | function it_will_normalise_type_aliases_types()
    method it_will_prefix_fcqns (line 42) | function it_will_prefix_fcqns()
    method it_will_not_prefix_fcqns_that_already_have_prefix (line 49) | function it_will_not_prefix_fcqns_that_already_have_prefix()
    method it_can_use_shorthand_null_syntax_if_it_has_single_type_plus_null (line 56) | function it_can_use_shorthand_null_syntax_if_it_has_single_type_plus_n...
    method it_can_not_use_shorthand_null_syntax_if_it_does_not_allow_null (line 63) | function it_can_not_use_shorthand_null_syntax_if_it_does_not_allow_null()
    method it_can_not_use_shorthand_null_syntax_if_it_has_more_than_one_non_null_type (line 70) | function it_can_not_use_shorthand_null_syntax_if_it_has_more_than_one_...
    method it_can_return_non_null_types (line 77) | function it_can_return_non_null_types()
    method it_does_not_allow_union_void (line 84) | function it_does_not_allow_union_void()
    method it_does_not_allow_union_mixed (line 91) | function it_does_not_allow_union_mixed()
    method it_does_not_prefix_false (line 100) | function it_does_not_prefix_false()
    method it_allows_standalone_false (line 107) | function it_allows_standalone_false()
    method it_allows_standalone_null (line 120) | function it_allows_standalone_null()
    method it_allows_standalone_true (line 133) | function it_allows_standalone_true()
    method it_allows_nullable_false (line 146) | function it_allows_nullable_false()
    method it_allows_nullable_true (line 159) | function it_allows_nullable_true()
    method it_allows_union_with_false (line 172) | function it_allows_union_with_false()
    method it_does_not_prefix_never (line 181) | function it_does_not_prefix_never()
    method it_does_not_allow_union_never (line 188) | function it_does_not_allow_union_never()
    method it_has_a_return_statement_if_it_is_a_simple_type (line 195) | function it_has_a_return_statement_if_it_is_a_simple_type()
    method it_does_not_have_return_statement_if_it_returns_void (line 202) | function it_does_not_have_return_statement_if_it_returns_void()
    method it_does_not_have_return_statement_if_it_returns_never (line 209) | function it_does_not_have_return_statement_if_it_returns_never()

FILE: spec/Prophecy/Doubler/Generator/Node/Type/BuiltinTypeSpec.php
  class BuiltinTypeSpec (line 8) | class BuiltinTypeSpec extends ObjectBehavior
    method let (line 10) | function let(): void
    method it_implements_type_interface (line 15) | function it_implements_type_interface(): void
    method it_is_stringable (line 20) | function it_is_stringable(): void

FILE: spec/Prophecy/Doubler/Generator/Node/Type/IntersectionTypeSpec.php
  class IntersectionTypeSpec (line 12) | class IntersectionTypeSpec extends ObjectBehavior
    method let (line 14) | function let(): void
    method it_should_implement_type_union (line 22) | function it_should_implement_type_union(): void
    method it_should_throw_double_exception_for_builtin_types (line 27) | function it_should_throw_double_exception_for_builtin_types()
    method it_should_throw_double_exception_if_less_than_2_types_provided (line 36) | function it_should_throw_double_exception_if_less_than_2_types_provided()
    method it_should_throw_double_exception_if_union_type_given (line 44) | function it_should_throw_double_exception_if_union_type_given(): void
    method it_is_stringable (line 53) | function it_is_stringable(): void

FILE: spec/Prophecy/Doubler/Generator/Node/Type/ObjectTypeSpec.php
  class ObjectTypeSpec (line 9) | class ObjectTypeSpec extends ObjectBehavior
    method let (line 11) | function let(): void
    method it_implements_type_interface (line 16) | function it_implements_type_interface(): void
    method it_is_stringable (line 21) | function it_is_stringable(): void

FILE: spec/Prophecy/Doubler/Generator/Node/Type/UnionTypeSpec.php
  class UnionTypeSpec (line 13) | class UnionTypeSpec extends ObjectBehavior
    method let (line 15) | function let(): void
    method it_implements_type_interface (line 22) | function it_implements_type_interface(): void
    method it_throws_double_exception_when_union_type_given (line 27) | function it_throws_double_exception_when_union_type_given(): void
    method it_throws_double_exception_when_types_duplicated (line 36) | function it_throws_double_exception_when_types_duplicated(): void
    method it_throws_double_exception_when_union_with_void (line 42) | function it_throws_double_exception_when_union_with_void(): void
    method it_throws_double_exception_when_union_with_never (line 48) | function it_throws_double_exception_when_union_with_never(): void
    method it_throws_double_exception_when_union_with_mixed (line 54) | function it_throws_double_exception_when_union_with_mixed(): void
    method it_throws_double_exception_when_union_with_only_one_type (line 60) | function it_throws_double_exception_when_union_with_only_one_type(): void
    method it_return_array_of_its_types (line 66) | function it_return_array_of_its_types(): void
    method it_should_accept_simple_type_and_intersection (line 74) | function it_should_accept_simple_type_and_intersection()
    method it_is_stringable (line 84) | function it_is_stringable(): void

FILE: spec/Prophecy/Doubler/LazyDoubleSpec.php
  class LazyDoubleSpec (line 9) | class LazyDoubleSpec extends ObjectBehavior
    method let (line 11) | function let(Doubler $doubler)
    method it_returns_anonymous_double_instance_by_default (line 16) | function it_returns_anonymous_double_instance_by_default($doubler, Pro...
    method it_returns_class_double_instance_if_set (line 23) | function it_returns_class_double_instance_if_set($doubler, ProphecySub...
    method it_returns_same_double_instance_if_called_2_times (line 32) | function it_returns_same_double_instance_if_called_2_times(
    method its_setParentClass_throws_ClassNotFoundException_if_class_not_found (line 44) | function its_setParentClass_throws_ClassNotFoundException_if_class_not...
    method its_setParentClass_throws_exception_if_prophecy_is_already_created (line 50) | function its_setParentClass_throws_exception_if_prophecy_is_already_cr...
    method its_addInterface_throws_InterfaceNotFoundException_if_no_interface_found (line 62) | function its_addInterface_throws_InterfaceNotFoundException_if_no_inte...
    method its_addInterface_throws_exception_if_prophecy_is_already_created (line 68) | function its_addInterface_throws_exception_if_prophecy_is_already_crea...

FILE: spec/Prophecy/Doubler/NameGeneratorSpec.php
  class NameGeneratorSpec (line 7) | class NameGeneratorSpec extends ObjectBehavior
    method its_name_generates_name_based_on_simple_class_reflection (line 9) | function its_name_generates_name_based_on_simple_class_reflection(\Ref...
    method its_name_generates_name_based_on_namespaced_class_reflection (line 15) | function its_name_generates_name_based_on_namespaced_class_reflection(...
    method its_name_generates_name_based_on_interface_shortnames (line 21) | function its_name_generates_name_based_on_interface_shortnames(
    method it_generates_proper_name_for_no_class_and_interfaces_list (line 33) | function it_generates_proper_name_for_no_class_and_interfaces_list()
    method its_name_generates_name_based_only_on_class_if_its_available (line 38) | function its_name_generates_name_based_only_on_class_if_its_available(
    method getMatchers (line 52) | public function getMatchers(): array

FILE: spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php
  class UnexpectedCallExceptionSpec (line 8) | class UnexpectedCallExceptionSpec extends ObjectBehavior
    method let (line 10) | function let(ObjectProphecy $objectProphecy)
    method it_is_prophecy_exception (line 15) | function it_is_prophecy_exception()
    method it_exposes_method_name_through_getter (line 20) | function it_exposes_method_name_through_getter()
    method it_exposes_arguments_through_getter (line 25) | function it_exposes_arguments_through_getter()

FILE: spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php
  class ClassCreatorExceptionSpec (line 8) | class ClassCreatorExceptionSpec extends ObjectBehavior
    method let (line 10) | function let(ClassNode $node)
    method it_is_a_prophecy_exception (line 15) | function it_is_a_prophecy_exception()
    method it_contains_a_reflected_node (line 21) | function it_contains_a_reflected_node($node)

FILE: spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php
  class ClassMirrorExceptionSpec (line 7) | class ClassMirrorExceptionSpec extends ObjectBehavior
    method let (line 9) | function let(\ReflectionClass $class)
    method it_is_a_prophecy_exception (line 14) | function it_is_a_prophecy_exception()
    method it_contains_a_reflected_class_link (line 20) | function it_contains_a_reflected_class_link($class)

FILE: spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php
  class ClassNotFoundExceptionSpec (line 7) | class ClassNotFoundExceptionSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_is_a_prophecy_exception (line 14) | function it_is_a_prophecy_exception()
    method its_getClassname_returns_classname (line 20) | function its_getClassname_returns_classname()

FILE: spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php
  class DoubleExceptionSpec (line 7) | class DoubleExceptionSpec extends ObjectBehavior
    method it_is_a_double_exception (line 9) | function it_is_a_double_exception()

FILE: spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php
  class InterfaceNotFoundExceptionSpec (line 7) | class InterfaceNotFoundExceptionSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_extends_ClassNotFoundException (line 14) | function it_extends_ClassNotFoundException()
    method its_getClassname_returns_classname (line 19) | function its_getClassname_returns_classname()

FILE: spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php
  class MethodNotExtendableExceptionSpec (line 7) | class MethodNotExtendableExceptionSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_is_DoubleException (line 14) | function it_is_DoubleException()
    method it_has_MethodName (line 19) | function it_has_MethodName()
    method it_has_classname (line 24) | function it_has_classname()

FILE: spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php
  class MethodNotFoundExceptionSpec (line 7) | class MethodNotFoundExceptionSpec extends ObjectBehavior
    method let (line 9) | function let()
    method it_is_DoubleException (line 14) | function it_is_DoubleException()
    method it_has_MethodName (line 19) | function it_has_MethodName()
    method it_has_classnamej (line 24) | function it_has_classnamej()
    method it_has_an_arguments_list (line 29) | function it_has_an_arguments_list()
    method it_has_a_default_null_argument_list (line 34) | function it_has_a_default_null_argument_list()

FILE: spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php
  class AggregateExceptionSpec (line 10) | class AggregateExceptionSpec extends ObjectBehavior
    method let (line 12) | function let()
    method it_is_prediction_exception (line 17) | function it_is_prediction_exception()
    method it_can_store_objectProphecy_link (line 23) | function it_can_store_objectProphecy_link(ObjectProphecy $object)
    method it_should_not_have_exceptions_at_the_beginning (line 29) | function it_should_not_have_exceptions_at_the_beginning()
    method it_should_append_exception_through_append_method (line 34) | function it_should_append_exception_through_append_method()
    method it_should_update_message_during_append (line 43) | function it_should_update_message_during_append()
    method it_should_update_message_during_append_more_exceptions (line 52) | function it_should_update_message_during_append_more_exceptions(

FILE: spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php
  class NoCallsExceptionSpec (line 9) | class NoCallsExceptionSpec extends ObjectBehavior
    method let (line 11) | function let(ObjectProphecy $objectProphecy, MethodProphecy $methodPro...
    method it_is_PredictionException (line 18) | function it_is_PredictionException()
    method it_extends_MethodProphecyException (line 23) | function it_extends_MethodProphecyException()

FILE: spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php
  class UnexpectedCallsCountExceptionSpec (line 10) | class UnexpectedCallsCountExceptionSpec extends ObjectBehavior
    method let (line 12) | function let(ObjectProphecy $objectProphecy, MethodProphecy $methodPro...
    method it_extends_UnexpectedCallsException (line 19) | function it_extends_UnexpectedCallsException()
    method it_should_expose_expectedCount_through_getter (line 24) | function it_should_expose_expectedCount_through_getter()

FILE: spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php
  class UnexpectedCallsExceptionSpec (line 10) | class UnexpectedCallsExceptionSpec extends ObjectBehavior
    method let (line 12) | function let(ObjectProphecy $objectProphecy, MethodProphecy $methodPro...
    method it_is_PredictionException (line 19) | function it_is_PredictionException()
    method it_extends_MethodProphecyException (line 24) | function it_extends_MethodProphecyException()
    method it_should_expose_calls_list_through_getter (line 29) | function it_should_expose_calls_list_through_getter($call1, $call2)

FILE: spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php
  class MethodProphecyExceptionSpec (line 9) | class MethodProphecyExceptionSpec extends ObjectBehavior
    method let (line 11) | function let(ObjectProphecy $objectProphecy, MethodProphecy $methodPro...
    method it_extends_DoubleException (line 18) | function it_extends_DoubleException()
    method it_holds_a_stub_reference (line 23) | function it_holds_a_stub_reference($methodProphecy)

FILE: spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php
  class ObjectProphecyExceptionSpec (line 8) | class ObjectProphecyExceptionSpec extends ObjectBehavior
    method let (line 10) | function let(ObjectProphecy $objectProphecy)
    method it_should_be_a_prophecy_exception (line 15) | function it_should_be_a_prophecy_exception()
    method it_holds_double_reference (line 20) | function it_holds_double_reference($objectProphecy)

FILE: spec/Prophecy/Prediction/CallPredictionSpec.php
  class CallPredictionSpec (line 12) | class CallPredictionSpec extends ObjectBehavior
    method it_is_prediction (line 14) | function it_is_prediction()
    method it_does_nothing_if_there_is_more_than_one_call_been_made (line 19) | function it_does_nothing_if_there_is_more_than_one_call_been_made(
    method it_throws_NoCallsException_if_no_calls_found (line 27) | function it_throws_NoCallsException_if_no_calls_found(

FILE: spec/Prophecy/Prediction/CallTimesPredictionSpec.php
  class CallTimesPredictionSpec (line 12) | class CallTimesPredictionSpec extends ObjectBehavior
    method let (line 14) | function let()
    method it_is_prediction (line 19) | function it_is_prediction()
    method it_does_nothing_if_there_were_exact_amount_of_calls_being_made (line 24) | function it_does_nothing_if_there_were_exact_amount_of_calls_being_made(
    method it_throws_UnexpectedCallsCountException_if_calls_found (line 33) | function it_throws_UnexpectedCallsCountException_if_calls_found(

FILE: spec/Prophecy/Prediction/CallbackPredictionSpec.php
  class CallbackPredictionSpec (line 11) | class CallbackPredictionSpec extends ObjectBehavior
    method let (line 13) | function let()
    method it_is_prediction (line 18) | function it_is_prediction()
    method it_proxies_call_to_callback (line 23) | function it_proxies_call_to_callback(ObjectProphecy $object, MethodPro...

FILE: spec/Prophecy/Prediction/NoCallsPredictionSpec.php
  class NoCallsPredictionSpec (line 11) | class NoCallsPredictionSpec extends ObjectBehavior
    method it_is_prediction (line 13) | function it_is_prediction()
    method it_does_nothing_if_there_is_no_calls_made (line 18) | function it_does_nothing_if_there_is_no_calls_made(ObjectProphecy $obj...
    method it_throws_UnexpectedCallsException_if_calls_found (line 23) | function it_throws_UnexpectedCallsException_if_calls_found(

FILE: spec/Prophecy/Promise/CallbackPromiseSpec.php
  class CallbackPromiseSpec (line 9) | class CallbackPromiseSpec extends ObjectBehavior
    method let (line 11) | function let()
    method it_is_promise (line 16) | function it_is_promise()
    method it_should_execute_closure_callback (line 21) | function it_should_execute_closure_callback(ObjectProphecy $object, Me...
    method it_should_execute_static_array_callback (line 32) | function it_should_execute_static_array_callback(ObjectProphecy $objec...
    method it_should_execute_instance_array_callback (line 41) | function it_should_execute_instance_array_callback(ObjectProphecy $obj...
    method it_should_execute_string_function_callback (line 51) | function it_should_execute_string_function_callback(ObjectProphecy $ob...
  class ClassCallback (line 68) | class ClassCallback
    method callbackMethod (line 73) | function callbackMethod($args)
    method staticCallbackMethod (line 81) | static function staticCallbackMethod($args)
  function functionCallbackFirstArgument (line 93) | function functionCallbackFirstArgument($args)

FILE: spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php
  class ReturnArgumentPromiseSpec (line 9) | class ReturnArgumentPromiseSpec extends ObjectBehavior
    method it_is_promise (line 11) | function it_is_promise()
    method it_should_return_first_argument_if_provided (line 16) | function it_should_return_first_argument_if_provided(ObjectProphecy $o...
    method it_should_return_null_if_no_arguments_provided (line 21) | function it_should_return_null_if_no_arguments_provided(ObjectProphecy...
    method it_should_return_nth_argument_if_provided (line 26) | function it_should_return_nth_argument_if_provided(ObjectProphecy $obj...

FILE: spec/Prophecy/Promise/ReturnPromiseSpec.php
  class ReturnPromiseSpec (line 9) | class ReturnPromiseSpec extends ObjectBehavior
    method let (line 11) | function let()
    method it_is_promise (line 16) | function it_is_promise()
    method it_returns_value_it_was_constructed_with (line 21) | function it_returns_value_it_was_constructed_with(ObjectProphecy $obje...
    method it_always_returns_last_value_left_in_the_return_values (line 26) | function it_always_returns_last_value_left_in_the_return_values(Object...
    method it_consequently_returns_multiple_values_it_was_constructed_with (line 32) | function it_consequently_returns_multiple_values_it_was_constructed_with(
    method it_returns_null_if_constructed_with_empty_array (line 43) | function it_returns_null_if_constructed_with_empty_array(ObjectProphec...

FILE: spec/Prophecy/Promise/ThrowPromiseSpec.php
  class ThrowPromiseSpec (line 10) | class ThrowPromiseSpec extends ObjectBehavior
    method let (line 12) | function let()
    method it_is_promise (line 17) | function it_is_promise()
    method it_instantiates_and_throws_exception_from_provided_classname (line 22) | function it_instantiates_and_throws_exception_from_provided_classname(...
    method it_instantiates_exceptions_with_required_arguments (line 30) | function it_instantiates_exceptions_with_required_arguments(ObjectProp...
    method it_throws_provided_exception (line 38) | function it_throws_provided_exception(ObjectProphecy $object, MethodPr...
    method it_throws_error_instances (line 45) | function it_throws_error_instances(ObjectProphecy $object, MethodProph...
    method it_throws_errors_by_class_name (line 56) | function it_throws_errors_by_class_name()
    method it_does_not_throw_something_that_is_not_throwable_by_class_name (line 67) | function it_does_not_throw_something_that_is_not_throwable_by_class_na...
    method it_does_not_throw_something_that_is_not_throwable_by_instance (line 74) | function it_does_not_throw_something_that_is_not_throwable_by_instance()
    method it_throws_an_exception_by_class_name (line 81) | function it_throws_an_exception_by_class_name()
    method it_throws_an_extension_of_throwable_by_class_name (line 88) | function it_throws_an_extension_of_throwable_by_class_name()
    method it_throws_a_throwable_by_class_name (line 99) | function it_throws_a_throwable_by_class_name()
  class RequiredArgumentException (line 111) | class RequiredArgumentException extends \Exception
    method __construct (line 113) | final public function __construct($message, $code) {}

FILE: spec/Prophecy/Prophecy/MethodProphecySpec.php
  class MethodProphecySpec (line 17) | class MethodProphecySpec extends ObjectBehavior
    method let (line 19) | function let(ObjectProphecy $objectProphecy, ReflectionClass $reflecti...
    method it_is_initializable (line 30) | function it_is_initializable()
    method its_constructor_throws_MethodNotFoundException_for_unexisting_method (line 35) | function its_constructor_throws_MethodNotFoundException_for_unexisting...
    method its_constructor_throws_MethodProphecyException_for_final_methods (line 47) | function its_constructor_throws_MethodProphecyException_for_final_meth...
    method its_constructor_transforms_array_passed_as_3rd_argument_to_ArgumentsWildcard (line 60) | function its_constructor_transforms_array_passed_as_3rd_argument_to_Ar...
    method its_constructor_records_default_callback_promise_for_return_type_hinted_methods (line 69) | function its_constructor_records_default_callback_promise_for_return_t...
    method its_constructor_records_promise_that_returns_null_for_void_type_hinted_methods (line 82) | function its_constructor_records_promise_that_returns_null_for_void_ty...
    method its_constructor_adds_itself_to_ObjectProphecy_for_return_type_hinted_methods (line 95) | function its_constructor_adds_itself_to_ObjectProphecy_for_return_type...
    method it_records_promise_through_will_method (line 108) | function it_records_promise_through_will_method(PromiseInterface $prom...
    method it_adds_itself_to_ObjectProphecy_during_call_to_will (line 116) | function it_adds_itself_to_ObjectProphecy_during_call_to_will(
    method it_adds_ReturnPromise_during_willReturn_call (line 125) | function it_adds_ReturnPromise_during_willReturn_call(ObjectProphecy $...
    method it_adds_CallbackPromise_during_willYield_call (line 133) | function it_adds_CallbackPromise_during_willYield_call(ObjectProphecy ...
    method it_yields_elements_configured_in_willYield (line 141) | function it_yields_elements_configured_in_willYield(ObjectProphecy $ob...
    method it_yields_key_value_pairs_configured_in_willYield (line 149) | function it_yields_key_value_pairs_configured_in_willYield(ObjectProph...
    method it_yields_and_return_elements_configured_in_willYield (line 157) | function it_yields_and_return_elements_configured_in_willYield(ObjectP...
    method it_adds_ThrowPromise_during_willThrow_call (line 167) | function it_adds_ThrowPromise_during_willThrow_call(ObjectProphecy $ob...
    method it_adds_ReturnArgumentPromise_during_willReturnArgument_call (line 175) | function it_adds_ReturnArgumentPromise_during_willReturnArgument_call(...
    method it_adds_ReturnArgumentPromise_during_willReturnArgument_call_with_index_argument (line 183) | function it_adds_ReturnArgumentPromise_during_willReturnArgument_call_...
    method it_adds_CallbackPromise_during_will_call_with_callback_argument (line 194) | function it_adds_CallbackPromise_during_will_call_with_callback_argume...
    method it_records_prediction_through_should_method (line 204) | function it_records_prediction_through_should_method(
    method it_adds_CallbackPrediction_during_should_call_with_callback_argument (line 214) | function it_adds_CallbackPrediction_during_should_call_with_callback_a...
    method it_adds_itself_to_ObjectProphecy_during_call_to_should (line 224) | function it_adds_itself_to_ObjectProphecy_during_call_to_should(
    method it_adds_CallPrediction_during_shouldBeCalled_call (line 233) | function it_adds_CallPrediction_during_shouldBeCalled_call($objectProp...
    method it_adds_NoCallsPrediction_during_shouldNotBeCalled_call (line 241) | function it_adds_NoCallsPrediction_during_shouldNotBeCalled_call(Objec...
    method it_adds_CallTimesPrediction_during_shouldBeCalledTimes_call (line 249) | function it_adds_CallTimesPrediction_during_shouldBeCalledTimes_call(O...
    method it_adds_CallTimesPrediction_during_shouldBeCalledOnce_call (line 257) | function it_adds_CallTimesPrediction_during_shouldBeCalledOnce_call(Ob...
    method it_checks_prediction_via_shouldHave_method_call (line 265) | function it_checks_prediction_via_shouldHave_method_call(
    method it_sets_return_promise_during_shouldHave_call_if_none_was_set_before (line 280) | function it_sets_return_promise_during_shouldHave_call_if_none_was_set...
    method it_does_not_set_return_promise_during_shouldHave_call_if_it_was_set_before (line 301) | function it_does_not_set_return_promise_during_shouldHave_call_if_it_w...
    method it_records_checked_predictions (line 320) | function it_records_checked_predictions(
    method it_records_even_failed_checked_predictions (line 342) | function it_records_even_failed_checked_predictions(
    method it_checks_prediction_via_shouldHave_method_call_with_callback (line 365) | function it_checks_prediction_via_shouldHave_method_call_with_callback(
    method it_does_nothing_during_checkPrediction_if_no_prediction_set (line 381) | function it_does_nothing_during_checkPrediction_if_no_prediction_set()
    method it_checks_set_prediction_during_checkPrediction (line 386) | function it_checks_set_prediction_during_checkPrediction(
    method it_links_back_to_ObjectProphecy_through_getter (line 402) | function it_links_back_to_ObjectProphecy_through_getter(ObjectProphecy...
    method it_has_MethodName (line 407) | function it_has_MethodName()
    method it_contains_ArgumentsWildcard_it_was_constructed_with (line 412) | function it_contains_ArgumentsWildcard_it_was_constructed_with(
    method its_ArgumentWildcard_is_mutable_through_setter (line 421) | function its_ArgumentWildcard_is_mutable_through_setter(ArgumentsWildc...
    method its_withArguments_transforms_passed_array_into_ArgumentsWildcard (line 428) | function its_withArguments_transforms_passed_array_into_ArgumentsWildc...
    method its_withArguments_throws_exception_if_wrong_arguments_provided (line 437) | function its_withArguments_throws_exception_if_wrong_arguments_provided()
    method it_returns_null_for_void_return_type (line 442) | function it_returns_null_for_void_return_type(ObjectProphecy $objectPr...
    method it_returns_empty_string_for_string_return_type (line 450) | function it_returns_empty_string_for_string_return_type(ObjectProphecy...
    method it_returns_zero_for_float_return_type (line 458) | function it_returns_zero_for_float_return_type(ObjectProphecy $objectP...
    method it_returns_false_for_bool_return_type (line 466) | function it_returns_false_for_bool_return_type(ObjectProphecy $objectP...
    method it_returns_empty_for_array_return_type (line 474) | function it_returns_empty_for_array_return_type(ObjectProphecy $object...
    method it_returns_empty_closure_for_callable_return_type (line 482) | function it_returns_empty_closure_for_callable_return_type(ObjectProph...
    method it_returns_empty_closure_for_closure_return_type (line 490) | function it_returns_empty_closure_for_closure_return_type(ObjectProphe...
    method it_returns_null_generator_for_traversable_return_type (line 498) | function it_returns_null_generator_for_traversable_return_type(ObjectP...
    method it_returns_null_generator_for_generator_return_type (line 506) | function it_returns_null_generator_for_generator_return_type(ObjectPro...
    method it_returns_an_object_prophecy_for_other_object_return_types (line 514) | function it_returns_an_object_prophecy_for_other_object_return_types(O...
    method it_returns_object_prophecy_for_nullable_return_type (line 524) | function it_returns_object_prophecy_for_nullable_return_type(ObjectPro...
    method it_returns_scalar_prophecy_for_scalar_and_null_union (line 534) | function it_returns_scalar_prophecy_for_scalar_and_null_union(ObjectPr...
    method it_returns_object_prophecy_for_object_scalar_union (line 546) | function it_returns_object_prophecy_for_object_scalar_union(ObjectProp...
    method it_returns_object_prophecy_for_object_return_type (line 560) | function it_returns_object_prophecy_for_object_return_type(ObjectProph...
    method it_throws_for_non_existent_class_return_type (line 569) | function it_throws_for_non_existent_class_return_type(ObjectProphecy $...
    method it_returns_true_prophecy_for_true_return_type (line 577) | function it_returns_true_prophecy_for_true_return_type(ObjectProphecy ...
    method it_returns_false_prophecy_for_false_return_type (line 589) | function it_returns_false_prophecy_for_false_return_type(ObjectProphec...
    method it_returns_null_prophecy_for_null_return_type (line 601) | function it_returns_null_prophecy_for_null_return_type(ObjectProphecy ...
    method generateMethodProphecyWithReturnValue (line 613) | private function generateMethodProphecyWithReturnValue($objectProphecy...
  class ClassWithFinalMethod (line 630) | class ClassWithFinalMethod
    method finalMethod (line 632) | final public function finalMethod() {}
  class ClassWithVoidTypeHintedMethods (line 635) | class ClassWithVoidTypeHintedMethods
    method getVoid (line 637) | public function getVoid(): void {}

FILE: spec/Prophecy/Prophecy/ObjectProphecySpec.php
  class ObjectProphecySpec (line 16) | class ObjectProphecySpec extends ObjectBehavior
    method let (line 18) | function let(LazyDouble $lazyDouble, ProphecySubjectInterface $double)
    method it_implements_ProphecyInterface (line 25) | function it_implements_ProphecyInterface()
    method it_sets_parentClass_during_willExtend_call (line 30) | function it_sets_parentClass_during_willExtend_call($lazyDouble)
    method it_adds_interface_during_willImplement_call (line 37) | function it_adds_interface_during_willImplement_call($lazyDouble)
    method it_sets_constructor_arguments_during_willBeConstructedWith_call (line 44) | function it_sets_constructor_arguments_during_willBeConstructedWith_ca...
    method it_does_not_have_method_prophecies_by_default (line 51) | function it_does_not_have_method_prophecies_by_default()
    method it_should_get_method_prophecies_by_method_name (line 56) | function it_should_get_method_prophecies_by_method_name(
    method it_should_return_empty_array_if_no_method_prophecies_found (line 74) | function it_should_return_empty_array_if_no_method_prophecies_found()
    method it_should_proxy_makeProphecyMethodCall_to_CallCenter (line 80) | function it_should_proxy_makeProphecyMethodCall_to_CallCenter($lazyDou...
    method it_should_reveal_arguments_and_return_values_from_callCenter (line 89) | function it_should_reveal_arguments_and_return_values_from_callCenter(
    method it_should_proxy_getProphecyMethodCalls_to_CallCenter (line 104) | function it_should_proxy_getProphecyMethodCalls_to_CallCenter(
    method its_addMethodProphecy_adds_method_prophecy (line 117) | function its_addMethodProphecy_adds_method_prophecy(
    method its_addMethodProphecy_handles_prophecies_with_different_arguments (line 131) | function its_addMethodProphecy_handles_prophecies_with_different_argum...
    method its_addMethodProphecy_handles_prophecies_for_caseinsensitive_method_names (line 154) | function its_addMethodProphecy_handles_prophecies_for_caseinsensitive_...
    method its_addMethodProphecy_handles_prophecies_for_different_methods (line 177) | function its_addMethodProphecy_handles_prophecies_for_different_methods(
    method it_returns_null_after_checkPredictions_call_if_there_is_no_method_prophecies (line 202) | function it_returns_null_after_checkPredictions_call_if_there_is_no_me...
    method it_throws_AggregateException_during_checkPredictions_if_predictions_fail (line 207) | function it_throws_AggregateException_during_checkPredictions_if_predi...
    method it_returns_new_MethodProphecy_instance_for_arbitrary_call (line 229) | function it_returns_new_MethodProphecy_instance_for_arbitrary_call(
    method it_returns_same_MethodProphecy_for_same_registered_signature (line 240) | function it_returns_same_MethodProphecy_for_same_registered_signature(
    method it_returns_new_MethodProphecy_for_different_signatures (line 252) | function it_returns_new_MethodProphecy_for_different_signatures(
    method it_returns_new_MethodProphecy_for_all_callback_signatures (line 267) | function it_returns_new_MethodProphecy_for_all_callback_signatures(
    method it_throws_UnexpectedCallException_during_checkPredictions_if_unexpected_method_was_called (line 279) | function it_throws_UnexpectedCallException_during_checkPredictions_if_...
  class ObjectProphecySpecFixtureA (line 291) | class ObjectProphecySpecFixtureA
  class ObjectProphecySpecFixtureB (line 296) | class ObjectProphecySpecFixtureB extends ObjectProphecySpecFixtureA
    method __construct (line 301) | public function __construct($value)

FILE: spec/Prophecy/Prophecy/RevealerSpec.php
  class RevealerSpec (line 8) | class RevealerSpec extends ObjectBehavior
    method it_is_revealer (line 10) | function it_is_revealer()
    method it_reveals_single_instance_of_ProphecyInterface (line 15) | function it_reveals_single_instance_of_ProphecyInterface(ProphecyInter...
    method it_reveals_instances_of_ProphecyInterface_inside_array (line 22) | function it_reveals_instances_of_ProphecyInterface_inside_array(
    method it_does_not_touch_non_prophecy_interface (line 40) | function it_does_not_touch_non_prophecy_interface()

FILE: spec/Prophecy/ProphetSpec.php
  class ProphetSpec (line 12) | class ProphetSpec extends ObjectBehavior
    method let (line 14) | function let(Doubler $doubler, ProphecySubjectInterface $double)
    method it_constructs_new_prophecy_on_prophesize_call (line 21) | function it_constructs_new_prophecy_on_prophesize_call()
    method it_constructs_new_prophecy_with_parent_class_if_specified (line 27) | function it_constructs_new_prophecy_with_parent_class_if_specified($do...
    method it_constructs_new_prophecy_with_interface_if_specified (line 34) | function it_constructs_new_prophecy_with_interface_if_specified($doubl...
    method it_exposes_all_created_prophecies_through_getter (line 41) | function it_exposes_all_created_prophecies_through_getter()
    method it_does_nothing_during_checkPredictions_call_if_no_predictions_defined (line 49) | function it_does_nothing_during_checkPredictions_call_if_no_prediction...
    method it_throws_AggregateException_if_defined_predictions_fail (line 54) | function it_throws_AggregateException_if_defined_predictions_fail(
    method it_exposes_doubler_through_getter (line 77) | function it_exposes_doubler_through_getter($doubler)
    method it_throws_ClassNotFound_if_class_to_prophesize_does_not_exist (line 82) | function it_throws_ClassNotFound_if_class_to_prophesize_does_not_exist()
    method it_does_not_throw_when_creating_void_mock (line 89) | function it_does_not_throw_when_creating_void_mock()

FILE: spec/Prophecy/Util/StringUtilSpec.php
  class StringUtilSpec (line 7) | class StringUtilSpec extends ObjectBehavior
    method it_generates_proper_string_representation_for_integer (line 9) | function it_generates_proper_string_representation_for_integer()
    method it_generates_proper_string_representation_for_string (line 14) | function it_generates_proper_string_representation_for_string()
    method it_generates_single_line_representation_for_multiline_string (line 19) | function it_generates_single_line_representation_for_multiline_string()
    method it_generates_proper_string_representation_for_double (line 24) | function it_generates_proper_string_representation_for_double()
    method it_generates_proper_string_representation_for_boolean_true (line 29) | function it_generates_proper_string_representation_for_boolean_true()
    method it_generates_proper_string_representation_for_boolean_false (line 34) | function it_generates_proper_string_representation_for_boolean_false()
    method it_generates_proper_string_representation_for_null (line 39) | function it_generates_proper_string_representation_for_null()
    method it_generates_proper_string_representation_for_empty_array (line 44) | function it_generates_proper_string_representation_for_empty_array()
    method it_generates_proper_string_representation_for_array (line 49) | function it_generates_proper_string_representation_for_array()
    method it_generates_proper_string_representation_for_hash_containing_one_value (line 54) | function it_generates_proper_string_representation_for_hash_containing...
    method it_generates_proper_string_representation_for_hash (line 59) | function it_generates_proper_string_representation_for_hash()
    method it_generates_proper_string_representation_for_resource (line 66) | function it_generates_proper_string_representation_for_resource()
    method it_generates_proper_string_representation_for_object (line 72) | function it_generates_proper_string_representation_for_object(\stdClas...
    method it_generates_proper_string_representation_for_object_without_exporting (line 83) | function it_generates_proper_string_representation_for_object_without_...

FILE: src/Prophecy/Argument.php
  class Argument (line 21) | class Argument
    method exact (line 30) | public static function exact($value)
    method type (line 42) | public static function type($type)
    method which (line 55) | public static function which($methodName, $value)
    method that (line 68) | public static function that($callback, ?string $customStringRepresenta...
    method any (line 78) | public static function any()
    method cetera (line 88) | public static function cetera()
    method allOf (line 100) | public static function allOf(...$tokens)
    method size (line 112) | public static function size($value)
    method withEntry (line 125) | public static function withEntry($key, $value)
    method withEveryEntry (line 137) | public static function withEveryEntry($value)
    method containing (line 149) | public static function containing($value)
    method withKey (line 161) | public static function withKey($key)
    method not (line 173) | public static function not($value)
    method containingString (line 183) | public static function containingString($value)
    method is (line 195) | public static function is($value)
    method approximate (line 209) | public static function approximate($value, $precision = 0)
    method in (line 222) | public static function in($value)
    method notIn (line 235) | public static function notIn($value)

FILE: src/Prophecy/Argument/ArgumentsWildcard.php
  class ArgumentsWildcard (line 19) | class ArgumentsWildcard
    method __construct (line 35) | public function __construct(array $arguments)
    method scoreArguments (line 53) | public function scoreArguments(array $arguments)
    method __toString (line 86) | public function __toString()
    method getTokens (line 100) | public function getTokens()

FILE: src/Prophecy/Argument/Token/AnyValueToken.php
  class AnyValueToken (line 19) | class AnyValueToken implements TokenInterface
    method scoreArgument (line 28) | public function scoreArgument($argument)
    method isLast (line 38) | public function isLast()
    method __toString (line 48) | public function __toString()

FILE: src/Prophecy/Argument/Token/AnyValuesToken.php
  class AnyValuesToken (line 19) | class AnyValuesToken implements TokenInterface
    method scoreArgument (line 28) | public function scoreArgument($argument)
    method isLast (line 38) | public function isLast()
    method __toString (line 48) | public function __toString()

FILE: src/Prophecy/Argument/Token/ApproximateValueToken.php
  class ApproximateValueToken (line 19) | class ApproximateValueToken implements TokenInterface
    method __construct (line 28) | public function __construct($value, $precision = 0)
    method scoreArgument (line 37) | public function scoreArgument($argument)
    method isLast (line 49) | public function isLast()
    method __toString (line 59) | public function __toString()

FILE: src/Prophecy/Argument/Token/ArrayCountToken.php
  class ArrayCountToken (line 20) | class ArrayCountToken implements TokenInterface
    method __construct (line 27) | public function __construct($value)
    method scoreArgument (line 39) | public function scoreArgument($argument)
    method isLast (line 49) | public function isLast()
    method __toString (line 59) | public function __toString()
    method isCountable (line 72) | private function isCountable($argument)
    method hasProperCount (line 84) | private function hasProperCount($argument)

FILE: src/Prophecy/Argument/Token/ArrayEntryToken.php
  class ArrayEntryToken (line 21) | class ArrayEntryToken implements TokenInterface
    method __construct (line 32) | public function __construct($key, $value)
    method scoreArgument (line 47) | public function scoreArgument($argument)
    method isLast (line 75) | public function isLast()
    method __toString (line 85) | public function __toString()
    method getKey (line 95) | public function getKey()
    method getValue (line 105) | public function getValue()
    method wrapIntoExactValueToken (line 116) | private function wrapIntoExactValueToken($value)
    method convertArrayAccessToEntry (line 129) | private function convertArrayAccessToEntry(\ArrayAccess $object)

FILE: src/Prophecy/Argument/Token/ArrayEveryEntryToken.php
  class ArrayEveryEntryToken (line 19) | class ArrayEveryEntryToken implements TokenInterface
    method __construct (line 29) | public function __construct($value)
    method scoreArgument (line 41) | public function scoreArgument($argument)
    method isLast (line 62) | public function isLast()
    method __toString (line 70) | public function __toString()
    method getValue (line 78) | public function getValue()

FILE: src/Prophecy/Argument/Token/CallbackToken.php
  class CallbackToken (line 21) | class CallbackToken implements TokenInterface
    method __construct (line 38) | public function __construct($callback, ?string $customStringRepresenta...
    method scoreArgument (line 58) | public function scoreArgument($argument)
    method isLast (line 68) | public function isLast()
    method __toString (line 78) | public function __toString()

FILE: src/Prophecy/Argument/Token/ExactValueToken.php
  class ExactValueToken (line 24) | class ExactValueToken implements TokenInterface
    method __construct (line 39) | public function __construct($value, ?StringUtil $util = null, ?Compara...
    method scoreArgument (line 54) | public function scoreArgument($argument)
    method getValue (line 96) | public function getValue()
    method isLast (line 106) | public function isLast()
    method __toString (line 116) | public function __toString()

FILE: src/Prophecy/Argument/Token/IdenticalValueToken.php
  class IdenticalValueToken (line 21) | class IdenticalValueToken implements TokenInterface
    method __construct (line 35) | public function __construct($value, ?StringUtil $util = null)
    method scoreArgument (line 48) | public function scoreArgument($argument)
    method isLast (line 58) | public function isLast()
    method __toString (line 68) | public function __toString()

FILE: src/Prophecy/Argument/Token/InArrayToken.php
  class InArrayToken (line 19) | class InArrayToken implements TokenInterface
    method __construct (line 28) | public function __construct(array $arguments, $strict = true)
    method scoreArgument (line 41) | public function scoreArgument($argument)
    method isLast (line 59) | public function isLast()
    method __toString (line 69) | public function __toString()

FILE: src/Prophecy/Argument/Token/LogicalAndToken.php
  class LogicalAndToken (line 19) | class LogicalAndToken implements TokenInterface
    method __construct (line 29) | public function __construct(array $arguments)
    method scoreArgument (line 46) | public function scoreArgument($argument)
    method isLast (line 69) | public function isLast()
    method __toString (line 79) | public function __toString()

FILE: src/Prophecy/Argument/Token/LogicalNotToken.php
  class LogicalNotToken (line 19) | class LogicalNotToken implements TokenInterface
    method __construct (line 27) | public function __construct($value)
    method scoreArgument (line 39) | public function scoreArgument($argument)
    method isLast (line 49) | public function isLast()
    method getOriginatingToken (line 59) | public function getOriginatingToken()
    method __toString (line 69) | public function __toString()

FILE: src/Prophecy/Argument/Token/NotInArrayToken.php
  class NotInArrayToken (line 19) | class NotInArrayToken implements TokenInterface
    method __construct (line 28) | public function __construct(array $arguments, $strict = true)
    method scoreArgument (line 41) | public function scoreArgument($argument)
    method isLast (line 59) | public function isLast()
    method __toString (line 69) | public function __toString()

FILE: src/Prophecy/Argument/Token/ObjectStateToken.php
  class ObjectStateToken (line 24) | class ObjectStateToken implements TokenInterface
    method __construct (line 37) | public function __construct(
    method scoreArgument (line 57) | public function scoreArgument($argument)
    method isLast (line 87) | public function isLast()
    method __toString (line 97) | public function __toString()

FILE: src/Prophecy/Argument/Token/StringContainsToken.php
  class StringContainsToken (line 19) | class StringContainsToken implements TokenInterface
    method __construct (line 28) | public function __construct($value)
    method scoreArgument (line 33) | public function scoreArgument($argument)
    method getValue (line 43) | public function getValue()
    method isLast (line 53) | public function isLast()
    method __toString (line 63) | public function __toString()

FILE: src/Prophecy/Argument/Token/TokenInterface.php
  type TokenInterface (line 19) | interface TokenInterface
    method scoreArgument (line 28) | public function scoreArgument($argument);
    method isLast (line 35) | public function isLast();
    method __toString (line 42) | public function __toString();

FILE: src/Prophecy/Argument/Token/TypeToken.php
  class TypeToken (line 21) | class TypeToken implements TokenInterface
    method __construct (line 28) | public function __construct($type)
    method scoreArgument (line 47) | public function scoreArgument($argument)
    method isLast (line 62) | public function isLast()
    method __toString (line 72) | public function __toString()

FILE: src/Prophecy/Call/Call.php
  class Call (line 22) | class Call
    method __construct (line 51) | public function __construct($methodName, array $arguments, $returnValue,
    method getMethodName (line 71) | public function getMethodName()
    method getArguments (line 81) | public function getArguments()
    method getReturnValue (line 91) | public function getReturnValue()
    method getException (line 101) | public function getException()
    method getFile (line 111) | public function getFile()
    method getLine (line 121) | public function getLine()
    method getCallPlace (line 131) | public function getCallPlace()
    method addScore (line 148) | public function addScore(ArgumentsWildcard $wildcard, $score)
    method getScore (line 163) | public function getScore(ArgumentsWildcard $wildcard)

FILE: src/Prophecy/Call/CallCenter.php
  class CallCenter (line 27) | class CallCenter
    method __construct (line 46) | public function __construct(?StringUtil $util = null)
    method makeCall (line 63) | public function makeCall(ObjectProphecy $prophecy, $methodName, array ...
    method findCalls (line 136) | public function findCalls($methodName, ArgumentsWildcard $wildcard)
    method checkUnexpectedCalls (line 153) | public function checkUnexpectedCalls()
    method createUnexpectedCallException (line 172) | private function createUnexpectedCallException(ObjectProphecy $prophec...
    method indentArguments (line 225) | private function indentArguments(array $arguments, $indentationLength)
    method findMethodProphecies (line 245) | private function findMethodProphecies(ObjectProphecy $prophecy, $metho...

FILE: src/Prophecy/Comparator/ClosureComparator.php
  class ClosureComparator (line 22) | final class ClosureComparator extends Comparator
    method accepts (line 28) | public function accepts($expected, $actual): bool
    method assertEquals (line 41) | public function assertEquals($expected, $actual, $delta = 0.0, $canoni...

FILE: src/Prophecy/Comparator/Factory.php
  class Factory (line 23) | final class Factory extends BaseFactory
    method __construct (line 30) | public function __construct()
    method getInstance (line 41) | public static function getInstance()

FILE: src/Prophecy/Comparator/FactoryProvider.php
  class FactoryProvider (line 21) | final class FactoryProvider
    method __construct (line 28) | private function __construct() {}
    method getInstance (line 30) | public static function getInstance(): Factory

FILE: src/Prophecy/Comparator/ProphecyComparator.php
  class ProphecyComparator (line 21) | class ProphecyComparator extends Comparator
    method accepts (line 27) | public function accepts($expected, $actual): bool
    method assertEquals (line 39) | public function assertEquals($expected, $actual, $delta = 0.0, $canoni...
    method getComparatorFactory (line 45) | private function getComparatorFactory(): Factory

FILE: src/Prophecy/Doubler/CachedDoubler.php
  class CachedDoubler (line 22) | class CachedDoubler extends Doubler
    method createDoubleClass (line 29) | protected function createDoubleClass(?ReflectionClass $class, array $i...
    method generateClassId (line 45) | private function generateClassId(?ReflectionClass $class, array $inter...
    method resetCache (line 65) | public function resetCache()

FILE: src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php
  type ClassPatchInterface (line 23) | interface ClassPatchInterface
    method supports (line 32) | public function supports(ClassNode $node);
    method apply (line 40) | public function apply(ClassNode $node);
    method getPriority (line 47) | public function getPriority();

FILE: src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php
  class DisableConstructorPatch (line 26) | class DisableConstructorPatch implements ClassPatchInterface
    method supports (line 35) | public function supports(ClassNode $node)
    method apply (line 45) | public function apply(ClassNode $node)
    method getPriority (line 103) | public function getPriority()

FILE: src/Prophecy/Doubler/ClassPatch/KeywordPatch.php
  class KeywordPatch (line 21) | class KeywordPatch implements ClassPatchInterface
    method supports (line 30) | public function supports(ClassNode $node)
    method apply (line 40) | public function apply(ClassNode $node)
    method getPriority (line 54) | public function getPriority()
    method getKeywords (line 64) | private function getKeywords()

FILE: src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php
  class MagicCallPatch (line 27) | class MagicCallPatch implements ClassPatchInterface
    method __construct (line 33) | public function __construct(?MethodTagRetrieverInterface $tagRetriever...
    method supports (line 45) | public function supports(ClassNode $node)
    method apply (line 55) | public function apply(ClassNode $node)
    method getPriority (line 110) | public function getPriority()

FILE: src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php
  class ProphecySubjectPatch (line 26) | class ProphecySubjectPatch implements ClassPatchInterface
    method supports (line 35) | public function supports(ClassNode $node)
    method apply (line 45) | public function apply(ClassNode $node)
    method getPriority (line 110) | public function getPriority()

FILE: src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php
  class ReflectionClassNewInstancePatch (line 22) | class ReflectionClassNewInstancePatch implements ClassPatchInterface
    method supports (line 31) | public function supports(ClassNode $node)
    method apply (line 41) | public function apply(ClassNode $node)
    method getPriority (line 55) | public function getPriority()

FILE: src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php
  class SplFileInfoPatch (line 23) | class SplFileInfoPatch implements ClassPatchInterface
    method supports (line 32) | public function supports(ClassNode $node)
    method apply (line 44) | public function apply(ClassNode $node)
    method getPriority (line 82) | public function getPriority()
    method nodeIsDirectoryIterator (line 91) | private function nodeIsDirectoryIterator(ClassNode $node)
    method nodeIsSplFileObject (line 103) | private function nodeIsSplFileObject(ClassNode $node)
    method nodeIsSymfonySplFileInfo (line 115) | private function nodeIsSymfonySplFileInfo(ClassNode $node)

FILE: src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php
  class ThrowablePatch (line 8) | class ThrowablePatch implements ClassPatchInterface
    method supports (line 16) | public function supports(ClassNode $node)
    method implementsAThrowableInterface (line 25) | private function implementsAThrowableInterface(ClassNode $node)
    method doesNotExtendAThrowableClass (line 40) | private function doesNotExtendAThrowableClass(ClassNode $node)
    method apply (line 52) | public function apply(ClassNode $node)
    method checkItCanBeDoubled (line 58) | private function checkItCanBeDoubled(ClassNode $node): void
    method setParentClassToException (line 72) | private function setParentClassToException(ClassNode $node): void
    method getPriority (line 91) | public function getPriority()

FILE: src/Prophecy/Doubler/ClassPatch/TraversablePatch.php
  class TraversablePatch (line 25) | class TraversablePatch implements ClassPatchInterface
    method supports (line 34) | public function supports(ClassNode $node)
    method apply (line 65) | public function apply(ClassNode $node)
    method getPriority (line 95) | public function getPriority()

FILE: src/Prophecy/Doubler/DoubleInterface.php
  type DoubleInterface (line 20) | interface DoubleInterface {}

FILE: src/Prophecy/Doubler/Doubler.php
  class Doubler (line 27) | class Doubler
    method __construct (line 43) | public function __construct(?ClassMirror $mirror = null, ?ClassCreator...
    method getClassPatches (line 56) | public function getClassPatches()
    method registerClassPatch (line 68) | public function registerClassPatch(ClassPatchInterface $patch)
    method double (line 90) | public function double(?ReflectionClass $class, array $interfaces, ?ar...
    method createDoubleClass (line 130) | protected function createDoubleClass(?ReflectionClass $class, array $i...

FILE: src/Prophecy/Doubler/Generator/ClassCodeGenerator.php
  class ClassCodeGenerator (line 22) | class ClassCodeGenerator
    method __construct (line 25) | public function __construct() {}
    method generate (line 35) | public function generate($classname, Node\ClassNode $class)
    method generateMethod (line 63) | private function generateMethod(Node\MethodNode $method): string
    method generateTypes (line 78) | private function generateTypes(TypeNodeAbstract $typeNode): string
    method generateArguments (line 92) | private function generateArguments(array $arguments): array

FILE: src/Prophecy/Doubler/Generator/ClassCreator.php
  class ClassCreator (line 22) | class ClassCreator
    method __construct (line 26) | public function __construct(?ClassCodeGenerator $generator = null)
    method create (line 41) | public function create($classname, Node\ClassNode $class)

FILE: src/Prophecy/Doubler/Generator/ClassMirror.php
  class ClassMirror (line 38) | class ClassMirror
    method reflect (line 59) | public function reflect(?ReflectionClass $class, array $interfaces)
    method reflectClassToNode (line 102) | private function reflectClassToNode(ReflectionClass $class, Node\Class...
    method reflectInterfaceToNode (line 142) | private function reflectInterfaceToNode(ReflectionClass $interface, No...
    method reflectMethodToNode (line 151) | private function reflectMethodToNode(ReflectionMethod $method, Node\Cl...
    method reflectArgumentToNode (line 197) | private function reflectArgumentToNode(ReflectionParameter $parameter,...
    method hasDefaultValue (line 223) | private function hasDefaultValue(ReflectionParameter $parameter): bool
    method getDefaultValue (line 239) | private function getDefaultValue(ReflectionParameter $parameter)
    method createTypeFromReflection (line 251) | private function createTypeFromReflection(ReflectionType $type, Reflec...
    method resolveTypeName (line 314) | private function resolveTypeName(string $name, \ReflectionClass $conte...

FILE: src/Prophecy/Doubler/Generator/Node/ArgumentNode.php
  class ArgumentNode (line 19) | class ArgumentNode
    method __construct (line 47) | public function __construct($name)
    method getName (line 56) | public function getName()
    method setTypeNode (line 64) | public function setTypeNode(ArgumentTypeNode $typeNode)
    method getTypeNode (line 69) | public function getTypeNode(): ArgumentTypeNode
    method hasDefault (line 77) | public function hasDefault()
    method getDefault (line 85) | public function getDefault()
    method setDefault (line 95) | public function setDefault($default = null)
    method isOptional (line 104) | public function isOptional()
    method setAsPassedByReference (line 114) | public function setAsPassedByReference($byReference = true)
    method isPassedByReference (line 122) | public function isPassedByReference()
    method setAsVariadic (line 132) | public function setAsVariadic($isVariadic = true)
    method isVariadic (line 140) | public function isVariadic()
    method getTypeHint (line 149) | public function getTypeHint()
    method setTypeHint (line 162) | public function setTypeHint($typeHint = null)
    method isNullable (line 171) | public function isNullable()
    method setAsNullable (line 182) | public function setAsNullable($isNullable = true)

FILE: src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php
  class ArgumentTypeNode (line 5) | class ArgumentTypeNode extends TypeNodeAbstract {}

FILE: src/Prophecy/Doubler/Generator/Node/ClassNode.php
  class ClassNode (line 22) | class ClassNode
    method getParentClass (line 58) | public function getParentClass()
    method setParentClass (line 68) | public function setParentClass($class)
    method getInterfaces (line 76) | public function getInterfaces()
    method addInterface (line 86) | public function addInterface($interface)
    method hasInterface (line 100) | public function hasInterface($interface)
    method getProperties (line 110) | public function getProperties()
    method addProperty (line 123) | public function addProperty($name, $visibility = 'public')
    method getMethods (line 139) | public function getMethods()
    method addMethod (line 150) | public function addMethod(MethodNode $method, $force = false)
    method removeMethod (line 169) | public function removeMethod($name)
    method getMethod (line 179) | public function getMethod($name)
    method hasMethod (line 189) | public function hasMethod($name)
    method getUnextendableMethods (line 197) | public function getUnextendableMethods()
    method addUnextendableMethod (line 207) | public function addUnextendableMethod($unextendableMethod)
    method isExtendable (line 220) | public function isExtendable($method)
    method isReadOnly (line 228) | public function isReadOnly()
    method setReadOnly (line 238) | public function setReadOnly($readOnly)

FILE: src/Prophecy/Doubler/Generator/Node/MethodNode.php
  class MethodNode (line 21) | class MethodNode
    method __construct (line 53) | public function __construct($name, $code = null)
    method getVisibility (line 65) | public function getVisibility()
    method setVisibility (line 75) | public function setVisibility($visibility)
    method isStatic (line 91) | public function isStatic()
    method setStatic (line 101) | public function setStatic($static = true)
    method returnsReference (line 109) | public function returnsReference()
    method setReturnsReference (line 117) | public function setReturnsReference()
    method getName (line 125) | public function getName()
    method addArgument (line 133) | public function addArgument(ArgumentNode $argument)
    method getArguments (line 141) | public function getArguments()
    method hasReturnType (line 150) | public function hasReturnType()
    method setReturnTypeNode (line 155) | public function setReturnTypeNode(ReturnTypeNode $returnTypeNode): void
    method setReturnType (line 166) | public function setReturnType($type = null)
    method setNullableReturnType (line 177) | public function setNullableReturnType($bool = true)
    method getReturnType (line 190) | public function getReturnType()
    method getReturnTypeNode (line 199) | public function getReturnTypeNode(): ReturnTypeNode
    method hasNullableReturnType (line 208) | public function hasNullableReturnType()
    method setCode (line 218) | public function setCode($code)
    method getCode (line 226) | public function getCode()
    method useParentCode (line 238) | public function useParentCode()
    method generateArgument (line 250) | private function generateArgument(ArgumentNode $arg)

FILE: src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php
  class ReturnTypeNode (line 7) | final class ReturnTypeNode extends TypeNodeAbstract
    method isBuiltIn (line 9) | protected function isBuiltIn(string $type): bool
    method isVoid (line 25) | public function isVoid(): bool
    method hasReturnStatement (line 34) | public function hasReturnStatement(): bool

FILE: src/Prophecy/Doubler/Generator/Node/Type/BuiltinType.php
  class BuiltinType (line 5) | final class BuiltinType implements SimpleType
    method __construct (line 7) | public function __construct(private readonly string $type) {}
    method __toString (line 9) | public function __toString(): string
    method getType (line 14) | public function getType(): string
    method equals (line 19) | public function equals(TypeInterface $givenType): bool

FILE: src/Prophecy/Doubler/Generator/Node/Type/IntersectionType.php
  class IntersectionType (line 7) | final class IntersectionType implements TypeInterface
    method __construct (line 12) | public function __construct(private array $types)
    method getTypes (line 20) | public function getTypes(): array
    method has (line 28) | private function has(SimpleType $givenType): bool
    method equals (line 39) | public function equals(TypeInterface $givenType): bool
    method guard (line 58) | private function guard(): void
    method __toString (line 71) | public function __toString(): string

FILE: src/Prophecy/Doubler/Generator/Node/Type/ObjectType.php
  class ObjectType (line 5) | final class ObjectType implements SimpleType
    method __construct (line 10) | public function __construct(private readonly string $type) {}
    method __toString (line 12) | public function __toString(): string
    method getType (line 20) | public function getType(): string
    method equals (line 25) | public function equals(TypeInterface $givenType): bool

FILE: src/Prophecy/Doubler/Generator/Node/Type/SimpleType.php
  type SimpleType (line 5) | interface SimpleType extends TypeInterface
    method getType (line 7) | public function getType(): string;

FILE: src/Prophecy/Doubler/Generator/Node/Type/TypeInterface.php
  type TypeInterface (line 5) | interface TypeInterface extends \Stringable
    method equals (line 7) | public function equals(TypeInterface $givenType): bool;

FILE: src/Prophecy/Doubler/Generator/Node/Type/UnionType.php
  class UnionType (line 7) | final class UnionType implements TypeInterface
    method __construct (line 12) | public function __construct(private array $types)
    method getTypes (line 20) | public function getTypes(): array
    method guard (line 25) | private function guard(): void
    method has (line 69) | public function has(SimpleType|IntersectionType $givenType): bool
    method equals (line 80) | public function equals(TypeInterface $givenType): bool
    method __toString (line 99) | public function __toString(): string

FILE: src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php
  class TypeNodeAbstract (line 13) | abstract class TypeNodeAbstract
    method __construct (line 21) | public function __construct(string|TypeInterface|null $type = null, st...
    method canUseNullShorthand (line 71) | public function canUseNullShorthand(): bool
    method isNullable (line 85) | public function isNullable(): bool
    method getTypes (line 102) | public function getTypes(): array
    method getType (line 130) | public function getType(): ?TypeInterface
    method getNonNullTypes (line 139) | public function getNonNullTypes(): array
    method normalizeBuiltinType (line 173) | private function normalizeBuiltinType(string $type): string
    method isBuiltIn (line 189) | protected function isBuiltIn(string $type): bool
    method removePrefixNsSeparator (line 222) | protected function removePrefixNsSeparator(string $type): string

FILE: src/Prophecy/Doubler/Generator/ReflectionInterface.php
  type ReflectionInterface (line 20) | interface ReflectionInterface {}

FILE: src/Prophecy/Doubler/Generator/TypeHintReference.php
  class TypeHintReference (line 11) | final class TypeHintReference
    method isBuiltInParamTypeHint (line 18) | public function isBuiltInParamTypeHint($type)
    method isBuiltInReturnTypeHint (line 43) | public function isBuiltInReturnTypeHint($type)

FILE: src/Prophecy/Doubler/LazyDouble.php
  class LazyDouble (line 27) | class LazyDouble
    method __construct (line 47) | public function __construct(Doubler $doubler)
    method setParentClass (line 66) | public function setParentClass($class)
    method addInterface (line 99) | public function addInterface($interface)
    method setArguments (line 128) | public function setArguments(?array $arguments = null)
    method getInstance (line 138) | public function getInstance()

FILE: src/Prophecy/Doubler/NameGenerator.php
  class NameGenerator (line 22) | class NameGenerator
    method name (line 37) | public function name(?ReflectionClass $class, array $interfaces)

FILE: src/Prophecy/Exception/Call/UnexpectedCallException.php
  class UnexpectedCallException (line 17) | class UnexpectedCallException extends ObjectProphecyException
    method __construct (line 28) | public function __construct($message, ObjectProphecy $objectProphecy,
    method getMethodName (line 40) | public function getMethodName()
    method getArguments (line 48) | public function getArguments()

FILE: src/Prophecy/Exception/Doubler/ClassCreatorException.php
  class ClassCreatorException (line 16) | class ClassCreatorException extends \RuntimeException implements Doubler...
    method __construct (line 24) | public function __construct($message, ClassNode $node)
    method getClassNode (line 34) | public function getClassNode()

FILE: src/Prophecy/Exception/Doubler/ClassMirrorException.php
  class ClassMirrorException (line 16) | class ClassMirrorException extends \RuntimeException implements DoublerE...
    method __construct (line 24) | public function __construct($message, ReflectionClass $class)
    method getReflectedClass (line 34) | public function getReflectedClass()

FILE: src/Prophecy/Exception/Doubler/ClassNotFoundException.php
  class ClassNotFoundException (line 14) | class ClassNotFoundException extends DoubleException
    method __construct (line 22) | public function __construct($message, $classname)
    method getClassname (line 32) | public function getClassname()

FILE: src/Prophecy/Exception/Doubler/DoubleException.php
  class DoubleException (line 16) | class DoubleException extends RuntimeException implements DoublerExcepti...

FILE: src/Prophecy/Exception/Doubler/DoublerException.php
  type DoublerException (line 16) | interface DoublerException extends Exception {}

FILE: src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php
  class InterfaceNotFoundException (line 14) | class InterfaceNotFoundException extends ClassNotFoundException
    method getInterfaceName (line 19) | public function getInterfaceName()

FILE: src/Prophecy/Exception/Doubler/MethodNotExtendableException.php
  class MethodNotExtendableException (line 5) | class MethodNotExtendableException extends DoubleException
    method __construct (line 16) | public function __construct($message, $className, $methodName)
    method getMethodName (line 28) | public function getMethodName()
    method getClassName (line 36) | public function getClassName()

FILE: src/Prophecy/Exception/Doubler/MethodNotFoundException.php
  class MethodNotFoundException (line 16) | class MethodNotFoundException extends DoubleException
    method __construct (line 39) | public function __construct($message, $classname, $methodName, $argume...
    method getClassname (line 51) | public function getClassname()
    method getMethodName (line 59) | public function getMethodName()
    method getArguments (line 67) | public function getArguments()

FILE: src/Prophecy/Exception/Doubler/ReturnByReferenceException.php
  class ReturnByReferenceException (line 14) | class ReturnByReferenceException extends DoubleException
    method __construct (line 24) | public function __construct($message, $classname, $methodName)
    method getClassname (line 35) | public function getClassname()
    method getMethodName (line 43) | public function getMethodName()

FILE: src/Prophecy/Exception/Exception.php
  type Exception (line 20) | interface Exception extends \Throwable {}

FILE: src/Prophecy/Exception/InvalidArgumentException.php
  class InvalidArgumentException (line 14) | class InvalidArgumentException extends \InvalidArgumentException impleme...

FILE: src/Prophecy/Exception/Prediction/AggregateException.php
  class AggregateException (line 16) | class AggregateException extends \RuntimeException implements Prediction...
    method append (line 30) | public function append(PredictionException $exception)
    method getExceptions (line 43) | public function getExceptions()
    method setObjectProphecy (line 53) | public function setObjectProphecy(ObjectProphecy $objectProphecy)
    method getObjectProphecy (line 61) | public function getObjectProphecy()

FILE: src/Prophecy/Exception/Prediction/FailedPredictionException.php
  class FailedPredictionException (line 22) | class FailedPredictionException extends RuntimeException implements Pred...

FILE: src/Prophecy/Exception/Prediction/NoCallsException.php
  class NoCallsException (line 16) | class NoCallsException extends MethodProphecyException implements Predic...

FILE: src/Prophecy/Exception/Prediction/PredictionException.php
  type PredictionException (line 16) | interface PredictionException extends Exception {}

FILE: src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php
  class UnexpectedCallsCountException (line 17) | class UnexpectedCallsCountException extends UnexpectedCallsException
    method __construct (line 27) | public function __construct($message, MethodProphecy $methodProphecy, ...
    method getExpectedCount (line 37) | public function getExpectedCount()

FILE: src/Prophecy/Exception/Prediction/UnexpectedCallsException.php
  class UnexpectedCallsException (line 18) | class UnexpectedCallsException extends MethodProphecyException implement...
    method __construct (line 28) | public function __construct($message, MethodProphecy $methodProphecy, ...
    method getCalls (line 38) | public function getCalls()

FILE: src/Prophecy/Exception/Prophecy/MethodProphecyException.php
  class MethodProphecyException (line 16) | class MethodProphecyException extends ObjectProphecyException
    method __construct (line 23) | public function __construct($message, MethodProphecy $methodProphecy, ...
    method getMethodProphecy (line 33) | public function getMethodProphecy()

FILE: src/Prophecy/Exception/Prophecy/ObjectProphecyException.php
  class ObjectProphecyException (line 16) | class ObjectProphecyException extends \RuntimeException implements Proph...
    method __construct (line 24) | public function __construct($message, ObjectProphecy $objectProphecy, ...
    method getObjectProphecy (line 34) | public function getObjectProphecy()

FILE: src/Prophecy/Exception/Prophecy/ProphecyException.php
  type ProphecyException (line 16) | interface ProphecyException extends Exception {}

FILE: src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php
  class ClassAndInterfaceTagRetriever (line 21) | final class ClassAndInterfaceTagRetriever implements MethodTagRetrieverI...
    method __construct (line 28) | public function __construct(?MethodTagRetrieverInterface $classRetriev...
    method getTagList (line 39) | public function getTagList(\ReflectionClass $reflectionClass)
    method getInterfacesTagList (line 52) | private function getInterfacesTagList(\ReflectionClass $reflectionClass)

FILE: src/Prophecy/PhpDocumentor/ClassTagRetriever.php
  class ClassTagRetriever (line 23) | final class ClassTagRetriever implements MethodTagRetrieverInterface
    method __construct (line 28) | public function __construct()
    method getTagList (line 34) | public function getTagList(\ReflectionClass $reflectionClass)

FILE: src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php
  type MethodTagRetrieverInterface (line 21) | interface MethodTagRetrieverInterface
    method getTagList (line 28) | public function getTagList(\ReflectionClass $reflectionClass);

FILE: src/Prophecy/Prediction/CallPrediction.php
  class CallPrediction (line 27) | class CallPrediction implements PredictionInterface
    method __construct (line 31) | public function __construct(?StringUtil $util = null)
    method check (line 36) | public function check(array $calls, ObjectProphecy $object, MethodProp...

FILE: src/Prophecy/Prediction/CallTimesPrediction.php
  class CallTimesPrediction (line 26) | class CallTimesPrediction implements PredictionInterface
    method __construct (line 34) | public function __construct($times, ?StringUtil $util = null)
    method check (line 40) | public function check(array $calls, ObjectProphecy $object, MethodProp...

FILE: src/Prophecy/Prediction/CallbackPrediction.php
  class CallbackPrediction (line 25) | class CallbackPrediction implements PredictionInterface
    method __construct (line 34) | public function __construct($callback)
    method check (line 46) | public function check(array $calls, ObjectProphecy $object, MethodProp...

FILE: src/Prophecy/Prediction/NoCallsPrediction.php
  class NoCallsPrediction (line 24) | class NoCallsPrediction implements PredictionInterface
    method __construct (line 28) | public function __construct(?StringUtil $util = null)
    method check (line 33) | public function check(array $calls, ObjectProphecy $object, MethodProp...

FILE: src/Prophecy/Prediction/PredictionInterface.php
  type PredictionInterface (line 25) | interface PredictionInterface
    method check (line 37) | public function check(array $calls, ObjectProphecy $object, MethodProp...

FILE: src/Prophecy/Promise/CallbackPromise.php
  class CallbackPromise (line 25) | class CallbackPromise implements PromiseInterface
    method __construct (line 36) | public function __construct($callback)
    method execute (line 48) | public function execute(array $args, ObjectProphecy $object, MethodPro...

FILE: src/Prophecy/Promise/PromiseInterface.php
  type PromiseInterface (line 23) | interface PromiseInterface
    method execute (line 34) | public function execute(array $args, ObjectProphecy $object, MethodPro...

FILE: src/Prophecy/Promise/ReturnArgumentPromise.php
  class ReturnArgumentPromise (line 23) | class ReturnArgumentPromise implements PromiseInterface
    method __construct (line 37) | public function __construct($index = 0)
    method execute (line 48) | public function execute(array $args, ObjectProphecy $object, MethodPro...

FILE: src/Prophecy/Promise/ReturnPromise.php
  class ReturnPromise (line 22) | class ReturnPromise implements PromiseInterface
    method __construct (line 31) | public function __construct(array $returnValues)
    method execute (line 36) | public function execute(array $args, ObjectProphecy $object, MethodPro...

FILE: src/Prophecy/Promise/ThrowPromise.php
  class ThrowPromise (line 25) | class ThrowPromise implements PromiseInterface
    method __construct (line 43) | public function __construct($exception)
    method execute (line 62) | public function execute(array $args, ObjectProphecy $object, MethodPro...
    method isAValidThrowable (line 88) | private function isAValidThrowable($exception)

FILE: src/Prophecy/Prophecy/MethodProphecy.php
  class MethodProphecy (line 31) | class MethodProphecy
    method __construct (line 69) | public function __construct(ObjectProphecy $objectProphecy, $methodNam...
    method withArguments (line 203) | public function withArguments($arguments)
    method will (line 231) | public function will($promise)
    method willReturn (line 259) | public function willReturn(...$return)
    method willYield (line 279) | public function willYield($items, $return = null)
    method willReturnArgument (line 313) | public function willReturnArgument($index = 0)
    method willThrow (line 333) | public function willThrow($exception)
    method should (line 347) | public function should($prediction)
    method shouldBeCalled (line 373) | public function shouldBeCalled()
    method shouldNotBeCalled (line 385) | public function shouldNotBeCalled()
    method shouldBeCalledTimes (line 399) | public function shouldBeCalledTimes($count)
    method shouldBeCalledOnce (line 411) | public function shouldBeCalledOnce()
    method shouldHave (line 426) | public function shouldHave($prediction)
    method shouldHaveBeenCalled (line 469) | public function shouldHaveBeenCalled()
    method shouldNotHaveBeenCalled (line 483) | public function shouldNotHaveBeenCalled()
    method shouldNotBeenCalled (line 496) | public function shouldNotBeenCalled()
    method shouldHaveBeenCalledTimes (line 510) | public function shouldHaveBeenCalledTimes($count)
    method shouldHaveBeenCalledOnce (line 522) | public function shouldHaveBeenCalledOnce()
    method checkPrediction (line 534) | public function checkPrediction()
    method getPromise (line 548) | public function getPromise()
    method getPrediction (line 558) | public function getPrediction()
    method getCheckedPredictions (line 568) | public function getCheckedPredictions()
    method getObjectProphecy (line 578) | public function getObjectProphecy()
    method getMethodName (line 588) | public function getMethodName()
    method getArgumentsWildcard (line 598) | public function getArgumentsWildcard()
    method hasReturnVoid (line 606) | public function hasReturnVoid()
    method bindToObjectProphecy (line 614) | private function bindToObjectProphecy()

FILE: src/Prophecy/Prophecy/ObjectProphecy.php
  class ObjectProphecy (line 31) | class ObjectProphecy implements ProphecyInterface
    method __construct (line 49) | public function __construct(
    method willExtend (line 73) | public function willExtend($class)
    method willImplement (line 91) | public function willImplement($interface)
    method willBeConstructedWith (line 105) | public function willBeConstructedWith(?array $arguments = null)
    method reveal (line 121) | public function reveal()
    method addMethodProphecy (line 145) | public function addMethodProphecy(MethodProphecy $methodProphecy)
    method getMethodProphecies (line 165) | public function getMethodProphecies($methodName = null)
    method makeProphecyMethodCall (line 188) | public function makeProphecyMethodCall($methodName, array $arguments)
    method findProphecyMethodCalls (line 205) | public function findProphecyMethodCalls($methodName, ArgumentsWildcard...
    method checkProphecyMethodsPredictions (line 218) | public function checkProphecyMethodsPredictions()
    method __call (line 248) | public function __call($methodName, array $arguments)
    method __get (line 277) | public function __get($name)
    method __set (line 290) | public function __set($name, $value)

FILE: src/Prophecy/Prophecy/ProphecyInterface.php
  type ProphecyInterface (line 21) | interface ProphecyInterface
    method reveal (line 30) | public function reveal();

FILE: src/Prophecy/Prophecy/ProphecySubjectInterface.php
  type ProphecySubjectInterface (line 19) | interface ProphecySubjectInterface
    method setProphecy (line 28) | public function setProphecy(ProphecyInterface $prophecy);
    method getProphecy (line 35) | public function getProphecy();

FILE: src/Prophecy/Prophecy/Revealer.php
  class Revealer (line 19) | class Revealer implements RevealerInterface
    method reveal (line 28) | public function reveal($value)

FILE: src/Prophecy/Prophecy/RevealerInterface.php
  type RevealerInterface (line 19) | interface RevealerInterface
    method reveal (line 28) | public function reveal($value);

FILE: src/Prophecy/Prophet.php
  class Prophet (line 32) | class Prophet
    method __construct (line 46) | public function __construct(
    method prophesize (line 79) | public function prophesize($classOrInterface = null)
    method getProphecies (line 110) | public function getProphecies()
    method getDoubler (line 120) | public function getDoubler()
    method checkPredictions (line 132) | public function checkPredictions()

FILE: src/Prophecy/Util/ExportUtil.php
  class ExportUtil (line 20) | class ExportUtil
    method export (line 39) | public static function export($value, $indentation = 0)
    method toArray (line 51) | public static function toArray($value)
    method recursiveExport (line 101) | protected static function recursiveExport(&$value, $indentation, $proc...

FILE: src/Prophecy/Util/StringUtil.php
  class StringUtil (line 21) | class StringUtil
    method __construct (line 28) | public function __construct($verbose = true)
    method stringify (line 41) | public function stringify($value, $exportObject = true)
    method stringifyCalls (line 89) | public function stringifyCalls(array $calls)

FILE: tests/Argument/Token/ExactValueTokenTest.php
  class ExactValueTokenTest (line 9) | class ExactValueTokenTest extends TestCase
    method does_not_trigger_nesting_error (line 15) | #[Test]
    method scores_10_for_objects_with_same_fields (line 25) | #[Test]
    method scores_10_for_matching_callables (line 35) | #[Test]
    method scores_false_for_object_and_string (line 44) | #[Test]
    method scores_false_for_object_and_int (line 53) | #[Test]
    method scores_false_for_object_and_stdclass (line 62) | #[Test]
    method scores_false_for_object_and_null (line 71) | #[Test]
  class ParentClass (line 82) | class ParentClass
    method addChild (line 86) | public function addChild($child)
  class ChildClass (line 92) | class ChildClass
    method __construct (line 97) | public function __construct($name, $parent)

FILE: tests/Comparator/FactoryProviderTest.php
  class FactoryProviderTest (line 10) | class FactoryProviderTest extends TestCase
    method it_should_have_ClosureComparator_registered (line 12) | #[Test]

FILE: tests/Doubler/ClassPatch/MagicCallPatchTest.php
  class MagicCallPatchTest (line 12) | class MagicCallPatchTest extends TestCase
    method it_supports_classes_with_invalid_tags (line 14) | #[Test]
    method it_supports_arguments_for_magic_methods (line 31) | #[Test]
    method applyPatchTo (line 50) | private function applyPatchTo(\ReflectionClass $class): ClassNode

FILE: tests/Doubler/Generator/ClassMirrorTest.php
  class ClassMirrorTest (line 19) | class ClassMirrorTest extends TestCase
    method it_reflects_allowed_magic_methods (line 21) | #[Test]
    method it_reflects_protected_abstract_methods (line 33) | #[Test]
    method it_reflects_public_static_methods (line 50) | #[Test]
    method it_marks_required_args_without_types_as_not_optional (line 67) | #[Test]
    method it_properly_reads_methods_arguments_with_types (line 88) | #[Test]
    method it_properly_reads_methods_arguments_with_callable_types (line 124) | #[Test]
    method it_properly_reads_methods_variadic_arguments (line 154) | #[Test]
    method it_properly_reads_methods_typehinted_variadic_arguments (line 174) | #[Test]
    method it_marks_passed_by_reference_args_as_passed_by_reference (line 194) | #[Test]
    method it_throws_an_exception_if_class_is_final (line 213) | #[Test]
    method it_ignores_final_methods (line 225) | #[Test]
    method it_marks_final_methods_as_unextendable (line 237) | #[Test]
    method it_throws_an_exception_if_interface_provided_instead_of_class (line 250) | #[Test]
    method it_reflects_all_interfaces_methods (line 262) | #[Test]
    method it_ignores_virtually_private_methods (line 285) | #[Test]
    method it_does_not_throw_exception_for_virtually_private_finals (line 300) | #[Test]
    method it_reflects_return_typehints (line 312) | #[Test]
    method it_throws_an_exception_if_class_provided_in_interfaces_list (line 331) | #[Test]
    method it_throws_an_exception_if_not_reflection_provided_as_interface (line 343) | #[Test]
    method it_doesnt_fail_to_typehint_nonexistent_FQCN (line 353) | #[Test]
    method it_doesnt_fail_on_array_nullable_parameter_with_not_null_default_value (line 364) | #[Test]
    method it_doesnt_fail_to_typehint_nonexistent_RQCN (line 378) | #[Test]
    method it_doesnt_fail_when_method_is_extended_with_more_params (line 389) | #[Test]
    method it_doesnt_fail_to_mock_self_referencing_interface (line 405) | #[Test]
    method it_changes_argument_names_if_they_are_varying (line 420) | #[Test]
    method it_can_double_a_class_with_union_return_types (line 473) | #[Test]
    method it_can_double_a_class_with_union_return_type_with_false (line 490) | #[Test]
    method it_can_double_a_class_with_union_argument_types (line 506) | #[Test]
    method it_can_double_a_class_with_union_argument_type_with_false (line 519) | #[Test]
    method it_can_double_a_class_with_mixed_types (line 532) | #[Test]
    method it_can_double_inherited_self_return_type (line 546) | #[Test]
    method it_can_double_never_return_type (line 555) | #[Test]
    method it_can_not_double_an_enum (line 569) | #[Test]
    method it_can_double_intersection_return_types (line 581) | #[Test]
    method it_can_double_intersection_argument_types (line 602) | #[Test]
    method it_can_double_a_standalone_return_type_of_false (line 623) | #[Test]
    method it_can_double_a_standalone_parameter_type_of_false (line 636) | #[Test]
    method it_can_double_a_nullable_return_type_of_false (line 650) | #[Test]
    method it_can_double_a_nullable_parameter_type_of_false (line 663) | #[Test]
    method it_can_not_double_dnf_intersection_argument_types (line 680) | #[Test]
    method it_can_double_dnf_intersection_return_types (line 705) | #[Test]
    method it_can_double_a_standalone_return_type_of_true (line 725) | #[Test]
    method it_reflects_non_read_only_class (line 738) | #[Test]
    method it_can_double_a_standalone_parameter_type_of_true (line 749) | #[Test]
    method it_can_double_a_nullable_return_type_of_true (line 763) | #[Test]
    method it_can_double_a_nullable_parameter_type_of_true (line 776) | #[Test]
    method it_can_double_a_standalone_return_type_of_null (line 793) | #[Test]
    method it_can_double_a_standalone_parameter_type_of_null (line 806) | #[Test]
    method it_reflects_read_only_class (line 820) | #[Test]

FILE: tests/Doubler/Generator/Node/TypeNodeAbstractTest.php
  class TypeNodeAbstractTest (line 12) | class TypeNodeAbstractTest extends TestCase
    method childClassDataProvider (line 17) | public static function childClassDataProvider(): \Generator
    method it_can_use_null_shorthand_only_with_two_types (line 37) | #[DataProvider('childClassDataProvider')]

FILE: tests/FunctionalTest.php
  class FunctionalTest (line 13) | class FunctionalTest extends TestCase
    method case_insensitive_method_names (line 15) | #[Test]
    method it_implements_the_double_interface (line 30) | #[Test]
    method it_implements_the_prophecy_subject_interface (line 39) | #[Test]
    method testUnconfiguredFinalReturnType (line 48) | public function testUnconfiguredFinalReturnType(): void
Condensed preview — 240 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (565K chars).
[
  {
    "path": ".editorconfig",
    "chars": 204,
    "preview": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = space\ninsert_final_newline = true\ntab_w"
  },
  {
    "path": ".gitattributes",
    "chars": 320,
    "preview": "/.editorconfig    export-ignore\n/.gitattributes   export-ignore\n/.gitignore       export-ignore\n/CONTRIBUTING.md  export"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 2175,
    "preview": "name: Build\n\non:\n  push:\n    branches: [master]\n  pull_request:\n  release:\n    types: [created]\n\njobs:\n  tests:\n    runs"
  },
  {
    "path": ".gitignore",
    "chars": 143,
    "preview": "*.tgz\n*.phar\n/.php-cs-fixer.cache\n/composer.lock\n/dev-tools/vendor/\n/vendor\n/phpstan.neon\n/phpunit.xml\n/.phpunit.result."
  },
  {
    "path": ".php-cs-fixer.dist.php",
    "chars": 886,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\nreturn (new PhpCsFixer\\Config())\n    ->setRiskyAllowed(false)\n    ->setRules([\n        "
  },
  {
    "path": "CHANGES.md",
    "chars": 14381,
    "preview": "Unreleased\n==========\n\n1.26.0\n======\n\n**Added:**\n\n* Add support for `phpdocumentor/reflection-docblock` v6 (@mspirkov)\n\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 689,
    "preview": "Contributing\n------------\n\nProphecy is an open source, community-driven project. If you'd like to contribute,\nfeel free "
  },
  {
    "path": "LICENSE",
    "chars": 1149,
    "preview": "Copyright (c) 2013 Konstantin Kudryashov <ever.zet@gmail.com>\nCopyright (c) 2013 Marcello Duarte <marcello.duarte@gmail."
  },
  {
    "path": "README.md",
    "chars": 15597,
    "preview": "# Prophecy\n\n[![Stable release](https://poser.pugx.org/phpspec/prophecy/version.svg)](https://packagist.org/packages/phps"
  },
  {
    "path": "composer.json",
    "chars": 2189,
    "preview": "{\n    \"name\":         \"phpspec/prophecy\",\n    \"description\":  \"Highly opinionated mocking framework for PHP 5.3+\",\n    \""
  },
  {
    "path": "fixtures/AbstractBaseClassWithMethodWithReturnType.php",
    "chars": 200,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Fixtures\\Prophecy;\n\nabstract class AbstractBaseClassWithMethodWithReturnType\n"
  },
  {
    "path": "fixtures/ClassExtendAbstractWithMethodWithReturnType.php",
    "chars": 167,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Fixtures\\Prophecy;\n\nclass ClassExtendAbstractWithMethodWithReturnType extends"
  },
  {
    "path": "fixtures/DnfArgumentType.php",
    "chars": 123,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass DnfArgumentType\n{\n    public function doSomething ((A&B)|C $foo)\n    {\n\n    }"
  },
  {
    "path": "fixtures/DnfReturnType.php",
    "chars": 119,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass DnfReturnType\n{\n    public function doSomething () : (A&B)|C\n    {\n\n    }\n}\n"
  },
  {
    "path": "fixtures/EmptyClass.php",
    "chars": 58,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass EmptyClass\n{\n}\n"
  },
  {
    "path": "fixtures/EmptyInterface.php",
    "chars": 66,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\ninterface EmptyInterface\n{\n}\n"
  },
  {
    "path": "fixtures/Enum.php",
    "chars": 120,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nenum Enum {\n    case Clubs;\n    case Diamonds;\n    case Hearts;\n    case Spades;\n}\n"
  },
  {
    "path": "fixtures/FinalClass.php",
    "chars": 64,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nfinal class FinalClass\n{\n}\n"
  },
  {
    "path": "fixtures/IntersectionArgumentType.php",
    "chars": 132,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass IntersectionArgumentType\n{\n    public function doSomething (Bar&Baz $foo)\n   "
  },
  {
    "path": "fixtures/IntersectionReturnType.php",
    "chars": 128,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass IntersectionReturnType\n{\n    public function doSomething () : Bar&Baz\n    {\n\n"
  },
  {
    "path": "fixtures/MethodWithAdditionalParam.php",
    "chars": 249,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nabstract class MethodWithAdditionalParam extends WithArguments implements Named\n{\n "
  },
  {
    "path": "fixtures/MixedTypes.php",
    "chars": 123,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass MixedTypes\n{\n    public function doSomething(mixed $arg1): mixed\n    {\n\n    }"
  },
  {
    "path": "fixtures/ModifierInterface.php",
    "chars": 141,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\ninterface ModifierInterface\n{\n    public function isAbstract();\n\n    public functio"
  },
  {
    "path": "fixtures/Named.php",
    "chars": 88,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\ninterface Named\n{\n    public function getName();\n}\n"
  },
  {
    "path": "fixtures/NeverType.php",
    "chars": 149,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass NeverType\n{\n    public function doSomething(): never\n    {\n        throw new "
  },
  {
    "path": "fixtures/NullableArrayParameter.php",
    "chars": 176,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass NullableArrayParameter\n{\n    public function iHaveNullableArrayParameterWithN"
  },
  {
    "path": "fixtures/NullableParameterTypeFalse.php",
    "chars": 147,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass NullableParameterTypeFalse\n{\n    public function method(?false $arg)\n    {\n  "
  },
  {
    "path": "fixtures/NullableParameterTypeTrue.php",
    "chars": 145,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass NullableParameterTypeTrue\n{\n    public function method(?true $arg)\n    {\n    "
  },
  {
    "path": "fixtures/NullableReturnTypeFalse.php",
    "chars": 142,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass NullableReturnTypeFalse\n{\n    public function method(): ?false\n    {\n        "
  },
  {
    "path": "fixtures/NullableReturnTypeTrue.php",
    "chars": 139,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass NullableReturnTypeTrue\n{\n    public function method(): ?true\n    {\n        re"
  },
  {
    "path": "fixtures/OptionalDepsClass.php",
    "chars": 260,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nuse I\\Simply;\n\nclass OptionalDepsClass\n{\n    public function iHaveAStrangeTypeHinte"
  },
  {
    "path": "fixtures/ReadOnlyClass.php",
    "chars": 70,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nreadonly class ReadOnlyClass\n{\n}\n"
  },
  {
    "path": "fixtures/ReturningFinalClass.php",
    "chars": 118,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\ninterface ReturningFinalClass\n{\n    public function doSomething(): FinalClass;\n}\n"
  },
  {
    "path": "fixtures/SelfReferencing.php",
    "chars": 115,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\ninterface SelfReferencing\n{\n    public function __invoke(self $self): self;\n}\n"
  },
  {
    "path": "fixtures/SpecialMethods.php",
    "chars": 368,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass SpecialMethods\n{\n    public function __construct()\n    {\n    }\n\n    function "
  },
  {
    "path": "fixtures/StandaloneParameterTypeFalse.php",
    "chars": 148,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass StandaloneParameterTypeFalse\n{\n    public function method(false $arg)\n    {\n "
  },
  {
    "path": "fixtures/StandaloneParameterTypeNull.php",
    "chars": 146,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass StandaloneParameterTypeNull\n{\n    public function method(null $arg)\n    {\n   "
  },
  {
    "path": "fixtures/StandaloneParameterTypeTrue.php",
    "chars": 146,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass StandaloneParameterTypeTrue\n{\n    public function method(true $arg)\n    {\n   "
  },
  {
    "path": "fixtures/StandaloneReturnTypeFalse.php",
    "chars": 143,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass StandaloneReturnTypeFalse\n{\n    public function method(): false\n    {\n       "
  },
  {
    "path": "fixtures/StandaloneReturnTypeNull.php",
    "chars": 140,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass StandaloneReturnTypeNull\n{\n    public function method(): null\n    {\n        r"
  },
  {
    "path": "fixtures/StandaloneReturnTypeTrue.php",
    "chars": 140,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass StandaloneReturnTypeTrue\n{\n    public function method(): true\n    {\n        r"
  },
  {
    "path": "fixtures/TentativeReturnTypeNull.php",
    "chars": 173,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass TentativeReturnTypeNull\n{\n    #[\\ReturnTypeWillChange()]\n    public function "
  },
  {
    "path": "fixtures/ThrowableInterface.php",
    "chars": 89,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\ninterface ThrowableInterface extends \\Throwable\n{\n}\n"
  },
  {
    "path": "fixtures/UnionArgumentTypeFalse.php",
    "chars": 132,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass UnionArgumentTypeFalse\n{\n    public function method(false|\\stdClass $arg)\n   "
  },
  {
    "path": "fixtures/UnionArgumentTypes.php",
    "chars": 132,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass UnionArgumentTypes\n{\n    public function doSomething(bool|\\stdClass $arg)\n   "
  },
  {
    "path": "fixtures/UnionReturnTypeFalse.php",
    "chars": 127,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass UnionReturnTypeFalse\n{\n    public function method(): false|\\stdClass\n    {\n\n "
  },
  {
    "path": "fixtures/UnionReturnTypes.php",
    "chars": 127,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass UnionReturnTypes\n{\n    public function doSomething(): bool|\\stdClass\n    {\n\n "
  },
  {
    "path": "fixtures/WithArguments.php",
    "chars": 243,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithArguments\n{\n    public function methodWithArgs(\\ArrayAccess $arg_1, array"
  },
  {
    "path": "fixtures/WithCallableArgument.php",
    "chars": 157,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithCallableArgument\n{\n    public function methodWithArgs(callable $arg_1, ?c"
  },
  {
    "path": "fixtures/WithFinalMethod.php",
    "chars": 123,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithFinalMethod\n{\n    final public function finalImplementation()\n    {\n    }"
  },
  {
    "path": "fixtures/WithFinalVirtuallyPrivateMethod.php",
    "chars": 199,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithFinalVirtuallyPrivateMethod\n{\n    final public function __toString()\n    "
  },
  {
    "path": "fixtures/WithPhpdocClass.php",
    "chars": 325,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\n/**\n * @method string name(string $gender = null)\n * @method mixed randomElement(ar"
  },
  {
    "path": "fixtures/WithProtectedAbstractMethod.php",
    "chars": 131,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nabstract class WithProtectedAbstractMethod\n{\n    abstract protected function innerD"
  },
  {
    "path": "fixtures/WithReferences.php",
    "chars": 153,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithReferences\n{\n    public function methodWithReferenceArgument(&$arg_1, \\Ar"
  },
  {
    "path": "fixtures/WithReturnTypehints.php",
    "chars": 300,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithReturnTypehints extends EmptyClass\n{\n    public function getSelf(): self "
  },
  {
    "path": "fixtures/WithStaticMethod.php",
    "chars": 117,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithStaticMethod\n{\n    public static function innerDetail()\n    {\n    }\n}\n"
  },
  {
    "path": "fixtures/WithTypehintedVariadicArgument.php",
    "chars": 144,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithTypehintedVariadicArgument\n{\n    function methodWithTypeHintedArgs(array "
  },
  {
    "path": "fixtures/WithVariadicArgument.php",
    "chars": 118,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithVariadicArgument\n{\n    function methodWithArgs(...$args)\n    {\n    }\n}\n"
  },
  {
    "path": "fixtures/WithVirtuallyPrivateMethod.php",
    "chars": 228,
    "preview": "<?php\n\nnamespace Fixtures\\Prophecy;\n\nclass WithVirtuallyPrivateMethod\n{\n    public function __toString()\n    {\n        r"
  },
  {
    "path": "phpstan-baseline.neon",
    "chars": 3248,
    "preview": "parameters:\n\tignoreErrors:\n\t\t-\n\t\t\tmessage: '#^Parameter \\#1 \\$value of function strval expects bool\\|float\\|int\\|resourc"
  },
  {
    "path": "phpstan.dist.neon",
    "chars": 242,
    "preview": "parameters:\n    level: 9\n    inferPrivatePropertyTypeFromConstructor: true\n    treatPhpDocTypesAsCertain: false\n    path"
  },
  {
    "path": "phpunit.xml.dist",
    "chars": 564,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSch"
  },
  {
    "path": "spec/Prophecy/Argument/ArgumentsWildcardSpec.php",
    "chars": 4785,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\Token\\TokenInterface;\n\nclass"
  },
  {
    "path": "spec/Prophecy/Argument/Token/AnyValueTokenSpec.php",
    "chars": 557,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass AnyValueTokenSpec extends ObjectBehav"
  },
  {
    "path": "spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php",
    "chars": 573,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass AnyValuesTokenSpec extends ObjectBeha"
  },
  {
    "path": "spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php",
    "chars": 1394,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ApproximateValueTokenSpec extends Obj"
  },
  {
    "path": "spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php",
    "chars": 1498,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ArrayCountTokenSpec extends ObjectBeh"
  },
  {
    "path": "spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php",
    "chars": 7802,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\Token\\ExactValueToken;"
  },
  {
    "path": "spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php",
    "chars": 3176,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\Token\\TokenInterface;\n"
  },
  {
    "path": "spec/Prophecy/Argument/Token/CallbackTokenSpec.php",
    "chars": 1189,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass CallbackTokenSpec extends ObjectBehav"
  },
  {
    "path": "spec/Prophecy/Argument/Token/ExactValueTokenSpec.php",
    "chars": 5694,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ExactValueTokenSpec extends ObjectBeh"
  },
  {
    "path": "spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php",
    "chars": 4676,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass IdenticalValueTokenSpec extends Objec"
  },
  {
    "path": "spec/Prophecy/Argument/Token/InArrayTokenSpec.php",
    "chars": 1105,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass InArrayTokenSpec extends ObjectBehavi"
  },
  {
    "path": "spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php",
    "chars": 2222,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\Token\\TokenInterface;\n"
  },
  {
    "path": "spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php",
    "chars": 1685,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\Token\\TokenInterface;\n"
  },
  {
    "path": "spec/Prophecy/Argument/Token/NotInArrayTokenSpec.php",
    "chars": 1108,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass NotInArrayTokenSpec extends ObjectBeh"
  },
  {
    "path": "spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php",
    "chars": 2147,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ObjectStateTokenSpec extends ObjectBe"
  },
  {
    "path": "spec/Prophecy/Argument/Token/StringContainsTokenSpec.php",
    "chars": 1282,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass StringContainsTokenSpec extends Objec"
  },
  {
    "path": "spec/Prophecy/Argument/Token/TypeTokenSpec.php",
    "chars": 1411,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Argument\\Token;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\Token\\TokenInterface;\n"
  },
  {
    "path": "spec/Prophecy/ArgumentSpec.php",
    "chars": 4107,
    "preview": "<?php\n\nnamespace spec\\Prophecy;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ArgumentSpec extends ObjectBehavior\n{\n    function i"
  },
  {
    "path": "spec/Prophecy/Call/CallCenterSpec.php",
    "chars": 7637,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Call;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Promise\\PromiseInterface;\nuse Prophecy\\Pr"
  },
  {
    "path": "spec/Prophecy/Call/CallSpec.php",
    "chars": 1806,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Call;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\ArgumentsWildcard;\n\nclass CallSp"
  },
  {
    "path": "spec/Prophecy/Comparator/ClosureComparatorSpec.php",
    "chars": 1206,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Comparator;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ClosureComparatorSpec extends ObjectBehav"
  },
  {
    "path": "spec/Prophecy/Comparator/FactorySpec.php",
    "chars": 910,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Comparator;\n\nuse PhpSpec\\Exception\\Example\\SkippingException;\nuse PhpSpec\\ObjectBehavior;"
  },
  {
    "path": "spec/Prophecy/Comparator/ProphecyComparatorSpec.php",
    "chars": 1499,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Comparator;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophet;\nuse SebastianBergmann\\Comp"
  },
  {
    "path": "spec/Prophecy/Doubler/CachedDoublerSpec.php",
    "chars": 16727,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\ClassPatch\\ClassPatchInterface"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php",
    "chars": 2558,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Doub"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php",
    "chars": 1060,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\Clas"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php",
    "chars": 3294,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\Clas"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php",
    "chars": 3612,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Doub"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php",
    "chars": 1278,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\Argu"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php",
    "chars": 3185,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Doub"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/ThrowablePatchSpec.php",
    "chars": 2445,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\Clas"
  },
  {
    "path": "spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php",
    "chars": 2254,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\ClassPatch;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Doub"
  },
  {
    "path": "spec/Prophecy/Doubler/DoublerSpec.php",
    "chars": 3881,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\ClassPatch\\ClassPatchInterface"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php",
    "chars": 19631,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\Argum"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php",
    "chars": 1127,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\ClassCodeG"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php",
    "chars": 2891,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/ArgumentTypeNodeSpec.php",
    "chars": 4131,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Exception\\Doubler\\Doubl"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php",
    "chars": 5682,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php",
    "chars": 4368,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/ReturnTypeNodeSpec.php",
    "chars": 5508,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Exception\\Doubler\\Doubl"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/Type/BuiltinTypeSpec.php",
    "chars": 582,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node\\Type;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/Type/IntersectionTypeSpec.php",
    "chars": 1790,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node\\Type;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/Type/ObjectTypeSpec.php",
    "chars": 618,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node\\Type;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\"
  },
  {
    "path": "spec/Prophecy/Doubler/Generator/Node/Type/UnionTypeSpec.php",
    "chars": 3152,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler\\Generator\\Node\\Type;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\"
  },
  {
    "path": "spec/Prophecy/Doubler/LazyDoubleSpec.php",
    "chars": 2451,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Doubler;\nuse Prophecy\\Prophecy"
  },
  {
    "path": "spec/Prophecy/Doubler/NameGeneratorSpec.php",
    "chars": 1955,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass NameGeneratorSpec extends ObjectBehavior\n{\n "
  },
  {
    "path": "spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php",
    "chars": 729,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Call;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\ObjectProphecy;\n\nclass"
  },
  {
    "path": "spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php",
    "chars": 599,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Doubler\\Generator\\Node\\Class"
  },
  {
    "path": "spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php",
    "chars": 573,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ClassMirrorExceptionSpec extends O"
  },
  {
    "path": "spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php",
    "chars": 557,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass ClassNotFoundExceptionSpec extends"
  },
  {
    "path": "spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php",
    "chars": 326,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass DoubleExceptionSpec extends Object"
  },
  {
    "path": "spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php",
    "chars": 514,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass InterfaceNotFoundExceptionSpec ext"
  },
  {
    "path": "spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php",
    "chars": 562,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass MethodNotExtendableExceptionSpec e"
  },
  {
    "path": "spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php",
    "chars": 860,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Doubler;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass MethodNotFoundExceptionSpec extend"
  },
  {
    "path": "spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php",
    "chars": 1789,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Exception\\Prediction\\Fail"
  },
  {
    "path": "spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php",
    "chars": 731,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\MethodProphecy;\n"
  },
  {
    "path": "spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php",
    "chars": 818,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Call\\Call;\nuse Prophecy\\P"
  },
  {
    "path": "spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php",
    "chars": 961,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Call\\Call;\nuse Prophecy\\P"
  },
  {
    "path": "spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php",
    "chars": 732,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Prophecy;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\MethodProphecy;\nus"
  },
  {
    "path": "spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php",
    "chars": 587,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Exception\\Prophecy;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\ObjectProphecy;\n\nc"
  },
  {
    "path": "spec/Prophecy/Prediction/CallPredictionSpec.php",
    "chars": 1338,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Argument\\Arg"
  },
  {
    "path": "spec/Prophecy/Prediction/CallTimesPredictionSpec.php",
    "chars": 1672,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Argument\\Arg"
  },
  {
    "path": "spec/Prophecy/Prediction/CallbackPredictionSpec.php",
    "chars": 843,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Call\\Call;\nuse Prophecy\\Prophecy\\Me"
  },
  {
    "path": "spec/Prophecy/Prediction/NoCallsPredictionSpec.php",
    "chars": 1382,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Prediction;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument\\ArgumentsWildcard;\nuse Pro"
  },
  {
    "path": "spec/Prophecy/Promise/CallbackPromiseSpec.php",
    "chars": 2330,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Promise;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\MethodProphecy;\nuse Prophecy\\"
  },
  {
    "path": "spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php",
    "chars": 951,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Promise;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\MethodProphecy;\nuse Prophecy\\"
  },
  {
    "path": "spec/Prophecy/Promise/ReturnPromiseSpec.php",
    "chars": 1494,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Promise;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\MethodProphecy;\nuse Prophecy\\"
  },
  {
    "path": "spec/Prophecy/Promise/ThrowPromiseSpec.php",
    "chars": 3712,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Promise;\n\nuse PhpSpec\\Exception\\Example\\SkippingException;\nuse PhpSpec\\ObjectBehavior;\nus"
  },
  {
    "path": "spec/Prophecy/Prophecy/MethodProphecySpec.php",
    "chars": 25780,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Prophecy;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Argument\\Argum"
  },
  {
    "path": "spec/Prophecy/Prophecy/ObjectProphecySpec.php",
    "chars": 10620,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Prophecy;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Argument\\Argum"
  },
  {
    "path": "spec/Prophecy/Prophecy/RevealerSpec.php",
    "chars": 1139,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Prophecy;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Prophecy\\ProphecyInterface;\n\nclass Re"
  },
  {
    "path": "spec/Prophecy/ProphetSpec.php",
    "chars": 3025,
    "preview": "<?php\n\nnamespace spec\\Prophecy;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Prophecy\\Argument\\ArgumentsWildc"
  },
  {
    "path": "spec/Prophecy/Util/StringUtilSpec.php",
    "chars": 2889,
    "preview": "<?php\n\nnamespace spec\\Prophecy\\Util;\n\nuse PhpSpec\\ObjectBehavior;\n\nclass StringUtilSpec extends ObjectBehavior\n{\n    fun"
  },
  {
    "path": "src/Prophecy/Argument/ArgumentsWildcard.php",
    "chars": 2435,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/AnyValueToken.php",
    "chars": 945,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/AnyValuesToken.php",
    "chars": 986,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/ApproximateValueToken.php",
    "chars": 1361,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/ArrayCountToken.php",
    "chars": 1853,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/ArrayEntryToken.php",
    "chars": 3961,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/ArrayEveryEntryToken.php",
    "chars": 1682,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/CallbackToken.php",
    "chars": 2019,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/ExactValueToken.php",
    "chars": 3180,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/IdenticalValueToken.php",
    "chars": 1522,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/InArrayToken.php",
    "chars": 1495,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/LogicalAndToken.php",
    "chars": 1847,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/LogicalNotToken.php",
    "chars": 1529,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/NotInArrayToken.php",
    "chars": 1503,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/ObjectStateToken.php",
    "chars": 2633,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/StringContainsToken.php",
    "chars": 1300,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/TokenInterface.php",
    "chars": 915,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument/Token/TypeToken.php",
    "chars": 1701,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Argument.php",
    "chars": 5491,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Call/Call.php",
    "chars": 3627,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Call/CallCenter.php",
    "chars": 8212,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Comparator/ClosureComparator.php",
    "chars": 1777,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Comparator/Factory.php",
    "chars": 1108,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Comparator/FactoryProvider.php",
    "chars": 918,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Comparator/ProphecyComparator.php",
    "chars": 1627,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/CachedDoubler.php",
    "chars": 1717,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php",
    "chars": 1132,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php",
    "chars": 2816,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/KeywordPatch.php",
    "chars": 1548,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php",
    "chars": 3813,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php",
    "chars": 3442,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php",
    "chars": 1454,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php",
    "chars": 3152,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php",
    "chars": 2413,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\ClassPatch;\n\nuse Prophecy\\Doubler\\Generator\\Node\\ClassNode;\nuse Prophecy\\Exception\\Dou"
  },
  {
    "path": "src/Prophecy/Doubler/ClassPatch/TraversablePatch.php",
    "chars": 3033,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/DoubleInterface.php",
    "chars": 481,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Doubler.php",
    "chars": 4305,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/ClassCodeGenerator.php",
    "chars": 3631,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/ClassCreator.php",
    "chars": 1656,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/ClassMirror.php",
    "chars": 11408,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/ArgumentNode.php",
    "chars": 3645,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php",
    "chars": 102,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node;\n\nclass ArgumentTypeNode extends TypeNodeAbstract {}\n"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/ClassNode.php",
    "chars": 5036,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/MethodNode.php",
    "chars": 5594,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php",
    "chars": 959,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node;\n\nuse Prophecy\\Doubler\\Generator\\Node\\Type\\BuiltinType;\n\nfinal class Re"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/Type/BuiltinType.php",
    "chars": 556,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node\\Type;\n\nfinal class BuiltinType implements SimpleType\n{\n    public funct"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/Type/IntersectionType.php",
    "chars": 1913,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node\\Type;\n\nuse Prophecy\\Exception\\Doubler\\DoubleException;\n\nfinal class Int"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/Type/ObjectType.php",
    "chars": 647,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node\\Type;\n\nfinal class ObjectType implements SimpleType\n{\n    /**\n     * @p"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/Type/SimpleType.php",
    "chars": 142,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node\\Type;\n\ninterface SimpleType extends TypeInterface\n{\n    public function"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/Type/TypeInterface.php",
    "chars": 164,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node\\Type;\n\ninterface TypeInterface extends \\Stringable\n{\n    public functio"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/Type/UnionType.php",
    "chars": 3437,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node\\Type;\n\nuse Prophecy\\Exception\\Doubler\\DoubleException;\n\nfinal class Uni"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php",
    "chars": 6877,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator\\Node;\n\nuse Prophecy\\Doubler\\Generator\\Node\\Type\\BuiltinType;\nuse Prophecy\\Do"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/ReflectionInterface.php",
    "chars": 497,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/Generator/TypeHintReference.php",
    "chars": 1009,
    "preview": "<?php\n\nnamespace Prophecy\\Doubler\\Generator;\n\n/**\n * Tells whether a keyword refers to a class or to a built-in type for"
  },
  {
    "path": "src/Prophecy/Doubler/LazyDouble.php",
    "chars": 3874,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Doubler/NameGenerator.php",
    "chars": 1210,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Call/UnexpectedCallException.php",
    "chars": 1252,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/ClassCreatorException.php",
    "chars": 813,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/ClassMirrorException.php",
    "chars": 845,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/ClassNotFoundException.php",
    "chars": 747,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/DoubleException.php",
    "chars": 424,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/DoublerException.php",
    "chars": 406,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php",
    "chars": 518,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/MethodNotExtendableException.php",
    "chars": 712,
    "preview": "<?php\n\nnamespace Prophecy\\Exception\\Doubler;\n\nclass MethodNotExtendableException extends DoubleException\n{\n    private $"
  },
  {
    "path": "src/Prophecy/Exception/Doubler/MethodNotFoundException.php",
    "chars": 1472,
    "preview": "<?php\n\n/*\n * This file is part of the Prophecy.\n * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n *     Marcello Duarte"
  }
]

// ... and 40 more files (download for full content)

About this extraction

This page contains the full source code of the phpspec/prophecy GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 240 files (512.9 KB), approximately 133.7k tokens, and a symbol index with 1433 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!