Skip to content

Commit a852c60

Browse files
💄 Add typing
1 parent f94f876 commit a852c60

Some content is hidden

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

46 files changed

+145
-163
lines changed

SymfonyCustom/Sniffs/SniffHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SniffHelper
1818
*
1919
* @return bool
2020
*/
21-
public static function isNamespace(File $phpcsFile, $stackPtr)
21+
public static function isNamespace(File $phpcsFile, int $stackPtr): bool
2222
{
2323
$tokens = $phpcsFile->getTokens();
2424

@@ -37,7 +37,7 @@ public static function isNamespace(File $phpcsFile, $stackPtr)
3737
*
3838
* @return bool
3939
*/
40-
public static function isTraitUse(File $phpcsFile, $stackPtr)
40+
public static function isTraitUse(File $phpcsFile, int $stackPtr): bool
4141
{
4242
$tokens = $phpcsFile->getTokens();
4343

@@ -61,7 +61,7 @@ public static function isTraitUse(File $phpcsFile, $stackPtr)
6161
*
6262
* @return bool
6363
*/
64-
public static function isGlobalUse(File $phpcsFile, $stackPtr)
64+
public static function isGlobalUse(File $phpcsFile, int $stackPtr): bool
6565
{
6666
$tokens = $phpcsFile->getTokens();
6767

SymfonyCustom/Tests/Arrays/ArrayDeclarationUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ArrayDeclarationUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
7 => 2,
@@ -65,7 +65,7 @@ public function getErrorList()
6565
*
6666
* @return array<int, int>
6767
*/
68-
public function getWarningList()
68+
protected function getWarningList(): array
6969
{
7070
return [];
7171
}

SymfonyCustom/Tests/Classes/ClassDeclarationUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ClassDeclarationUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
4 => 1,
@@ -35,7 +35,7 @@ public function getErrorList()
3535
*
3636
* @return array(int => int)
3737
*/
38-
public function getWarningList()
38+
protected function getWarningList(): array
3939
{
4040
return [];
4141
}

SymfonyCustom/Tests/Classes/PropertyDeclarationUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PropertyDeclarationUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
9 => 1,
@@ -34,7 +34,7 @@ public function getErrorList()
3434
*
3535
* @return array(int => int)
3636
*/
37-
public function getWarningList()
37+
protected function getWarningList(): array
3838
{
3939
return [];
4040
}

SymfonyCustom/Tests/Commenting/ClassCommentUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ClassCommentUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
3 => 1,
@@ -34,7 +34,7 @@ public function getErrorList()
3434
*
3535
* @return array(int => int)
3636
*/
37-
protected function getWarningList()
37+
protected function getWarningList(): array
3838
{
3939
return [];
4040
}

SymfonyCustom/Tests/Commenting/DocCommentForbiddenTagsUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DocCommentForbiddenTagsUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
6 => 1,
@@ -39,7 +39,7 @@ public function getErrorList()
3939
*
4040
* @return array(int => int)
4141
*/
42-
protected function getWarningList()
42+
protected function getWarningList(): array
4343
{
4444
return [];
4545
}

SymfonyCustom/Tests/Commenting/DocCommentGroupSameTypeUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DocCommentGroupSameTypeUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
5 => 1,
@@ -44,7 +44,7 @@ public function getErrorList()
4444
*
4545
* @return array(int => int)
4646
*/
47-
protected function getWarningList()
47+
protected function getWarningList(): array
4848
{
4949
return [];
5050
}

SymfonyCustom/Tests/Commenting/DocCommentUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DocCommentUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
9 => 1,
@@ -44,7 +44,7 @@ public function getErrorList()
4444
*
4545
* @return array(int => int)
4646
*/
47-
protected function getWarningList()
47+
protected function getWarningList(): array
4848
{
4949
return [];
5050
}

SymfonyCustom/Tests/Commenting/FunctionCommentUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class FunctionCommentUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
5 => 1,
@@ -42,7 +42,7 @@ public function getErrorList()
4242
*
4343
* @return array(int => int)
4444
*/
45-
protected function getWarningList()
45+
protected function getWarningList(): array
4646
{
4747
return [];
4848
}

SymfonyCustom/Tests/Commenting/VariableCommentUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class VariableCommentUnitTest extends AbstractSniffUnitTest
1919
*
2020
* @return array<int, int>
2121
*/
22-
public function getErrorList()
22+
protected function getErrorList(): array
2323
{
2424
return [
2525
21 => 1,
@@ -42,7 +42,7 @@ public function getErrorList()
4242
*
4343
* @return array<int, int>
4444
*/
45-
public function getWarningList()
45+
protected function getWarningList(): array
4646
{
4747
return [];
4848
}

0 commit comments

Comments
 (0)