From 005c201f86115979a67faa5b20fa6234cbfe4fd5 Mon Sep 17 00:00:00 2001 From: Fenikkusu Date: Tue, 19 Apr 2022 21:59:28 -0400 Subject: [PATCH] Reverting In Favor Of More Formal Fix --- phalcon/Db/Adapter/Pdo/Mysql.zep | 2 +- phalcon/Db/Index.zep | 14 ++------------ phalcon/Db/IndexInterface.zep | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/phalcon/Db/Adapter/Pdo/Mysql.zep b/phalcon/Db/Adapter/Pdo/Mysql.zep index 77c485cbea1..4a07dd5d4e7 100644 --- a/phalcon/Db/Adapter/Pdo/Mysql.zep +++ b/phalcon/Db/Adapter/Pdo/Mysql.zep @@ -539,7 +539,7 @@ class Mysql extends PdoAdapter } elseif index["Non_unique"] == 0 { let indexes[keyName]["type"] = "UNIQUE"; } else { - let indexes[keyName]["type"] = null; + let indexes[keyName]["type"] = ""; } } diff --git a/phalcon/Db/Index.zep b/phalcon/Db/Index.zep index 70fbc5d1b54..22c3810d14e 100644 --- a/phalcon/Db/Index.zep +++ b/phalcon/Db/Index.zep @@ -58,9 +58,9 @@ class Index implements IndexInterface /** * Index type * - * @var string|null + * @var string */ - protected type; + protected type { get }; /** * Phalcon\Db\Index constructor @@ -71,14 +71,4 @@ class Index implements IndexInterface let this->columns = columns; let this->type = type; } - - /** - * Index type - * - * @return string|null - */ - public function getType() -> string | null - { - return this->type; - } } diff --git a/phalcon/Db/IndexInterface.zep b/phalcon/Db/IndexInterface.zep index 973bd3df7a6..ec6e83611dd 100644 --- a/phalcon/Db/IndexInterface.zep +++ b/phalcon/Db/IndexInterface.zep @@ -28,5 +28,5 @@ interface IndexInterface /** * Gets the index type */ - public function getType() -> string | null; + public function getType() -> string; }