@@ -64,11 +64,12 @@ trait QueryCacheModule
6464 /**
6565 * Get the cache from the current query.
6666 *
67+ * @param string $method
6768 * @param array $columns
6869 * @param string|null $id
6970 * @return array
7071 */
71- public function getFromQueryCache (string $ method = 'get ' , $ columns = ['* ' ], $ id = null )
72+ public function getFromQueryCache (string $ method = 'get ' , array $ columns = ['* ' ], string $ id = null )
7273 {
7374 if (is_null ($ this ->columns )) {
7475 $ this ->columns = $ columns ;
@@ -90,11 +91,11 @@ public function getFromQueryCache(string $method = 'get', $columns = ['*'], $id
9091 * Get the query cache callback.
9192 *
9293 * @param string $method
93- * @param array $columns
94+ * @param array|string $columns
9495 * @param string|null $id
9596 * @return \Closure
9697 */
97- public function getQueryCacheCallback (string $ method = 'get ' , $ columns = ['* ' ], $ id = null )
98+ public function getQueryCacheCallback (string $ method = 'get ' , $ columns = ['* ' ], string $ id = null )
9899 {
99100 return function () use ($ method , $ columns ) {
100101 $ this ->avoidCache = true ;
@@ -111,7 +112,7 @@ public function getQueryCacheCallback(string $method = 'get', $columns = ['*'],
111112 * @param string|null $appends
112113 * @return string
113114 */
114- public function getCacheKey (string $ method = 'get ' , $ id = null , $ appends = null ): string
115+ public function getCacheKey (string $ method = 'get ' , string $ id = null , string $ appends = null ): string
115116 {
116117 $ key = $ this ->generateCacheKey ($ method , $ id , $ appends );
117118 $ prefix = $ this ->getCachePrefix ();
@@ -127,7 +128,7 @@ public function getCacheKey(string $method = 'get', $id = null, $appends = null)
127128 * @param string|null $appends
128129 * @return string
129130 */
130- public function generateCacheKey (string $ method = 'get ' , $ id = null , $ appends = null ): string
131+ public function generateCacheKey (string $ method = 'get ' , string $ id = null , string $ appends = null ): string
131132 {
132133 $ key = $ this ->generatePlainCacheKey ($ method , $ id , $ appends );
133134
@@ -146,7 +147,7 @@ public function generateCacheKey(string $method = 'get', $id = null, $appends =
146147 * @param string|null $appends
147148 * @return string
148149 */
149- public function generatePlainCacheKey (string $ method = 'get ' , $ id = null , $ appends = null ): string
150+ public function generatePlainCacheKey (string $ method = 'get ' , string $ id = null , string $ appends = null ): string
150151 {
151152 $ name = $ this ->connection ->getName ();
152153
0 commit comments