Skip to content

Commit 4babc92

Browse files
committed
Use phpstan
1 parent 0202907 commit 4babc92

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ install:
1313
- travis_retry composer install --no-interaction --prefer-source
1414

1515
script:
16-
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
16+
- vendor/bin/phpstan analyze src/ tests/ --level max
17+
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
1718

1819
after_success:
1920
- travis_retry php vendor/bin/php-coveralls -v

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Build Status](https://travis-ci.com/Sevavietl/Arrays.svg?branch=master)](https://travis-ci.com/Sevavietl/Arrays)
44
[![Coverage Status](https://coveralls.io/repos/github/Sevavietl/Arrays/badge.svg)](https://coveralls.io/github/Sevavietl/Arrays)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6+
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
67

78
This is a collection of array wrappers.
89

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=7.2",
17-
"phpunit/phpunit": "^8.0"
16+
"php": ">=7.2"
1817
},
1918
"require-dev": {
20-
"php-coveralls/php-coveralls": "^2.1"
19+
"php-coveralls/php-coveralls": "^2.1",
20+
"phpunit/phpunit": "^8.0",
21+
"phpstan/phpstan": "^0.11.2"
2122
},
2223
"autoload": {
2324
"psr-4": {

src/CompositeKeyArray.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ class CompositeKeyArray extends BaseArray
66
{
77
protected $offsets;
88

9+
private $value;
10+
911
public function offsetExists($offset)
1012
{
1113
$this->setOffsets($offset);

tests/unit/BaseArrayTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function instantiationThrowsExceptionDataProvider(): array
3939
return [
4040
[1],
4141
['foo'],
42-
[new \StdClass],
42+
[new \stdClass],
4343
];
4444
}
4545

0 commit comments

Comments
 (0)