Skip to content

Commit a087a27

Browse files
committed
Make new() functions static
LTI_Deep_Link_Resource::new() and LTI_Deployment::new() should be declared static. Calling non-static methods statically is deprecated and will throw an error in future PHP versions.
1 parent a3372e5 commit a087a27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lti/LTI_Deep_Link_Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class LTI_Deep_Link_Resource {
1010
private $custom_params = [];
1111
private $target = 'iframe';
1212

13-
public function new() {
13+
public static function new() {
1414
return new LTI_Deep_Link_Resource();
1515
}
1616

src/lti/LTI_Deployment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class LTI_Deployment {
55

66
private $deployment_id;
77

8-
public function new() {
8+
public static function new() {
99
return new LTI_Deployment();
1010
}
1111

0 commit comments

Comments
 (0)