File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ public function getColumns(string $table): array
145145 'table ' => $ table ,
146146 'nativetype ' => strtoupper ($ type [0 ]),
147147 'size ' => isset ($ type [1 ]) ? (int ) $ type [1 ] : null ,
148- 'nullable ' => $ row ['notnull ' ] == ' 0 ' ,
148+ 'nullable ' => $ row ['notnull ' ] === 0 ,
149149 'default ' => $ row ['dflt_value ' ],
150150 'autoincrement ' => $ meta && preg_match ($ pattern , (string ) $ meta ['sql ' ]),
151151 'primary ' => $ row ['pk ' ] > 0 ,
@@ -176,7 +176,7 @@ public function getIndexes(string $table): array
176176 foreach ($ indexes as $ index => $ values ) {
177177 $ column = $ indexes [$ index ]['columns ' ][0 ];
178178 foreach ($ columns as $ info ) {
179- if ($ column == $ info ['name ' ]) {
179+ if ($ column === $ info ['name ' ]) {
180180 $ indexes [$ index ]['primary ' ] = (bool ) $ info ['primary ' ];
181181 break ;
182182 }
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ public function getPrimaryAutoincrementKey(string $table): ?string
8686
8787 // Search for autoincrement key from simple primary key
8888 foreach ($ this ->getColumns ($ table ) as $ column ) {
89- if ($ column ['name ' ] == $ primaryKey ) {
89+ if ($ column ['name ' ] === $ primaryKey ) {
9090 return $ column ['autoincrement ' ] ? $ column ['name ' ] : null ;
9191 }
9292 }
You can’t perform that action at this time.
0 commit comments