fix: phpstan level=6
This commit is contained in:
parent
acbf2c847d
commit
48269bd424
41 changed files with 324 additions and 347 deletions
|
|
@ -124,7 +124,7 @@ class SQLStatementExtractor {
|
|||
* @param string $string The string to check in (haystack).
|
||||
* @return boolean True if $string ends with $check, or they are equal, or $check is empty.
|
||||
*/
|
||||
protected static function endsWith(string $check, $string) {
|
||||
protected static function endsWith(string $check, string $string) {
|
||||
if ($check === "" || $check === $string) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -136,7 +136,7 @@ class SQLStatementExtractor {
|
|||
* a natural way of getting a subtring, php's circular string buffer and strange
|
||||
* return values suck if you want to program strict as of C or friends
|
||||
*/
|
||||
protected static function substring($string, $startpos, $endpos = -1) {
|
||||
protected static function substring(string $string, int $startpos, int $endpos = -1) {
|
||||
$len = strlen($string);
|
||||
$endpos = (int) (($endpos === -1) ? $len-1 : $endpos);
|
||||
if ($startpos > $len-1 || $startpos < 0) {
|
||||
|
|
@ -157,9 +157,9 @@ class SQLStatementExtractor {
|
|||
* Convert string buffer into array of lines.
|
||||
*
|
||||
* @param string $buffer
|
||||
* @return array string[] lines of file.
|
||||
* @return string[] lines of file.
|
||||
*/
|
||||
protected static function getLines($buffer) {
|
||||
protected static function getLines(string $buffer): array {
|
||||
$lines = preg_split("/\r?\n|\r/", $buffer);
|
||||
return $lines;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue