Skip to content

Commit

Permalink
Merge pull request #6 from ppp0/debug-8.1
Browse files Browse the repository at this point in the history
Explicitely set some return types
  • Loading branch information
ppp0 authored Dec 15, 2022
2 parents 9b4a718 + 3ca0318 commit ec935ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea
.idea/
.phpunit.result.cache
vendor
composer.lock
10 changes: 2 additions & 8 deletions source/Mocka/Classes/OverridableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,9 @@ public function spy($methodName) {
}

/**
* @param string $name
* @param array $arguments
* @return mixed
* @throws Exception
*/
private function _callMethod($name, array $arguments) {
private function _callMethod(string $name, array $arguments): mixed {
$classDefinition = new ClassDefinition(__CLASS__);
$originalMethod = $classDefinition->findOriginalMethod($name);

Expand Down Expand Up @@ -111,12 +108,9 @@ private function _callMethod($name, array $arguments) {
}

/**
* @param string $name
* @param array $arguments
* @return mixed
* @throws Exception
*/
private static function _callStaticMethod($name, array $arguments) {
private static function _callStaticMethod(string $name, array $arguments): mixed {
$classDefinition = new ClassDefinition(get_called_class());
$originalMethod = $classDefinition->findOriginalMethod($name);

Expand Down

0 comments on commit ec935ec

Please sign in to comment.