Skip to content

Commit

Permalink
Merge pull request #17802 from kamil-tekiela/indent2
Browse files Browse the repository at this point in the history
Fix indentation again
  • Loading branch information
MauricioFauth committed Oct 16, 2022
2 parents 335ba2e + 1650818 commit fd4cedd
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions libraries/classes/FieldMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,26 +228,26 @@ public function __construct(int $fieldType, int $fieldFlags, object $field)
{
$this->mappedType = $this->getTypeMap()[$fieldType] ?? null;

$this->isMultipleKey = (bool) ($fieldFlags & MYSQLI_MULTIPLE_KEY_FLAG);
$this->isPrimaryKey = (bool) ($fieldFlags & MYSQLI_PRI_KEY_FLAG);
$this->isUniqueKey = (bool) ($fieldFlags & MYSQLI_UNIQUE_KEY_FLAG);
$this->isNotNull = (bool) ($fieldFlags & MYSQLI_NOT_NULL_FLAG);
$this->isUnsigned = (bool) ($fieldFlags & MYSQLI_UNSIGNED_FLAG);
$this->isZerofill = (bool) ($fieldFlags & MYSQLI_ZEROFILL_FLAG);
$this->isBlob = (bool) ($fieldFlags & MYSQLI_BLOB_FLAG);
$this->isEnum = (bool) ($fieldFlags & MYSQLI_ENUM_FLAG);
$this->isSet = (bool) ($fieldFlags & MYSQLI_SET_FLAG);

// as flags 32768 can be NUM_FLAG or GROUP_FLAG
// reference: https://www.php.net/manual/en/mysqli-result.fetch-fields.php
// so check field type instead of flags
$this->isNumeric = $this->isType(self::TYPE_INT) || $this->isType(self::TYPE_REAL);

/*
MYSQLI_PART_KEY_FLAG => 'part_key',
MYSQLI_TIMESTAMP_FLAG => 'timestamp',
MYSQLI_AUTO_INCREMENT_FLAG => 'auto_increment',
*/
$this->isMultipleKey = (bool) ($fieldFlags & MYSQLI_MULTIPLE_KEY_FLAG);
$this->isPrimaryKey = (bool) ($fieldFlags & MYSQLI_PRI_KEY_FLAG);
$this->isUniqueKey = (bool) ($fieldFlags & MYSQLI_UNIQUE_KEY_FLAG);
$this->isNotNull = (bool) ($fieldFlags & MYSQLI_NOT_NULL_FLAG);
$this->isUnsigned = (bool) ($fieldFlags & MYSQLI_UNSIGNED_FLAG);
$this->isZerofill = (bool) ($fieldFlags & MYSQLI_ZEROFILL_FLAG);
$this->isBlob = (bool) ($fieldFlags & MYSQLI_BLOB_FLAG);
$this->isEnum = (bool) ($fieldFlags & MYSQLI_ENUM_FLAG);
$this->isSet = (bool) ($fieldFlags & MYSQLI_SET_FLAG);

// as flags 32768 can be NUM_FLAG or GROUP_FLAG
// reference: https://www.php.net/manual/en/mysqli-result.fetch-fields.php
// so check field type instead of flags
$this->isNumeric = $this->isType(self::TYPE_INT) || $this->isType(self::TYPE_REAL);

/*
MYSQLI_PART_KEY_FLAG => 'part_key',
MYSQLI_TIMESTAMP_FLAG => 'timestamp',
MYSQLI_AUTO_INCREMENT_FLAG => 'auto_increment',
*/

$this->isMappedTypeBit = $this->isType(self::TYPE_BIT);
$this->isMappedTypeGeometry = $this->isType(self::TYPE_GEOMETRY);
Expand Down

0 comments on commit fd4cedd

Please sign in to comment.