@@ -82,7 +82,7 @@ public function __construct() {
8282 * @throws StaticDeployException
8383 */
8484 public static function getPath ( string $ name ): string {
85- if ( self ::$ instance === null ) {
85+ if ( ! self ::$ instance instanceof SiteInfo ) {
8686 self ::$ instance = new SiteInfo ();
8787 }
8888
@@ -114,7 +114,7 @@ public static function getPath( string $name ): string {
114114 * @throws StaticDeployException
115115 */
116116 public static function getUrl ( string $ name ): string {
117- if ( self ::$ instance === null ) {
117+ if ( ! self ::$ instance instanceof SiteInfo ) {
118118 self ::$ instance = new SiteInfo ();
119119 }
120120
@@ -139,15 +139,15 @@ public static function getUrl( string $name ): string {
139139 // TODO Use WP_Http 'curl_enabled' => $this->hasCurlSupport(),
140140 // didn't see the method vailable in WP_Http
141141 public static function hasCURLSupport (): bool {
142- if ( self ::$ instance === null ) {
142+ if ( ! self ::$ instance instanceof SiteInfo ) {
143143 self ::$ instance = new SiteInfo ();
144144 }
145145
146146 return extension_loaded ( 'curl ' );
147147 }
148148
149149 public static function isUploadsWritable (): bool {
150- if ( self ::$ instance === null ) {
150+ if ( ! self ::$ instance instanceof SiteInfo ) {
151151 self ::$ instance = new SiteInfo ();
152152 }
153153
@@ -160,7 +160,7 @@ public static function isUploadsWritable(): bool {
160160 }
161161
162162 public static function permalinksAreCompatible (): bool {
163- if ( self ::$ instance === null ) {
163+ if ( ! self ::$ instance instanceof SiteInfo ) {
164164 self ::$ instance = new SiteInfo ();
165165 }
166166
@@ -173,7 +173,7 @@ public static function permalinksAreCompatible(): bool {
173173 }
174174
175175 public static function getPermalinks (): string {
176- if ( self ::$ instance === null ) {
176+ if ( ! self ::$ instance instanceof SiteInfo ) {
177177 self ::$ instance = new SiteInfo ();
178178 }
179179
@@ -191,7 +191,7 @@ public static function getPermalinks(): string {
191191 * @throws StaticDeployException
192192 */
193193 public static function getSiteURLHost (): string {
194- if ( self ::$ instance === null ) {
194+ if ( ! self ::$ instance instanceof SiteInfo ) {
195195 self ::$ instance = new SiteInfo ();
196196 }
197197
@@ -219,7 +219,7 @@ public static function getSiteURLHost(): string {
219219 * @return mixed[]
220220 */
221221 public static function getAllInfo (): array {
222- if ( self ::$ instance === null ) {
222+ if ( ! self ::$ instance instanceof SiteInfo ) {
223223 self ::$ instance = new SiteInfo ();
224224 }
225225
0 commit comments