diff --git a/src/DeepLinkResources/DateTimeInterval.php b/src/DeepLinkResources/DateTimeInterval.php index e3b2cef2..3b3927b4 100644 --- a/src/DeepLinkResources/DateTimeInterval.php +++ b/src/DeepLinkResources/DateTimeInterval.php @@ -21,7 +21,7 @@ public function __construct( public static function new(): self { - return new DateTimeInterval(); + return new DateTimeInterval; } public function getArray(): array diff --git a/src/DeepLinkResources/Iframe.php b/src/DeepLinkResources/Iframe.php index bf2971ad..88ebf6d6 100644 --- a/src/DeepLinkResources/Iframe.php +++ b/src/DeepLinkResources/Iframe.php @@ -16,7 +16,7 @@ public function __construct( public static function new(): self { - return new Iframe(); + return new Iframe; } public function getArray(): array diff --git a/src/DeepLinkResources/Resource.php b/src/DeepLinkResources/Resource.php index 0d3e3f94..16a11c38 100644 --- a/src/DeepLinkResources/Resource.php +++ b/src/DeepLinkResources/Resource.php @@ -25,7 +25,7 @@ class Resource public static function new(): self { - return new Resource(); + return new Resource; } public function getArray(): array diff --git a/src/DeepLinkResources/Window.php b/src/DeepLinkResources/Window.php index 3df80336..8809027d 100644 --- a/src/DeepLinkResources/Window.php +++ b/src/DeepLinkResources/Window.php @@ -17,7 +17,7 @@ public function __construct( public static function new(): self { - return new Window(); + return new Window; } public function getArray(): array diff --git a/src/LtiGrade.php b/src/LtiGrade.php index bd673b4e..4d17e348 100644 --- a/src/LtiGrade.php +++ b/src/LtiGrade.php @@ -50,7 +50,7 @@ public function getArray(): array */ public static function new(): self { - return new LtiGrade(); + return new LtiGrade; } public function getScoreGiven() diff --git a/src/LtiGradeSubmissionReview.php b/src/LtiGradeSubmissionReview.php index 4732d784..f44689f3 100644 --- a/src/LtiGradeSubmissionReview.php +++ b/src/LtiGradeSubmissionReview.php @@ -35,7 +35,7 @@ public function getArray(): array */ public static function new(): self { - return new LtiGradeSubmissionReview(); + return new LtiGradeSubmissionReview; } public function getReviewableStatus() diff --git a/src/LtiMessageLaunch.php b/src/LtiMessageLaunch.php index b7b0936d..475829b4 100644 --- a/src/LtiMessageLaunch.php +++ b/src/LtiMessageLaunch.php @@ -438,7 +438,7 @@ protected function validateJwtSignature(): self // Validate JWT signature try { - $headers = new \stdClass(); + $headers = new \stdClass; JWT::decode($this->request['id_token'], $public_key, $headers); } catch (ExpiredException $e) { // Error validating signature. diff --git a/tests/Certification/Lti13CertificationTest.php b/tests/Certification/Lti13CertificationTest.php index 32c5255a..4130bbd6 100644 --- a/tests/Certification/Lti13CertificationTest.php +++ b/tests/Certification/Lti13CertificationTest.php @@ -250,8 +250,8 @@ public function setUp(): void ]), new LtiDeployment(static::ISSUER_URL) ); - $this->cache = new TestCache(); - $this->cookie = new TestCookie(); + $this->cache = new TestCache; + $this->cookie = new TestCookie; $this->cookie->setCookie( LtiOidcLogin::COOKIE_PREFIX.static::STATE, static::STATE diff --git a/tests/DeepLinkResources/ResourceTest.php b/tests/DeepLinkResources/ResourceTest.php index 2f7b236d..87074fae 100644 --- a/tests/DeepLinkResources/ResourceTest.php +++ b/tests/DeepLinkResources/ResourceTest.php @@ -18,7 +18,7 @@ class ResourceTest extends TestCase public function setUp(): void { - $this->resource = new Resource(); + $this->resource = new Resource; } public function testItInstantiates() @@ -178,7 +178,7 @@ public function testItGetsIframe() public function testItSetsIframe() { - $expected = new Iframe(); + $expected = new Iframe; $result = $this->resource->setIframe($expected); @@ -195,7 +195,7 @@ public function testItGetsWindow() public function testItSetsWindow() { - $expected = new Window(); + $expected = new Window; $result = $this->resource->setWindow($expected); @@ -212,7 +212,7 @@ public function testItGetsAvailabilityInterval() public function testItSetsAvailabilityInterval() { - $expected = new DateTimeInterval(); + $expected = new DateTimeInterval; $result = $this->resource->setAvailabilityInterval($expected); @@ -229,7 +229,7 @@ public function testItGetsSubmissionInterval() public function testItSetsSubmissionInterval() { - $expected = new DateTimeInterval(); + $expected = new DateTimeInterval; $result = $this->resource->setSubmissionInterval($expected); @@ -254,8 +254,8 @@ public function testItCreatesArrayWithoutOptionalProperties() public function testItCreatesArrayWithDefinedOptionalProperties() { $icon = Icon::new('https://example.com/image.png', 100, 200); - $Iframe = new Iframe(); - $window = new Window(); + $Iframe = new Iframe; + $window = new Window; $dateTimeInterval = new DateTimeInterval(date_create()); $expected = [ diff --git a/tests/JwksEndpointTest.php b/tests/JwksEndpointTest.php index 00098e7d..5bc49eef 100644 --- a/tests/JwksEndpointTest.php +++ b/tests/JwksEndpointTest.php @@ -70,7 +70,7 @@ public function testItGetsJwksForTheProvidedKeys() 'alg' => 'RS256', 'use' => 'sig', 'e' => 'AQAB', - 'n' => '6DzRJzrx0KThi0piO3wdNA3e7-xXly5WJo00CqlKDodtyX6wRT76E4cD57yrr_ZWuaA-6idSFPaEQXw9tCqqTIrS4STIYrlvC0CeEA7m0s2PbI2ffaxv2kofxdmOaUI8YW8NIqNyHMl6Acz1lQOOZ5xSreG5JAqtZpy7AwDdpJo7up9937AD9ZV77qlty6xRKVqOGP1-cH97zMvlQo0EUWUhRAzDlTlCXnbeSjVypET3l93WPT9gnIywt1xX0L6rIJd-4fyU6faaToGN9z4_Q6ay2xFSEJnoNBW9wI886W75vLcVLnT95YKJJwZoKEa9yoV_ZPiTBJcFv1HFPf4ibQ==', + 'n' => '6DzRJzrx0KThi0piO3wdNA3e7-xXly5WJo00CqlKDodtyX6wRT76E4cD57yrr_ZWuaA-6idSFPaEQXw9tCqqTIrS4STIYrlvC0CeEA7m0s2PbI2ffaxv2kofxdmOaUI8YW8NIqNyHMl6Acz1lQOOZ5xSreG5JAqtZpy7AwDdpJo7up9937AD9ZV77qlty6xRKVqOGP1-cH97zMvlQo0EUWUhRAzDlTlCXnbeSjVypET3l93WPT9gnIywt1xX0L6rIJd-4fyU6faaToGN9z4_Q6ay2xFSEJnoNBW9wI886W75vLcVLnT95YKJJwZoKEa9yoV_ZPiTBJcFv1HFPf4ibQ', 'kid' => 'kid', ]]], $result); } diff --git a/tests/Lti1p1KeyTest.php b/tests/Lti1p1KeyTest.php index 142def67..c1e6f500 100644 --- a/tests/Lti1p1KeyTest.php +++ b/tests/Lti1p1KeyTest.php @@ -9,7 +9,7 @@ class Lti1p1KeyTest extends TestCase private $key; public function setUp(): void { - $this->key = new Lti1p1Key(); + $this->key = new Lti1p1Key; } public function testItInstantiates() diff --git a/tests/LtiAssignmentsGradesServiceTest.php b/tests/LtiAssignmentsGradesServiceTest.php index 45ebe95c..955d53a5 100644 --- a/tests/LtiAssignmentsGradesServiceTest.php +++ b/tests/LtiAssignmentsGradesServiceTest.php @@ -241,7 +241,7 @@ public function testItCreatesALineItem() $expected = new LtiLineitem($ltiLineitemData); - $result = $service->createLineItem(new LtiLineItem()); + $result = $service->createLineItem(new LtiLineItem); $this->assertEquals($expected, $result); } @@ -427,7 +427,7 @@ public function testItGetsGradesWithEmptyLineItem() $this->connector->shouldReceive('getAll') ->once()->andReturn($expected); - $result = $service->getGrades(new LtiLineitem()); + $result = $service->getGrades(new LtiLineitem); $this->assertEquals($expected, $result); } diff --git a/tests/LtiGradeSubmissionReviewTest.php b/tests/LtiGradeSubmissionReviewTest.php index 383eb9c3..e138d59f 100644 --- a/tests/LtiGradeSubmissionReviewTest.php +++ b/tests/LtiGradeSubmissionReviewTest.php @@ -10,7 +10,7 @@ class LtiGradeSubmissionReviewTest extends TestCase public function setUp(): void { - $this->gradeReview = new LtiGradeSubmissionReview(); + $this->gradeReview = new LtiGradeSubmissionReview; } public function testItInstantiates() diff --git a/tests/LtiGradeTest.php b/tests/LtiGradeTest.php index 4bf787e6..96f9a86c 100644 --- a/tests/LtiGradeTest.php +++ b/tests/LtiGradeTest.php @@ -9,7 +9,7 @@ class LtiGradeTest extends TestCase private $grade; public function setUp(): void { - $this->grade = new LtiGrade(); + $this->grade = new LtiGrade; } public function testItInstantiates() diff --git a/tests/LtiLineitemTest.php b/tests/LtiLineitemTest.php index eb3be958..e51f0fb1 100644 --- a/tests/LtiLineitemTest.php +++ b/tests/LtiLineitemTest.php @@ -10,7 +10,7 @@ class LtiLineitemTest extends TestCase public function setUp(): void { - $this->lineItem = new LtiLineitem(); + $this->lineItem = new LtiLineitem; } public function testItInstantiates() @@ -198,7 +198,7 @@ public function testItSetsGradesReleased(): void public function testGradesReleasedConstructedNullable(): void { - $grade = new LtiLineitem(); + $grade = new LtiLineitem; $result = $grade->getGradesReleased(); diff --git a/tests/LtiRegistrationTest.php b/tests/LtiRegistrationTest.php index 6ce8cd66..1b21ed4f 100644 --- a/tests/LtiRegistrationTest.php +++ b/tests/LtiRegistrationTest.php @@ -10,7 +10,7 @@ class LtiRegistrationTest extends TestCase public function setUp(): void { - $this->registration = new LtiRegistration(); + $this->registration = new LtiRegistration; } public function testItInstantiates()