Skip to content

Commit bc98194

Browse files
authored
Merge pull request #58 from simPod/phpstan
Add PHPStan
2 parents 3ab102e + cc64fdf commit bc98194

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454
- composer config minimum-stability dev
5555
- travis_retry composer update -n --prefer-dist
5656

57+
- stage: Code Quality
58+
install: travis_retry composer install --prefer-dist
59+
script: vendor/bin/phpstan analyse -c phpstan.neon src
60+
5761
after_script:
5862
# upload clover.xml file to Scrutinizer to analyze it
5963
- |

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"ext-curl": "*"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^7.0"
20+
"phpunit/phpunit": "^7.0",
21+
"phpstan/phpstan": "^0.9.2"
2122
},
2223
"autoload": {
2324
"psr-4": {

phpstan.neon

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
includes:
2+
# Enable Level 1
3+
- vendor/phpstan/phpstan/conf/config.level1.neon

src/Exception/Exception.php

-5
This file was deleted.

src/Statement.php

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class Statement
3535
*/
3636
private $query;
3737

38+
/** @var mixed */
39+
private $format;
40+
3841
/**
3942
* @var string
4043
*/

tests/ClientTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace ClickHouseDB\Tests;
44

55
use ClickHouseDB\Client;
6-
use ClickHouseDB\Exception;
76
use ClickHouseDB\Exception\DatabaseException;
87
use ClickHouseDB\Exception\QueryException;
98
use ClickHouseDB\Query\WhereInFile;
@@ -24,9 +23,6 @@ class ClientTest extends TestCase
2423
{
2524
use WithClient;
2625

27-
/**
28-
* @throws Exception
29-
*/
3026
public function setUp()
3127
{
3228
date_default_timezone_set('Europe/Moscow');

0 commit comments

Comments
 (0)