Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed May 23, 2024
1 parent 15f52df commit c32f73b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
4 changes: 0 additions & 4 deletions src/Bases/BaseSQLServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,19 @@ public static function status(string $connection, int $loginTimeout = 3)
(new SQLServerValidator($data, $connection))->verify();

try {

$instance = new static((object) $data, $connection, $loginTimeout);

return new SQLServerStatus([
'status' => true,
'message' => 'Connection Successful',
'query' => $instance,
]);

} catch (\Throwable $th) {

return new SQLServerStatus([
'status' => false,
'message' => $th->getMessage(),
'query' => null,
]);

}
}
}
5 changes: 1 addition & 4 deletions src/Response/SQLServerResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
use Illuminate\Support\Collection;

/**
* Class SQLServerResponse
* Class SQLServerResponse.
*
* This class represents a response from a SQL Server query.
* It extends the Illuminate\Support\Collection class to leverage
* Laravel's powerful collection functionalities.
*
* @package Rmunate\SqlServerLite\Response
*/

class SQLServerResponse extends Collection
{
/**
Expand Down
5 changes: 1 addition & 4 deletions src/Response/SQLServerRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
namespace Rmunate\SqlServerLite\Response;

/**
* Class SQLServerRow
* Class SQLServerRow.
*
* This class represents a single row of data from a SQL Server query.
* It dynamically assigns properties based on the provided associative array.
*
* @package Rmunate\SqlServerLite\Response
*/

class SQLServerRow
{
/**
Expand Down
11 changes: 0 additions & 11 deletions src/Singleton/SQLServerSingleton.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ public static function mount($credentials, string $connection, int $loginTimeout
}

self::$instance[$connection] = $conection;

} catch (PDOException $e) {

throw SQLServerException::create($e->getMessage());

}
}

Expand Down Expand Up @@ -86,17 +83,13 @@ public static function beginTransaction()
public static function commit()
{
if (!empty(self::$instance)) {

foreach (self::$instance as $key => $instance) {
$instance->commit();
}

self::$beginTransaction = false;

} else {

throw SQLServerException::create('The connection to the database is not initialized.');

}
}

Expand All @@ -108,17 +101,13 @@ public static function commit()
public static function rollback()
{
if (!empty(self::$instance)) {

foreach (self::$instance as $key => $instance) {
$instance->rollBack();
}

self::$beginTransaction = false;

} else {

throw SQLServerException::create('The connection to the database is not initialized.');

}
}
}

0 comments on commit c32f73b

Please sign in to comment.