Skip to content

Commit

Permalink
Update psalm chore
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsmithies committed Jan 7, 2024
1 parent 9c54121 commit 8414b30
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 53 deletions.
2 changes: 1 addition & 1 deletion src/Commands/LaravelHashgraphCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LaravelHashgraphCommand extends Command

public $description = 'My command';

public function handle()
public function handle(): void
{
// LaravelHashgraphFacade::
// error_log($client->getBalance());
Expand Down
3 changes: 2 additions & 1 deletion src/Contracts/InscriptionMethodInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
interface InscriptionMethodInterface
{
/**
* @param MintInscription $request
* @param DeployInscription $request
*
* @return InscriptionResponse
*/
public function deployInscription(DeployInscription $request): InscriptionResponse;
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Client/HashgraphClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ public function claimNft(ClaimNft $claimNft): ClaimNftResponse {

/**
* HCS20 Inscription Methods
*
* @param DeployInscription $request
*/

public function deployInscription(DeployInscription $request): InscriptionResponse
{
$response = $this->guzzle->post('api/inscription/deploy', $request->forRequest());
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelHashgraphServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LaravelHashgraphServiceProvider extends ServiceProvider
{
const HASHGRAPH_SERVICE_NAME = 'hashgraph_trust';

public function boot()
public function boot(): void
{
if ($this->app->runningInConsole()) {
$this->publishes([
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/UpdateExplorerUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class UpdateExplorerUrl
{
public function handle(ConsensusMessageWasReceived $event)
public function handle(ConsensusMessageWasReceived $event): void
{
$event->consensus_message->update([
'explorer_url' => 'https://trust.enterprises/',
Expand Down
18 changes: 9 additions & 9 deletions src/Models/Inscriptions/BurnInscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,39 +58,39 @@ public function getTicker()
/**
* @param String|string $ticker
*/
public function setTicker($ticker)
public function setTicker($ticker): void
{
$this->ticker = $ticker;
}

/**
* @return String
* @return null|string
*/
public function getMemo()
public function getMemo(): string|null
{
return $this->memo;
}

/**
* @param String $memo
*/
public function setMemo($memo)
public function setMemo($memo): void
{
$this->memo = $memo;
}

/**
* @return String
* @return null|string
*/
public function getPrivateTopicId()
public function getPrivateTopicId(): string|null
{
return $this->topic_id;
}

/**
* @param String $topic_id
*/
public function setPrivateTopic($topic_id)
public function setPrivateTopic($topic_id): void
{
$this->topic_id = $topic_id;
}
Expand All @@ -106,7 +106,7 @@ public function getFrom()
/**
* @param string|string $from
*/
public function setFrom($from)
public function setFrom($from): void
{
$this->from = $from;
}
Expand All @@ -122,7 +122,7 @@ public function getAmount()
/**
* @param int|int $amount
*/
public function setAmount($amount)
public function setAmount($amount): void
{
$this->amount = $amount;
}
Expand Down
31 changes: 14 additions & 17 deletions src/Models/Inscriptions/DeployInscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getName()
/**
* @param String|string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
Expand All @@ -87,7 +87,7 @@ public function getTicker()
/**
* @param String|string $ticker
*/
public function setTicker($ticker)
public function setTicker($ticker): void
{
$this->ticker = $ticker;
}
Expand All @@ -103,71 +103,68 @@ public function getMax()
/**
* @param int|Integer $max
*/
public function setMax($max)
public function setMax($max): void
{
$this->max = $max;
}

/**
* @return int
*/
public function getLimit()
public function getLimit(): int|null
{
return $this->limit;
}

/**
* @param int $limit
*/
public function setLimit($limit)
public function setLimit($limit): void
{
$this->limit = $limit;
}

/**
* @return String
* @return null|string
*/
public function getMetadata()
public function getMetadata(): string|null
{
return $this->metadata;
}

/**
* @param String $metadata
*/
public function setMetadata($metadata)
public function setMetadata($metadata): void
{
$this->metadata = $metadata;
}

/**
* @return String
* @return null|string
*/
public function getMemo()
public function getMemo(): string|null
{
return $this->memo;
}

/**
* @param String $memo
*/
public function setMemo($memo)
public function setMemo($memo): void
{
$this->memo = $memo;
}

/**
* @return String
* @return null|string
*/
public function getPrivateTopicId()
public function getPrivateTopicId(): string|null
{
return $this->topic_id;
}

/**
* @param String $topic_id
*/
public function setPrivateTopic($topic_id)
public function setPrivateTopic($topic_id): void
{
$this->topic_id = $topic_id;
}
Expand Down
18 changes: 9 additions & 9 deletions src/Models/Inscriptions/MintInscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,39 +58,39 @@ public function getTicker()
/**
* @param String|string $ticker
*/
public function setTicker($ticker)
public function setTicker($ticker): void
{
$this->ticker = $ticker;
}

/**
* @return String
* @return null|string
*/
public function getMemo()
public function getMemo(): string|null
{
return $this->memo;
}

/**
* @param String $memo
*/
public function setMemo($memo)
public function setMemo($memo): void
{
$this->memo = $memo;
}

/**
* @return String
* @return null|string
*/
public function getPrivateTopicId()
public function getPrivateTopicId(): string|null
{
return $this->topic_id;
}

/**
* @param String $topic_id
*/
public function setPrivateTopic($topic_id)
public function setPrivateTopic($topic_id): void
{
$this->topic_id = $topic_id;
}
Expand All @@ -106,7 +106,7 @@ public function getTo()
/**
* @param string|string $to
*/
public function setTo($to)
public function setTo($to): void
{
$this->to = $to;
}
Expand All @@ -122,7 +122,7 @@ public function getAmount()
/**
* @param int|int $amount
*/
public function setAmount($amount)
public function setAmount($amount): void
{
$this->amount = $amount;
}
Expand Down
20 changes: 10 additions & 10 deletions src/Models/Inscriptions/TransferInscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,39 +63,39 @@ public function getTicker()
/**
* @param String|string $ticker
*/
public function setTicker($ticker)
public function setTicker($ticker): void
{
$this->ticker = $ticker;
}

/**
* @return String
* @return null|string
*/
public function getMemo()
public function getMemo(): string|null
{
return $this->memo;
}

/**
* @param String $memo
*/
public function setMemo($memo)
public function setMemo($memo): void
{
$this->memo = $memo;
}

/**
* @return String
* @return null|string
*/
public function getPrivateTopicId()
public function getPrivateTopicId(): string|null
{
return $this->topic_id;
}

/**
* @param String $topic_id
*/
public function setPrivateTopic($topic_id)
public function setPrivateTopic($topic_id): void
{
$this->topic_id = $topic_id;
}
Expand All @@ -111,7 +111,7 @@ public function getFrom()
/**
* @param string|string $from
*/
public function setFrom($from)
public function setFrom($from): void
{
$this->from = $from;
}
Expand All @@ -127,7 +127,7 @@ public function getTo()
/**
* @param string|string $to
*/
public function setTo($to)
public function setTo($to): void
{
$this->to = $to;
}
Expand All @@ -143,7 +143,7 @@ public function getAmount()
/**
* @param int|int $amount
*/
public function setAmount($amount)
public function setAmount($amount): void
{
$this->amount = $amount;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/TopicInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(string $memo, string $topic_id)
$this->topic_id = $topic_id;
}

public static function emptyTopic()
public static function emptyTopic(): self
{
return new self('', self::EMPTY_TOPIC_ID);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/ConvertToProofId.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ConvertToProofId
* @param $transaction_id
* @return string
*/
public static function create($transaction_id): string
public static function create(string $transaction_id): string
{
$split_tx = explode('@', $transaction_id);
$ts = explode('.', $split_tx[1]);
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Hmac.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Hmac
* @param $content
* @return string
*/
public static function generate($content): string
public static function generate(string $content): string
{
return hash_hmac('sha256', $content, config('hashgraph.secret_key'));
}
Expand Down

0 comments on commit 8414b30

Please sign in to comment.