Skip to content

Commit a4271a0

Browse files
committed
Code quality
1 parent 4bcebe3 commit a4271a0

File tree

5 files changed

+9
-31
lines changed

5 files changed

+9
-31
lines changed

bin/release.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected function replaceDocblockTags(string $version): void
148148

149149
$content = str_replace(
150150
['{DEPLOY_VERSION}', '__DEPLOY_VERSION__', '__LICENSE__', '${ORGANIZATION}', '{ORGANIZATION}'],
151-
[$version, $version, 'LGPL-2.0-or-later', 'LYRASOFT', 'LYRASOFT'],
151+
[$version, $version, 'MIT License', 'LYRASOFT', 'LYRASOFT'],
152152
$content
153153
);
154154

src/Autolink.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<?php
22

3-
/**
4-
* Part of php-autolink project.
5-
*
6-
* @copyright Copyright (C) 2015 LYRASOFT. All rights reserved.
7-
* @license MIT; See LICENSE.md
8-
*/
3+
declare(strict_types=1);
94

105
namespace Asika\Autolink;
116

src/AutolinkStatic.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<?php
2-
/**
3-
* Part of php-autolink project.
4-
*
5-
* @copyright Copyright (C) 2015 LYRASOFT. All rights reserved.
6-
* @license MIT; See LICENSE.md
7-
*/
2+
3+
declare(strict_types=1);
84

95
namespace Asika\Autolink;
106

src/HtmlBuilder.php

-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<?php
22

3-
/**
4-
* Part of autolink project.
5-
*
6-
* @copyright Copyright (C) 2022 __ORGANIZATION__.
7-
* @license LGPL-2.0-or-later
8-
*/
9-
103
declare(strict_types=1);
114

125
namespace Asika\Autolink;

src/LinkHelper.php

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<?php
2-
/**
3-
* Part of php-autolink project.
4-
*
5-
* @copyright Copyright (C) 2015 LYRASOFT. All rights reserved.
6-
* @license MIT; See LICENSE.md
7-
*/
2+
3+
declare(strict_types=1);
84

95
namespace Asika\Autolink;
106

@@ -20,7 +16,7 @@ class LinkHelper
2016
*
2117
* @var array
2218
*/
23-
protected static $defaultParsed = array(
19+
protected static array $defaultParsed = [
2420
'scheme' => null,
2521
'user' => null,
2622
'pass' => null,
@@ -29,11 +25,9 @@ class LinkHelper
2925
'path' => null,
3026
'query' => null,
3127
'fragment' => null
32-
);
28+
];
3329

3430
/**
35-
* shorten
36-
*
3731
* @param string $url
3832
* @param int $lastPartLimit
3933
* @param int $dots
@@ -42,7 +36,7 @@ class LinkHelper
4236
*
4337
* @since 1.1.1
4438
*/
45-
public static function shorten($url, $lastPartLimit = 15, $dots = 6)
39+
public static function shorten(string $url, int $lastPartLimit = 15, int $dots = 6): string
4640
{
4741
$parsed = array_merge(static::$defaultParsed, parse_url($url));
4842

0 commit comments

Comments
 (0)