File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ includes:
33 - phpstan-baseline.neon
44
55parameters :
6- level : 7
6+ level : 8
77 paths :
88 - src
99 - tests
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ trait UsesSubscriptions
1414{
1515 /**
1616 * User Subscription
17- * @var mixed[] |null
17+ * @var array<string, mixed> |null
1818 */
1919 protected $ subscription = null ;
2020
@@ -49,7 +49,7 @@ public function subscription(): ?array
4949 */
5050 public function hasSubscription (): bool
5151 {
52- return $ this ->subscription () && $ this ->subscription ['status ' ] !== \Leaf \Billing \Subscription::STATUS_CANCELLED ;
52+ return $ this ->subscription () && ( $ this ->subscription ['status ' ] ?? null ) !== \Leaf \Billing \Subscription::STATUS_CANCELLED ;
5353 }
5454
5555 /**
@@ -58,7 +58,7 @@ public function hasSubscription(): bool
5858 */
5959 public function hasActiveSubscription (): bool
6060 {
61- return $ this ->subscription () && ($ this ->subscription ['status ' ] === \Leaf \Billing \Subscription::STATUS_ACTIVE || $ this ->subscription ['status ' ] === \Leaf \Billing \Subscription::STATUS_TRIAL );
61+ return $ this ->subscription () && (( $ this ->subscription ['status ' ] ?? null ) === \Leaf \Billing \Subscription::STATUS_ACTIVE || ( $ this ->subscription ['status ' ] ?? null ) === \Leaf \Billing \Subscription::STATUS_TRIAL );
6262 }
6363
6464 /**
You can’t perform that action at this time.
0 commit comments