Skip to content

Commit 9e16d0e

Browse files
authored
Merge pull request #473 from kbsali/housekeeping
Housekeeping for v2.10.0-dev
2 parents 7d12a02 + ca9a2bb commit 9e16d0e

145 files changed

Lines changed: 853 additions & 236 deletions

File tree

Some content is hidden

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

.php-cs-fixer.dist.php

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,41 @@
11
<?php
22

3-
$finder = PhpCsFixer\Finder::create()
3+
declare(strict_types=1);
4+
5+
$finder = \PhpCsFixer\Finder::create()
46
->in(__DIR__)
57
->exclude([
68
'vendor',
79
])
810
;
911

10-
$config = new PhpCsFixer\Config();
11-
return $config->setRules([
12-
'@PER-CS2.0' => true,
13-
'@PER-CS2.0:risky' => true,
12+
return (new \PhpCsFixer\Config())
13+
->setRules([
14+
'@PER-CS3x0' => true,
15+
'@PER-CS3x0:risky' => true,
1416
'@PHPUnit100Migration:risky' => true,
15-
'array_syntax' => ['syntax' => 'short'],
1617
'linebreak_after_opening_tag' => true,
1718
'ordered_imports' => true,
19+
'no_empty_phpdoc' => true,
20+
'no_unused_imports' => true,
21+
'no_useless_return' => true,
22+
'return_assignment' => true,
23+
'simplified_null_return' => true,
24+
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
25+
'phpdoc_add_missing_param_annotation' => true,
26+
'phpdoc_indent' => true,
27+
'phpdoc_no_access' => true,
28+
'phpdoc_no_empty_return' => true,
29+
'phpdoc_order_by_value' => true,
1830
'phpdoc_order' => true,
31+
'phpdoc_param_order' => true,
32+
'phpdoc_separation' => ['skip_unlisted_annotations' => false],
33+
'phpdoc_trim_consecutive_blank_line_separation' => true,
34+
'phpdoc_trim' => true,
35+
'phpdoc_types' => true,
36+
'phpdoc_types_no_duplicates' => true,
37+
'phpdoc_var_annotation_correct_order' => true,
38+
'phpdoc_var_without_name' => true,
1939
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arguments', 'arrays']], // Remove this rule after dropping support for PHP 7.4
2040
])
2141
->setFinder($finder)

.phpstan.neon

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,3 @@ parameters:
66
- tests/
77

88
treatPhpDocTypesAsCertain: false
9-
10-
ignoreErrors:
11-
-
12-
# Ignore missing or imprecise parameter types for methods in tests
13-
message: '(^Method .+ has parameter .+ with no.* type specified.*\.$)'
14-
path: tests
15-
-
16-
# Ignore imprecise return types for methods in tests
17-
message: '(^Method .+ return type has no.* type specified.+\.$)'
18-
path: tests
19-
-
20-
# Ignore missing return types for methods in tests
21-
message: '(^Method .+ has no return type specified\.$)'
22-
path: tests

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kbsali/redmine-api",
3-
"version": "v2.9.1",
3+
"version": "v2.10.0-dev",
44
"type": "library",
55
"description": "Redmine API client",
66
"homepage": "https://github.com/kbsali/php-redmine-api",

src/Redmine/Api/AbstractApi.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ protected function delete($path)
235235
protected function isNotNull($var)
236236
{
237237
return
238-
false !== $var &&
239-
null !== $var &&
240-
'' !== $var &&
241-
!((is_array($var) || is_object($var)) && empty($var));
238+
false !== $var
239+
&& null !== $var
240+
&& '' !== $var
241+
&& !((is_array($var) || is_object($var)) && empty($var));
242242
}
243243

244244
/**

src/Redmine/Api/CustomField.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ final public function listNames(): array
107107
*
108108
* @deprecated v2.4.0 Use list() instead.
109109
* @see CustomField::list()
110-
*
111110
* @see http://www.redmine.org/projects/redmine/wiki/Rest_CustomFields#GET
112111
*
113112
* @param array<mixed> $params optional parameters to be passed to the api (offset, limit, ...)

src/Redmine/Api/Group.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ final public function listNames(): array
109109
*
110110
* @deprecated v2.4.0 Use list() instead.
111111
* @see Group::list()
112-
*
113112
* @see http://www.redmine.org/projects/redmine/wiki/Rest_Groups#GET
114113
*
115114
* @param array<mixed> $params optional parameters to be passed to the api (offset, limit, ...)
@@ -238,7 +237,7 @@ public function update(int $id, array $params = [])
238237
* available $params :
239238
* - include: a coma separated list of associations to include in the response: users,memberships
240239
*
241-
* @param int $id the group id
240+
* @param string|int $id the group id
242241
* @param array<mixed> $params params to pass to url
243242
*
244243
* @return array<mixed>|false|string information about the group as array or false|string on error

src/Redmine/Api/Issue.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ final public function list(array $params = []): array
140140
*
141141
* @deprecated v2.4.0 Use list() instead.
142142
* @see Issue::list()
143-
*
144143
* @see http://www.redmine.org/projects/redmine/wiki/Rest_Issues
145144
* available $params :
146145
* - offset: skip this number of issues in response (optional)

src/Redmine/Api/IssueCategory.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ final public static function fromHttpClient(HttpClient $httpClient): self
3030
}
3131

3232
/**
33-
* @var null|array<mixed>
34-
*/
33+
* @var null|array<mixed>
34+
*/
3535
private ?array $issueCategories = null;
3636

3737
/**
@@ -134,7 +134,6 @@ final public function listNamesByProject($projectIdentifier): array
134134
*
135135
* @deprecated v2.4.0 Use listByProject() instead.
136136
* @see IssueCategory::listByProject()
137-
*
138137
* @see http://www.redmine.org/projects/redmine/wiki/Rest_IssueCategories#GET
139138
*
140139
* @param string|int $project project id or literal identifier

src/Redmine/Api/IssuePriority.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ final public function list(array $params = []): array
7373
*
7474
* @deprecated v2.4.0 Use list() instead.
7575
* @see IssuePriority::list()
76-
*
7776
* @see http://www.redmine.org/projects/redmine/wiki/Rest_Enumerations#enumerationsissue_prioritiesformat
7877
*
7978
* @param array<mixed> $params optional parameters to be passed to the api (offset, limit, ...)

src/Redmine/Api/IssueRelation.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ final public function listByIssueId(int $issueId, array $params = []): array
7777
*
7878
* @deprecated v2.4.0 Use listByIssueId() instead.
7979
* @see IssueRelation::listByIssueId()
80-
*
8180
* @see http://www.redmine.org/projects/redmine/wiki/Rest_IssueRelations#GET
8281
*
8382
* @param int $issueId the issue id

0 commit comments

Comments
 (0)