Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4adb9fba30 | ||
|
|
672931ee67 | ||
|
|
373a9aff2f | ||
|
|
4e3ceecac8 |
43
.eslintrc.js
Normal file
43
.eslintrc.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
module.exports = {
|
||||||
|
'env': {
|
||||||
|
'browser': true,
|
||||||
|
'es6': true,
|
||||||
|
'commonjs': true,
|
||||||
|
'jquery': true
|
||||||
|
},
|
||||||
|
'extends': 'eslint:recommended',
|
||||||
|
'parserOptions': {
|
||||||
|
'ecmaVersion': 6
|
||||||
|
},
|
||||||
|
'rules': {
|
||||||
|
'indent': [
|
||||||
|
'error',
|
||||||
|
'tab',
|
||||||
|
{
|
||||||
|
'SwitchCase': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'linebreak-style': [
|
||||||
|
'error',
|
||||||
|
'unix'
|
||||||
|
],
|
||||||
|
'quotes': [
|
||||||
|
'error',
|
||||||
|
'single'
|
||||||
|
],
|
||||||
|
'semi': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'no-console': 'off',
|
||||||
|
'no-unused-vars': [
|
||||||
|
'error', {
|
||||||
|
'vars': 'all',
|
||||||
|
'args': 'after-used',
|
||||||
|
'ignoreRestSiblings': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// Requires eslint >= v8.14.0
|
||||||
|
'no-constant-binary-expression': 'error'
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
<phar name="phpunit" version="^9.6" installed="9.6.13" location="./tools/phpunit" copy="false"/>
|
<phar name="phpunit" version="^9.6" installed="9.6.13" location="./tools/phpunit" copy="false"/>
|
||||||
<phar name="phpcbf" version="^3.7.2" installed="3.7.2" location="./tools/phpcbf" copy="false"/>
|
<phar name="phpcbf" version="^3.7.2" installed="3.7.2" location="./tools/phpcbf" copy="false"/>
|
||||||
<phar name="phpcs" version="^3.7.2" installed="3.7.2" location="./tools/phpcs" copy="false"/>
|
<phar name="phpcs" version="^3.7.2" installed="3.7.2" location="./tools/phpcs" copy="false"/>
|
||||||
<phar name="phpstan" version="^1.10.37" installed="1.10.37" location="./tools/phpstan" copy="false"/>
|
<phar name="phpstan" version="^1.10.37" installed="1.10.46" location="./tools/phpstan" copy="false"/>
|
||||||
<phar name="phan" version="^5.4.2" installed="5.4.2" location="./tools/phan" copy="false"/>
|
<phar name="phan" version="^5.4.2" installed="5.4.2" location="./tools/phan" copy="false"/>
|
||||||
<phar name="psalm" version="^5.15.0" installed="5.15.0" location="./tools/psalm" copy="false"/>
|
<phar name="psalm" version="^5.15.0" installed="5.16.0" location="./tools/psalm" copy="false"/>
|
||||||
<phar name="phpdox" version="^0.12.0" installed="0.12.0" location="./tools/phpdox" copy="false"/>
|
<phar name="phpdox" version="^0.12.0" installed="0.12.0" location="./tools/phpdox" copy="false"/>
|
||||||
<phar name="phpdocumentor" version="^3.4.2" installed="3.4.2" location="./tools/phpDocumentor" copy="false"/>
|
<phar name="phpdocumentor" version="^3.4.2" installed="3.4.3" location="./tools/phpDocumentor" copy="false"/>
|
||||||
<phar name="php-cs-fixer" version="^3.34.1" installed="3.34.1" location="./tools/php-cs-fixer" copy="false"/>
|
<phar name="php-cs-fixer" version="^3.34.1" installed="3.40.0" location="./tools/php-cs-fixer" copy="false"/>
|
||||||
</phive>
|
</phive>
|
||||||
|
|||||||
15
jsconfig.json
Normal file
15
jsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"target": "ES2020",
|
||||||
|
"jsx": "react",
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"strictFunctionTypes": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"**/node_modules/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
/home/clemens/.phive/phars/php-cs-fixer-3.34.1.phar
|
/home/clemens/.phive/phars/php-cs-fixer-3.40.0.phar
|
||||||
@@ -1 +1 @@
|
|||||||
/home/clemens/.phive/phars/phpdocumentor-3.4.2.phar
|
/home/clemens/.phive/phars/phpdocumentor-3.4.3.phar
|
||||||
@@ -1 +1 @@
|
|||||||
/home/clemens/.phive/phars/phpstan-1.10.37.phar
|
/home/clemens/.phive/phars/phpstan-1.10.46.phar
|
||||||
@@ -1 +1 @@
|
|||||||
/home/clemens/.phive/phars/psalm-5.15.0.phar
|
/home/clemens/.phive/phars/psalm-5.16.0.phar
|
||||||
@@ -115,6 +115,8 @@ echo "INSERT ALL COLUMN TYPES: "
|
|||||||
. "ERROR: " . $db->dbGetLastError(true) . "<br>";
|
. "ERROR: " . $db->dbGetLastError(true) . "<br>";
|
||||||
echo "<hr>";
|
echo "<hr>";
|
||||||
|
|
||||||
|
// test connectors: = , <> () for query detection
|
||||||
|
|
||||||
// convert placeholder tests
|
// convert placeholder tests
|
||||||
// ? -> $n
|
// ? -> $n
|
||||||
// :name -> $n
|
// :name -> $n
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ class DateTime
|
|||||||
} else {
|
} else {
|
||||||
$str = implode(', ', array_slice($formatted, 0, -1));
|
$str = implode(', ', array_slice($formatted, 0, -1));
|
||||||
if (!empty($formatted[count($formatted) - 1])) {
|
if (!empty($formatted[count($formatted) - 1])) {
|
||||||
$str .= ' and ' . $formatted[count($formatted) - 1];
|
$str .= ' and ' . (string)array_pop($formatted);
|
||||||
}
|
}
|
||||||
return $negative . $str;
|
return $negative . $str;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1318,14 +1318,14 @@ class IO
|
|||||||
// regex for params: only stand alone $number allowed
|
// regex for params: only stand alone $number allowed
|
||||||
// exclude all '' enclosed strings, ignore all numbers [note must start with digit]
|
// exclude all '' enclosed strings, ignore all numbers [note must start with digit]
|
||||||
// can have space/tab/new line
|
// can have space/tab/new line
|
||||||
// must have = , ( [equal, comma, opening round bracket]
|
// must have <> = , ( [not equal, equal, comma, opening round bracket]
|
||||||
// can have space/tab/new line
|
// can have space/tab/new line
|
||||||
// $ number with 1-9 for first and 0-9 for further digits
|
// $ number with 1-9 for first and 0-9 for further digits
|
||||||
// /s for matching new line in . list
|
// /s for matching new line in . list
|
||||||
// [disabled, we don't used ^ or $] /m for multi line match
|
// [disabled, we don't used ^ or $] /m for multi line match
|
||||||
// Matches in 1:, must be array_filtered to remove empty, count with array_unique
|
// Matches in 1:, must be array_filtered to remove empty, count with array_unique
|
||||||
preg_match_all(
|
preg_match_all(
|
||||||
'/(?:\'.*?\')?\s*(?:\?\?|[(=,])\s*(?:\d+|(?:\'.*?\')|(\$[1-9]{1}(?:[0-9]{1,})?))/s',
|
'/(?:\'.*?\')?\s*(?:\?\?|<>|[(=,])\s*(?:\d+|(?:\'.*?\')|(\$[1-9]{1}(?:[0-9]{1,})?))/s',
|
||||||
$query,
|
$query,
|
||||||
$match
|
$match
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user