Skip to content

Commit d82d35e

Browse files
committed
Remove get_called_class
1 parent feea2ea commit d82d35e

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

Magento2/Sniffs/Functions/FunctionsDeprecatedWithoutArgumentSniff.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ class FunctionsDeprecatedWithoutArgumentSniff implements Sniff
3838
private const DEPRECATED_FUNCTIONS_AND_FIXES = [
3939
'mb_check_encoding' => 'null',
4040
'get_class' => '$this',
41-
'get_parent_class' => '$this',
42-
'get_called_class' => '$this'
41+
'get_parent_class' => '$this'
4342
];
4443

4544
/**

Magento2/Tests/Functions/FunctionsDeprecatedWithoutArgumentUnitTest.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ class FunctionsDeprecatedWithoutArgument
2525
get_class(), // Calling without argument is deprecated.
2626
get_class(new FunctionsDeprecatedWithoutArgument()),
2727
get_parent_class(), // Calling without argument is deprecated.
28-
get_parent_class('test-argument'),
29-
get_called_class(), // Calling without argument is deprecated.
30-
get_called_class('test-argument')
28+
get_parent_class('test-argument')
3129
];
3230
}
3331
}

Magento2/Tests/Functions/FunctionsDeprecatedWithoutArgumentUnitTest.inc.fixed

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ class FunctionsDeprecatedWithoutArgument
2525
get_class($this), // Calling without argument is deprecated.
2626
get_class(new FunctionsDeprecatedWithoutArgument()),
2727
get_parent_class($this), // Calling without argument is deprecated.
28-
get_parent_class('test-argument'),
29-
get_called_class($this), // Calling without argument is deprecated.
30-
get_called_class('test-argument')
28+
get_parent_class('test-argument')
3129
];
3230
}
3331
}

Magento2/Tests/Functions/FunctionsDeprecatedWithoutArgumentUnitTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public function getWarningList(): array
3030
return [
3131
23 => 1,
3232
25 => 1,
33-
27 => 1,
34-
29 => 1
33+
27 => 1
3534
];
3635
}
3736
}

0 commit comments

Comments
 (0)