Skip to content

Commit

Permalink
Merge pull request #20 from rmunate/V-1.X
Browse files Browse the repository at this point in the history
Add Support PHP 7.4
  • Loading branch information
rmunate authored Jul 7, 2023
2 parents d3cd061 + e1f2462 commit 7b63d31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/Bases/BaseSQLServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ abstract public function executeTransactionalProcedure(string $procedure, array
*
* @return mixed|null The first element of the response or null if the response is empty.
*/
abstract public function first(string $type = 'array'): mixed;
abstract public function first(string $type = 'array');

/**
* Return the last element of the response as an object.
Expand All @@ -168,7 +168,7 @@ abstract public function first(string $type = 'array'): mixed;
*
* @return mixed|null The last element of the response as an object or null if the response is empty or not an array.
*/
abstract public function last(string $type = 'array'): mixed;
abstract public function last(string $type = 'array');

/**
* Return a collection instance.
Expand All @@ -179,7 +179,7 @@ abstract public function last(string $type = 'array'): mixed;
*
* @return mixed The collection instance.
*/
abstract public function collect(string $type = 'array'): mixed;
abstract public function collect(string $type = 'array');

/**
* Return the final query.
Expand All @@ -188,7 +188,7 @@ abstract public function collect(string $type = 'array'): mixed;
*
* @return mixed The final query result.
*/
abstract public function get(string $type = 'array'): mixed;
abstract public function get(string $type = 'array');

/**
* Return the count of elements in the response.
Expand Down
8 changes: 4 additions & 4 deletions src/SQLServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ final public function executeTransactionalProcedure(string $procedure, array $pa
*
* @return mixed|null The first element of the response or null if the response is empty
*/
final public function first(string $type = 'array'): mixed
final public function first(string $type = 'array')
{
$data = ($this->isNonEmptyArray()) ? reset($this->response) : null;

Expand All @@ -431,7 +431,7 @@ final public function first(string $type = 'array'): mixed
*
* @return mixed|null The last element of the response as an object or null if the response is empty or not an array
*/
final public function last(string $type = 'array'): mixed
final public function last(string $type = 'array')
{
$data = ($this->isNonEmptyArray()) ? end($this->response) : null;

Expand All @@ -447,7 +447,7 @@ final public function last(string $type = 'array'): mixed
*
* @return mixed
*/
final public function collect(string $type = 'array'): mixed
final public function collect(string $type = 'array')
{
if (!$this->inLaravel()) {
throw new \Exception(Messages::outsideOfLaravel());
Expand All @@ -467,7 +467,7 @@ final public function collect(string $type = 'array'): mixed
*
* @return mixed
*/
final public function get(string $type = 'array'): mixed
final public function get(string $type = 'array')
{
$data = ($this->isNonEmptyArray()) ? $this->response : [];

Expand Down
8 changes: 4 additions & 4 deletions src/Support/Deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function check(array $tables = [])
*
* @deprecated Use the `first` method instead.
*/
public function firstObject(): mixed
public function firstObject()
{
if ($this->isNonEmptyArray()) {
$firstElement = reset($this->response);
Expand All @@ -94,7 +94,7 @@ public function firstObject(): mixed
*
* @deprecated Use the `last` method instead.
*/
public function lastObject(): mixed
public function lastObject()
{
if ($this->isNonEmptyArray()) {
$lastElement = end($this->response);
Expand All @@ -113,7 +113,7 @@ public function lastObject(): mixed
*
* @deprecated Use the `get` method instead.
*/
public function getObjects(): mixed
public function getObjects()
{
return ($this->isNonEmptyArray()) ? $this->toObject($this->response) : null;
}
Expand All @@ -126,7 +126,7 @@ public function getObjects(): mixed
*
* @deprecated Use the `get` method instead.
*/
public function getObject(): mixed
public function getObject()
{
return ($this->isNonEmptyArray()) ? $this->toObject($this->response) : null;
}
Expand Down

0 comments on commit 7b63d31

Please sign in to comment.