@@ -24,12 +24,12 @@ public function setBoostWillBeDeleted(bool $value): void
2424 $ this ->boostWillBeDeleted = $ value ;
2525 }
2626
27- public function isContentBoosted (string $ languageCode = null ): bool
27+ public function isContentBoosted (? string $ languageCode = null ): bool
2828 {
2929 return $ this ->readContentCache ($ languageCode ) !== null ;
3030 }
3131
32- public function contentBoostedKey (string $ languageCode = null ): string
32+ public function contentBoostedKey (? string $ languageCode = null ): string
3333 {
3434 $ key = hash (BoostCache::hashalgo (), $ this ->id ()); // can not use UUID since content not loaded yet
3535 if (! $ languageCode ) {
@@ -42,7 +42,7 @@ public function contentBoostedKey(string $languageCode = null): string
4242 return $ key ;
4343 }
4444
45- public function isContentCacheExpiredByModified (string $ languageCode = null ): bool
45+ public function isContentCacheExpiredByModified (? string $ languageCode = null ): bool
4646 {
4747 $ cache = BoostCache::singleton ();
4848 if (! $ cache ) {
@@ -70,7 +70,7 @@ public function isContentCacheExpiredByModified(string $languageCode = null): bo
7070 return false ;
7171 }
7272
73- public function readContentCache (string $ languageCode = null ): ?array
73+ public function readContentCache (? string $ languageCode = null ): ?array
7474 {
7575 if ($ this ->checkModifiedTimestampForContentBoost ()) {
7676 if ($ this ->isContentCacheExpiredByModified ($ languageCode )) {
@@ -84,7 +84,7 @@ public function readContentCache(string $languageCode = null): ?array
8484 );
8585 }
8686
87- public function readContent (string $ languageCode = null ): array
87+ public function readContent (? string $ languageCode = null ): array
8888 {
8989 // read from boostedCache if exists
9090 $ data = option ('bnomei.boost.read ' ) === false || option ('debug ' ) ? null : $ this ->readContentCache ($ languageCode );
@@ -100,7 +100,7 @@ public function readContent(string $languageCode = null): array
100100 return $ data ;
101101 }
102102
103- public function writeContentCache (array $ data = null , string $ languageCode = null ): bool
103+ public function writeContentCache (? array $ data = null , ? string $ languageCode = null ): bool
104104 {
105105 $ cache = BoostCache::singleton ();
106106 if (! $ cache || option ('bnomei.boost.write ' ) === false ) {
@@ -129,7 +129,7 @@ public function writeContentCache(array $data = null, string $languageCode = nul
129129 );
130130 }
131131
132- public function writeContent (array $ data , string $ languageCode = null ): bool
132+ public function writeContent (array $ data , ? string $ languageCode = null ): bool
133133 {
134134 // write to file and cache
135135 return parent ::writeContent ($ data , $ languageCode ) &&
0 commit comments