Skip to content

Commit 786157f

Browse files
staabmclxmstaab
andauthored
Added initial Doctrine Dbal type inference (#115)
Co-authored-by: Markus Staab <[email protected]>
1 parent 06e607a commit 786157f

10 files changed

+608
-60
lines changed

.phpstan-dba.cache

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@
213213
'result' =>
214214
array (
215215
1 => NULL,
216+
2 => NULL,
216217
3 => NULL,
217218
),
218219
),
@@ -983,6 +984,148 @@
983984
'error' => NULL,
984985
'result' =>
985986
array (
987+
3 =>
988+
PHPStan\Type\Constant\ConstantArrayType::__set_state(array(
989+
'keyType' =>
990+
PHPStan\Type\UnionType::__set_state(array(
991+
'types' =>
992+
array (
993+
0 =>
994+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
995+
'value' => 0,
996+
)),
997+
1 =>
998+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
999+
'value' => 1,
1000+
)),
1001+
2 =>
1002+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1003+
'value' => 2,
1004+
)),
1005+
3 =>
1006+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1007+
'value' => 3,
1008+
)),
1009+
4 =>
1010+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1011+
'value' => 'adaid',
1012+
'isClassString' => false,
1013+
)),
1014+
5 =>
1015+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1016+
'value' => 'email',
1017+
'isClassString' => false,
1018+
)),
1019+
6 =>
1020+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1021+
'value' => 'freigabe1u1',
1022+
'isClassString' => false,
1023+
)),
1024+
7 =>
1025+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1026+
'value' => 'gesperrt',
1027+
'isClassString' => false,
1028+
)),
1029+
),
1030+
)),
1031+
'itemType' =>
1032+
PHPStan\Type\UnionType::__set_state(array(
1033+
'types' =>
1034+
array (
1035+
0 =>
1036+
PHPStan\Type\IntegerRangeType::__set_state(array(
1037+
'min' => -128,
1038+
'max' => 4294967295,
1039+
)),
1040+
1 =>
1041+
PHPStan\Type\StringType::__set_state(array(
1042+
)),
1043+
),
1044+
)),
1045+
'allArrays' => NULL,
1046+
'keyTypes' =>
1047+
array (
1048+
0 =>
1049+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1050+
'value' => 'email',
1051+
'isClassString' => false,
1052+
)),
1053+
1 =>
1054+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1055+
'value' => 0,
1056+
)),
1057+
2 =>
1058+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1059+
'value' => 'adaid',
1060+
'isClassString' => false,
1061+
)),
1062+
3 =>
1063+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1064+
'value' => 1,
1065+
)),
1066+
4 =>
1067+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1068+
'value' => 'gesperrt',
1069+
'isClassString' => false,
1070+
)),
1071+
5 =>
1072+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1073+
'value' => 2,
1074+
)),
1075+
6 =>
1076+
PHPStan\Type\Constant\ConstantStringType::__set_state(array(
1077+
'value' => 'freigabe1u1',
1078+
'isClassString' => false,
1079+
)),
1080+
7 =>
1081+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1082+
'value' => 3,
1083+
)),
1084+
),
1085+
'valueTypes' =>
1086+
array (
1087+
0 =>
1088+
PHPStan\Type\StringType::__set_state(array(
1089+
)),
1090+
1 =>
1091+
PHPStan\Type\StringType::__set_state(array(
1092+
)),
1093+
2 =>
1094+
PHPStan\Type\IntegerRangeType::__set_state(array(
1095+
'min' => 0,
1096+
'max' => 4294967295,
1097+
)),
1098+
3 =>
1099+
PHPStan\Type\IntegerRangeType::__set_state(array(
1100+
'min' => 0,
1101+
'max' => 4294967295,
1102+
)),
1103+
4 =>
1104+
PHPStan\Type\IntegerRangeType::__set_state(array(
1105+
'min' => -128,
1106+
'max' => 127,
1107+
)),
1108+
5 =>
1109+
PHPStan\Type\IntegerRangeType::__set_state(array(
1110+
'min' => -128,
1111+
'max' => 127,
1112+
)),
1113+
6 =>
1114+
PHPStan\Type\IntegerRangeType::__set_state(array(
1115+
'min' => -128,
1116+
'max' => 127,
1117+
)),
1118+
7 =>
1119+
PHPStan\Type\IntegerRangeType::__set_state(array(
1120+
'min' => -128,
1121+
'max' => 127,
1122+
)),
1123+
),
1124+
'nextAutoIndex' => 4,
1125+
'optionalKeys' =>
1126+
array (
1127+
),
1128+
)),
9861129
1 =>
9871130
PHPStan\Type\Constant\ConstantArrayType::__set_state(array(
9881131
'keyType' =>
@@ -1075,6 +1218,90 @@
10751218
array (
10761219
),
10771220
)),
1221+
2 =>
1222+
PHPStan\Type\Constant\ConstantArrayType::__set_state(array(
1223+
'keyType' =>
1224+
PHPStan\Type\UnionType::__set_state(array(
1225+
'types' =>
1226+
array (
1227+
0 =>
1228+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1229+
'value' => 0,
1230+
)),
1231+
1 =>
1232+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1233+
'value' => 1,
1234+
)),
1235+
2 =>
1236+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1237+
'value' => 2,
1238+
)),
1239+
3 =>
1240+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1241+
'value' => 3,
1242+
)),
1243+
),
1244+
)),
1245+
'itemType' =>
1246+
PHPStan\Type\UnionType::__set_state(array(
1247+
'types' =>
1248+
array (
1249+
0 =>
1250+
PHPStan\Type\IntegerRangeType::__set_state(array(
1251+
'min' => -128,
1252+
'max' => 4294967295,
1253+
)),
1254+
1 =>
1255+
PHPStan\Type\StringType::__set_state(array(
1256+
)),
1257+
),
1258+
)),
1259+
'allArrays' => NULL,
1260+
'keyTypes' =>
1261+
array (
1262+
0 =>
1263+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1264+
'value' => 0,
1265+
)),
1266+
1 =>
1267+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1268+
'value' => 1,
1269+
)),
1270+
2 =>
1271+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1272+
'value' => 2,
1273+
)),
1274+
3 =>
1275+
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1276+
'value' => 3,
1277+
)),
1278+
),
1279+
'valueTypes' =>
1280+
array (
1281+
0 =>
1282+
PHPStan\Type\StringType::__set_state(array(
1283+
)),
1284+
1 =>
1285+
PHPStan\Type\IntegerRangeType::__set_state(array(
1286+
'min' => 0,
1287+
'max' => 4294967295,
1288+
)),
1289+
2 =>
1290+
PHPStan\Type\IntegerRangeType::__set_state(array(
1291+
'min' => -128,
1292+
'max' => 127,
1293+
)),
1294+
3 =>
1295+
PHPStan\Type\IntegerRangeType::__set_state(array(
1296+
'min' => -128,
1297+
'max' => 127,
1298+
)),
1299+
),
1300+
'nextAutoIndex' => 4,
1301+
'optionalKeys' =>
1302+
array (
1303+
),
1304+
)),
10781305
),
10791306
),
10801307
'SELECT email, adaid, gesperrt, freigabe1u1 FROM ada LIMIT 1' =>

0 commit comments

Comments
 (0)