Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Mark classes as final #118

Merged
merged 1 commit into from
Feb 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`0.6.0...master`][0.6.0...master].
For a full diff see [`0.6.1...master`][0.6.1...master].

## [`0.6.1`][0.6.1]

For a full diff see [`0.6.0...0.6.1`][0.6.0...0.6.1].

### Changed

* Marked classes as `final` ([#118]), by [@localheinz]

## [`0.6.0`][0.6.0]

Expand Down Expand Up @@ -76,6 +84,7 @@ For a full diff see [`afd6fd9...0.1`][afd6fd9...0.1].
[0.5.0]: https://github.com/Jan0707/phpstan-prophecy/releases/tag/0.5.0
[0.5.1]: https://github.com/Jan0707/phpstan-prophecy/releases/tag/0.5.1
[0.6.0]: https://github.com/Jan0707/phpstan-prophecy/releases/tag/0.6.0
[0.6.1]: https://github.com/Jan0707/phpstan-prophecy/releases/tag/0.6.1

[afd6fd9...0.1]: https://github.com/Jan0707/phpstan-prophecy/compare/afd6fd9...0.1
[0.1...0.1.1]: https://github.com/Jan0707/phpstan-prophecy/compare/0.1...0.1.1
Expand All @@ -88,12 +97,14 @@ For a full diff see [`afd6fd9...0.1`][afd6fd9...0.1].
[0.4.2...0.5.0]: https://github.com/Jan0707/phpstan-prophecy/compare/0.4.2...0.5.0
[0.5.0...0.5.1]: https://github.com/Jan0707/phpstan-prophecy/compare/0.5.0...0.5.1
[0.5.1...0.6.0]: https://github.com/Jan0707/phpstan-prophecy/compare/0.5.1...0.6.0
[0.6.0...master]: https://github.com/Jan0707/phpstan-prophecy/compare/0.6.0...master
[0.6.0...0.6.1]: https://github.com/Jan0707/phpstan-prophecy/compare/0.6.0...0.6.0
[0.6.1...master]: https://github.com/Jan0707/phpstan-prophecy/compare/0.6.1...master

[#67]: https://github.com/Jan0707/phpstan-prophecy/pull/67
[#79]: https://github.com/Jan0707/phpstan-prophecy/pull/79
[#92]: https://github.com/Jan0707/phpstan-prophecy/pull/92
[#94]: https://github.com/Jan0707/phpstan-prophecy/pull/94
[#118]: https://github.com/Jan0707/phpstan-prophecy/pull/118

[@localheinz]: https://github.com/localheinz
[@PedroTroller]: https://github.com/PedroTroller
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use PHPStan\Reflection;
use PHPStan\Type;

class ObjectProphecyRevealDynamicReturnTypeExtension implements Type\DynamicMethodReturnTypeExtension
final class ObjectProphecyRevealDynamicReturnTypeExtension implements Type\DynamicMethodReturnTypeExtension
{
public function getClass(): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use PHPStan\ShouldNotHappenException;
use PHPStan\Type;

class ObjectProphecyWillExtendOrImplementDynamicReturnTypeExtension implements Type\DynamicMethodReturnTypeExtension
final class ObjectProphecyWillExtendOrImplementDynamicReturnTypeExtension implements Type\DynamicMethodReturnTypeExtension
{
public function getClass(): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use PHPStan\ShouldNotHappenException;
use PHPStan\Type;

class ProphetProphesizeDynamicReturnTypeExtension implements Type\DynamicMethodReturnTypeExtension
final class ProphetProphesizeDynamicReturnTypeExtension implements Type\DynamicMethodReturnTypeExtension
{
private $className;

Expand Down
2 changes: 1 addition & 1 deletion src/PhpDoc/TypeNodeResolverExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use PHPStan\Type;
use Prophecy\Prophecy\ObjectProphecy;

class TypeNodeResolverExtension implements PhpDoc\TypeNodeResolverAwareExtension, PhpDoc\TypeNodeResolverExtension
final class TypeNodeResolverExtension implements PhpDoc\TypeNodeResolverAwareExtension, PhpDoc\TypeNodeResolverExtension
{
/**
* @var PhpDoc\TypeNodeResolver
Expand Down
2 changes: 1 addition & 1 deletion src/Reflection/ObjectProphecyMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use PHPStan\Type;
use Prophecy\Prophecy;

class ObjectProphecyMethodReflection implements Reflection\MethodReflection
final class ObjectProphecyMethodReflection implements Reflection\MethodReflection
{
private $declaringClass;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use PHPStan\Reflection;

class ProphecyMethodsClassReflectionExtension implements Reflection\MethodsClassReflectionExtension
final class ProphecyMethodsClassReflectionExtension implements Reflection\MethodsClassReflectionExtension
{
public function hasMethod(Reflection\ClassReflection $classReflection, string $methodName): bool
{
Expand Down
4 changes: 2 additions & 2 deletions src/Type/ObjectProphecyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

use PHPStan\Type;

class ObjectProphecyType extends Type\ObjectType
final class ObjectProphecyType extends Type\ObjectType
{
/**
* @var string[]
*/
protected $prophesizedClasses;
private $prophesizedClasses;

public function __construct(string ...$prophesizedClasses)
{
Expand Down