Skip to content

Commit

Permalink
Apply fixes from StyleCI (#10)
Browse files Browse the repository at this point in the history
Co-authored-by: Amir Hossein Baghaie <amirbagh75@users.noreply.github.com>

Apply psr-12
  • Loading branch information
Amir Hossein Baghaie authored Nov 20, 2020
1 parent 9a3ae86 commit ad5fd31
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 72 deletions.
2 changes: 1 addition & 1 deletion src/Responses/CreditResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CreditResponse extends BaseResponse
* @var float
*/
public $credit;

public function __construct(bool $isSuccessful, string $message, float $credit)
{
$this->isSuccessful = $isSuccessful;
Expand Down
26 changes: 12 additions & 14 deletions src/Responses/Message.php
Original file line number Diff line number Diff line change
@@ -1,66 +1,64 @@
<?php


namespace Amirbagh75\SMSIR\Responses;


class Message
{
/**
* @var int
*/
public $id;

/**
* @var string
*/
public $lineNumber;

/**
* @var string
*/
public $SMSMessageBody;

/**
* @var string
*/
public $mobileNumber;

/**
* @var string
*/
public $toBeSentAt;

/**
* @var string
*/
public $nativeDeliveryStatus;

/**
* @var string
*/
public $typeOfMessage;

/**
* @var string
*/
public $sendAtLatin;

/**
* @var string
*/
public $sendAtJalali;

/**
* @var bool
*/
public $isChecked;

/**
* @var bool
*/
public $isError;

public function __construct(
int $id,
string $lineNumber,
Expand All @@ -86,4 +84,4 @@ public function __construct(
$this->isChecked = ($isChecked === false ? 0 : 1);
$this->isError = ($isError === false ? 0 : 1);
}
}
}
20 changes: 9 additions & 11 deletions src/Responses/ReceivedMessage.php
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
<?php


namespace Amirbagh75\SMSIR\Responses;


class ReceivedMessage
{
/**
* @var int
*/
public $id;

/**
* @var string
*/
public $lineNumber;

/**
* @var string
*/
public $SMSMessageBody;

/**
* @var string
*/
public $mobileNumber;


/**
* @var string
*/
public $typeOfMessage;

/**
* @var string
*/
public $receiveAtLatin;

/**
* @var string
*/
public $receiveAtJalali;

public function __construct(
int $id,
string $lineNumber,
Expand All @@ -59,4 +57,4 @@ public function __construct(
$this->receiveAtJalali = $receiveAtJalali;
$this->receiveAtLatin = $receiveAtLatin;
}
}
}
8 changes: 3 additions & 5 deletions src/Responses/ReceivedMessagesResponse.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
<?php


namespace Amirbagh75\SMSIR\Responses;


class ReceivedMessagesResponse extends BaseResponse
{
/**
* @var int
*/
public $countOfAll;

/**
* @var ReceivedMessage[]
*/
public $receivedMessage;

public function __construct(bool $isSuccessful, string $message, int $countOfAll, array $receivedMessage)
{
$this->isSuccessful = $isSuccessful;
$this->message = $message;
$this->countOfAll = $countOfAll;
$this->receivedMessage = $receivedMessage;
}
}
}
5 changes: 2 additions & 3 deletions src/Responses/SMSLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

namespace Amirbagh75\SMSIR\Responses;


class SMSLine
{
/**
* @var int
*/
public $id;

/**
* @var string
*/
public $lineNumber;

public function __construct(int $id, string $lineNumber)
{
$this->id = $id;
Expand Down
3 changes: 1 addition & 2 deletions src/Responses/SMSLinesResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

namespace Amirbagh75\SMSIR\Responses;


class SMSLinesResponse extends BaseResponse
{
/**
* @var SMSLine[]
*/
public $SMSLines;

public function __construct(bool $isSuccessful, string $message, array $SMSLines)
{
$this->isSuccessful = $isSuccessful;
Expand Down
6 changes: 3 additions & 3 deletions src/Responses/SendResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ class SendResponse extends BaseResponse
* @var SentMessage[]
*/
public $sentMessages;

/**
* @var string
*/
public $batchKey;

public function __construct(bool $isSuccessful, string $message, string $batchKey, array $sentMessages)
{
$this->isSuccessful = $isSuccessful;
$this->message = $message;
$this->batchKey = $batchKey;
$this->sentMessages = $sentMessages;
}
}
}
6 changes: 3 additions & 3 deletions src/Responses/SentMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ class SentMessage
* @var int
*/
public $id;

/**
* @var string
*/
public $mobileNumber;

public function __construct(int $id, string $mobileNumber)
{
$this->id = $id;
$this->mobileNumber = $mobileNumber;
}
}
}
8 changes: 3 additions & 5 deletions src/Responses/SentMessagesResponse.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
<?php


namespace Amirbagh75\SMSIR\Responses;


class SentMessagesResponse extends BaseResponse
{
/**
* @var int
*/
public $countOfAll;

/**
* @var Message[]
*/
public $messages;

public function __construct(bool $isSuccessful, string $message, int $countOfAll, array $messages)
{
$this->isSuccessful = $isSuccessful;
$this->message = $message;
$this->countOfAll = $countOfAll;
$this->messages = $messages;
}
}
}
6 changes: 2 additions & 4 deletions src/Responses/VerificationCodeResponse.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<?php


namespace Amirbagh75\SMSIR\Responses;


class VerificationCodeResponse extends BaseResponse
{
/**
* @var string
*/
public $verificationCodeId;

public function __construct(bool $isSuccessful, string $message, string $verificationCodeId)
{
$this->isSuccessful = $isSuccessful;
$this->message = $message;
$this->verificationCodeId = $verificationCodeId;
}
}
}
Loading

0 comments on commit ad5fd31

Please sign in to comment.