Skip to content

Commit 8616b81

Browse files
committed
Add missing return types in Mta class
1 parent f5b8026 commit 8616b81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Mta.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function __construct(
6767
$this->messageFactory = $messageFactory?? MessageFactoryDiscovery::find();
6868
}
6969

70-
public function getResource(string $resourceName)
70+
public function getResource(string $resourceName): Resource
7171
{
7272
$resource = $this->resources->findByName($resourceName);
7373

@@ -94,17 +94,17 @@ public static function doReturn(...$arguments): void
9494
echo Translator::toServer($arguments);
9595
}
9696

97-
public function callFunction(string $resourceName, string $function, array $arguments = null)
97+
public function callFunction(string $resourceName, string $function, array $arguments = null): ?array
9898
{
9999
$json_output = $arguments? Translator::toServer($arguments) : '';
100100
$path = sprintf('/%s/call/%s', $resourceName, $function);
101101
$result = $this->do_post_request($path, $json_output);
102102
$out = Translator::fromServer($result);
103103

104-
return $out?? false;
104+
return $out?? null;
105105
}
106106

107-
protected function do_post_request($path, $json_data)
107+
protected function do_post_request($path, $json_data): string
108108
{
109109
$request = RequestFactory::useMessageFactory($this->messageFactory);
110110
$request->setMethod('POST');

0 commit comments

Comments
 (0)