Skip to content

Commit fb7b473

Browse files
gmponosdbu
authored andcommitted
Declare strict types (#375)
* Enable strict rule and allow risky rules * Added phpunit cache to gitignore * Fix codestyle issues
1 parent 297bf2f commit fb7b473

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+109
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.phpunit.result.cache
12
/.php_cs.cache
23
/behat.yml
34
/build/

.php_cs.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ $finder = PhpCsFixer\Finder::create()
77
;
88

99
return PhpCsFixer\Config::create()
10+
->setRiskyAllowed(true)
1011
->setRules([
1112
'@Symfony' => true,
1213
'array_syntax' => ['syntax' => 'short'],
14+
'declare_strict_types' => true,
1315
'visibility_required' => [
1416
'elements' => [
1517
'const',

src/ClientFactory/AutoDiscoveryFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
use Http\Discovery\HttpClientDiscovery;

src/ClientFactory/BuzzFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
use Buzz\Client\FileGetContents;

src/ClientFactory/ClientFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
use Http\Client\HttpClient;

src/ClientFactory/CurlFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
use Http\Client\Curl\Client;

src/ClientFactory/DummyClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
@trigger_error('The '.__NAMESPACE__.'\DummyClient interface is deprecated since version 1.7 and will be removed in 2.0.', E_USER_DEPRECATED);

src/ClientFactory/Guzzle5Factory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
use GuzzleHttp\Client;

src/ClientFactory/Guzzle6Factory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
use Http\Adapter\Guzzle6\Client;

src/ClientFactory/MockFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\HttplugBundle\ClientFactory;
46

57
use Http\Client\HttpClient;

0 commit comments

Comments
 (0)