Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions src/Utils/BufferedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,46 +38,36 @@ class BufferedQuery
* The query that is being processed.
*
* This field can be modified just by appending to it!
*
* @var string
*/
public $query = '';
public string $query = '';

/**
* The options of this parser.
*
* @var array<string, bool|string>
* @psalm-var array{delimiter?: non-empty-string, parse_delimiter?: bool, add_delimiter?: bool}
*/
public $options = [];
public array $options = [];

/**
* The last delimiter used.
*
* @var string
*/
public $delimiter;
public string $delimiter;

/**
* The length of the delimiter.
*
* @var int
*/
public $delimiterLen;
public int $delimiterLen;

/**
* The current status of the parser.
*
* @var int|null
*/
public $status;
public int|null $status = null;

/**
* The last incomplete query that was extracted.
*
* @var string
*/
public $current = '';
public string $current = '';

/**
* @param string $query the query to be parsed
Expand Down
6 changes: 3 additions & 3 deletions src/Utils/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Formatter
*
* @var array<string, bool|string|array<int, array<string, int|string>>>
*/
public $options;
public array $options;

/**
* Clauses that are usually short.
Expand All @@ -55,7 +55,7 @@ class Formatter
*
* @var array<string, bool>
*/
public static $shortClauses = [
public static array $shortClauses = [
'CREATE' => true,
'INSERT' => true,
];
Expand All @@ -67,7 +67,7 @@ class Formatter
*
* @var array<string, bool>
*/
public static $inlineClauses = [
public static array $inlineClauses = [
'CREATE' => true,
'INTO' => true,
'LIMIT' => true,
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Query
*
* @var string[]
*/
public static $functions = [
public static array $functions = [
'SUM',
'AVG',
'STD',
Expand Down Expand Up @@ -120,7 +120,7 @@ class Query
* union: false
* }
*/
public static $allFlags = [
public static array $allFlags = [
/*
* select ... DISTINCT ...
*/
Expand Down