Skip to content

Commit

Permalink
Merge pull request #1 from localheinz/feature/abstract-or-final
Browse files Browse the repository at this point in the history
Enhancement: Implement AbstractOrFinalRule
  • Loading branch information
localheinz authored Nov 13, 2018
2 parents 16a0a11 + fb80aec commit 65950b4
Show file tree
Hide file tree
Showing 19 changed files with 1,726 additions and 1,246 deletions.
26 changes: 7 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## Unreleased

### Added

*

### Changed

*
For a full diff see (https://github.com/localheinz/phpstan-rules/compare/0.1.0...HEAD).

### Deprecated
## [`0.1.0`](https://github.com/localheinz/phpstan-rules/releases/tag/0.3.0)

*
For a full diff see [`362c7ea...0.1.0`](https://github.com/localheinz/phpstan-rules/compare/362c7ea...0.1.0).

### Removed

*

### Fixed

*
### Added

### Security
* added `Classes\AbstractOrFinalRule`, which reports an error when a non-anonymous
class is neither `abstract` nor `final`, ([#1](https://github.com/localheinz/phpstan-rules/pull/#1)), by [@localheinz](https://github.com/localheinz)

*
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@ Run
$ composer require localheinz/phpstan-rules
```

## Rules

This package provides the following rules for use with [`phpstan/phpstan`](https://github.com/phpstan/phpstan):

* [`Localheinz\PHPStan\Rules\Classes\AbstractOrFinal`](https://github.com/localheinz/phpstan-rules#classesabstractorfinal)

### `Classes\AbstractOrFinal`

This rule reports an error when a non-anonymous class is neither `abstract` nor `final`.

## Usage

Add the rule of your choice to your `phpstan.neon`:

```neon
rules:
- Localheinz\PHPStan\Rules\Classes\AbstractOrFinalRule
```

## Changelog

Please have a look at [`CHANGELOG.md`](CHANGELOG.md).
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
}
],
"require": {
"php": "^7.1"
"php": "^7.1",
"nikic/php-parser": "^4.1.0",
"phpstan/phpstan": "~0.10.5"
},
"require-dev": {
"infection/infection": "~0.11.1",
"localheinz/composer-normalize": "~0.9.0",
"localheinz/php-cs-fixer-config": "~1.15.0",
"localheinz/test-util": "~0.7.0",
"phpstan/phpstan": "~0.10.5",
"phpstan/phpstan-strict-rules": "~0.10.1",
"phpunit/phpunit": "^7.4.3"
},
Expand Down
Loading

0 comments on commit 65950b4

Please sign in to comment.