Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Jan 21, 2023
1 parent 3f70699 commit e548ba4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/PDO/Peachpie.Library.PDO/PDODriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public virtual string ClientVersion
public virtual DbConnection OpenConnection(ReadOnlySpan<char> dsn, string? user, string? password, PhpArray options)
{
var connection = this.DbFactory.CreateConnection();
if (connection == null)
{
throw new InvalidOperationException(nameof(connection));
}

connection.ConnectionString = this.BuildConnectionString(dsn, user, password, options);
connection.Open();
return connection;
Expand Down
3 changes: 1 addition & 2 deletions src/Peachpie.CodeAnalysis/FlowAnalysis/PHPDoc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ public static bool GetEntryText(this IDocEntry entry, out string text)
var str = entry.ToString().AsSpan().Trim();

// @tagname [text]
int i;


// @tagname
if (str.Length > 0 && str[0] == '@')
{
Expand Down

0 comments on commit e548ba4

Please sign in to comment.