Skip to content

Commit f4050be

Browse files
committed
Drop php 5.6 support
1 parent 7dcdf09 commit f4050be

12 files changed

+31
-11
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 5.6
54
- 7.0
65
- 7.1
76

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^5.6.4 || ^7.0",
14+
"php": "^7.0",
1515
"illuminate/contracts": "5.3.* || 5.4.*",
1616
"illuminate/support": "5.3.* || 5.4.*",
1717
"graham-campbell/manager": "^2.5",

config/hashids.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
return [
1315

1416
/*

src/Facades/Hashids.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Hashids\Facades;
1315

1416
use Illuminate\Support\Facades\Facade;
@@ -25,7 +27,7 @@ class Hashids extends Facade
2527
*
2628
* @return string
2729
*/
28-
protected static function getFacadeAccessor()
30+
protected static function getFacadeAccessor(): string
2931
{
3032
return 'hashids';
3133
}

src/HashidsFactory.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Hashids;
1315

1416
use Hashids\Hashids;
@@ -27,7 +29,7 @@ class HashidsFactory
2729
*
2830
* @return \Hashids\Hashids
2931
*/
30-
public function make(array $config)
32+
public function make(array $config): Hashids
3133
{
3234
$config = $this->getConfig($config);
3335

@@ -43,7 +45,7 @@ public function make(array $config)
4345
*
4446
* @return array
4547
*/
46-
protected function getConfig(array $config)
48+
protected function getConfig(array $config): array
4749
{
4850
return [
4951
'salt' => array_get($config, 'salt', ''),
@@ -59,7 +61,7 @@ protected function getConfig(array $config)
5961
*
6062
* @return \Hashids\Hashids
6163
*/
62-
protected function getClient(array $config)
64+
protected function getClient(array $config): Hashids
6365
{
6466
return new Hashids($config['salt'], $config['length'], $config['alphabet']);
6567
}

src/HashidsManager.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Hashids;
1315

1416
use GrahamCampbell\Manager\AbstractManager;
17+
use Hashids\Hashids;
1518
use Illuminate\Contracts\Config\Repository;
1619

1720
/**
@@ -48,9 +51,9 @@ public function __construct(Repository $config, HashidsFactory $factory)
4851
*
4952
* @param array $config
5053
*
51-
* @return mixed
54+
* @return \Hashids\Hashids
5255
*/
53-
protected function createConnection(array $config)
56+
protected function createConnection(array $config): Hashids
5457
{
5558
return $this->factory->make($config);
5659
}
@@ -60,7 +63,7 @@ protected function createConnection(array $config)
6063
*
6164
* @return string
6265
*/
63-
protected function getConfigName()
66+
protected function getConfigName(): string
6467
{
6568
return 'hashids';
6669
}
@@ -70,7 +73,7 @@ protected function getConfigName()
7073
*
7174
* @return \Vinkla\Hashids\HashidsFactory
7275
*/
73-
public function getFactory()
76+
public function getFactory(): HashidsFactory
7477
{
7578
return $this->factory;
7679
}

src/HashidsServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Hashids;
1315

1416
use Hashids\Hashids;
@@ -116,7 +118,7 @@ protected function registerBindings()
116118
*
117119
* @return string[]
118120
*/
119-
public function provides()
121+
public function provides(): array
120122
{
121123
return [
122124
'hashids',

tests/AbstractTestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Tests\Hashids;
1315

1416
use GrahamCampbell\TestBench\AbstractPackageTestCase;

tests/Facades/HashidsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Tests\Hashids\Facades;
1315

1416
use GrahamCampbell\TestBenchCore\FacadeTrait;

tests/HashidsFactoryTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Tests\Hashids;
1315

1416
use Hashids\Hashids;

tests/HashidsManagerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Tests\Hashids;
1315

1416
use GrahamCampbell\TestBench\AbstractTestCase as AbstractTestBenchTestCase;

tests/ServiceProviderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Vinkla\Tests\Hashids;
1315

1416
use GrahamCampbell\TestBenchCore\ServiceProviderTrait;

0 commit comments

Comments
 (0)