Skip to content

Commit ee65d37

Browse files
committed
Run tests at level 10
1 parent 3133f41 commit ee65d37

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ parameters:
66

77
# Should not need to edit anything below here
88
# Rule Level: https://phpstan.org/user-guide/rule-levels
9-
level: 9
9+
level: 10

src/ConvertKit_API_Traits.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,10 +867,22 @@ public function get_subscriber_id(string $email_address)
867867
return false;
868868
}
869869

870+
if (!is_array($subscribers->subscribers)) {
871+
return false;
872+
}
873+
870874
if (!count($subscribers->subscribers)) {
871875
return false;
872876
}
873877

878+
if (!$subscribers->subscribers[0] instanceof \stdClass) {
879+
return false;
880+
}
881+
882+
if (!is_int($subscribers->subscribers[0]->id)) {
883+
return false;
884+
}
885+
874886
// Return the subscriber's ID.
875887
return $subscribers->subscribers[0]->id;
876888
}

0 commit comments

Comments
 (0)