Skip to content

Commit

Permalink
Merge pull request #150 from liamgm/fixtests_83ad0be
Browse files Browse the repository at this point in the history
Fixed lint and unit test issues.
  • Loading branch information
dbhynds authored Sep 11, 2024
2 parents 83ad0be + 5e907a7 commit bb8b3d0
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/DeepLinkResources/DateTimeInterval.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(

public static function new(): self
{
return new DateTimeInterval();
return new DateTimeInterval;
}

public function getArray(): array
Expand Down
2 changes: 1 addition & 1 deletion src/DeepLinkResources/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(

public static function new(): self
{
return new Iframe();
return new Iframe;
}

public function getArray(): array
Expand Down
2 changes: 1 addition & 1 deletion src/DeepLinkResources/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Resource

public static function new(): self
{
return new Resource();
return new Resource;
}

public function getArray(): array
Expand Down
2 changes: 1 addition & 1 deletion src/DeepLinkResources/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(

public static function new(): self
{
return new Window();
return new Window;
}

public function getArray(): array
Expand Down
2 changes: 1 addition & 1 deletion src/LtiGrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getArray(): array
*/
public static function new(): self
{
return new LtiGrade();
return new LtiGrade;
}

public function getScoreGiven()
Expand Down
2 changes: 1 addition & 1 deletion src/LtiGradeSubmissionReview.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getArray(): array
*/
public static function new(): self
{
return new LtiGradeSubmissionReview();
return new LtiGradeSubmissionReview;
}

public function getReviewableStatus()
Expand Down
2 changes: 1 addition & 1 deletion src/LtiMessageLaunch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tests/Certification/Lti13CertificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions tests/DeepLinkResources/ResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ResourceTest extends TestCase

public function setUp(): void
{
$this->resource = new Resource();
$this->resource = new Resource;
}

public function testItInstantiates()
Expand Down Expand Up @@ -178,7 +178,7 @@ public function testItGetsIframe()

public function testItSetsIframe()
{
$expected = new Iframe();
$expected = new Iframe;

$result = $this->resource->setIframe($expected);

Expand All @@ -195,7 +195,7 @@ public function testItGetsWindow()

public function testItSetsWindow()
{
$expected = new Window();
$expected = new Window;

$result = $this->resource->setWindow($expected);

Expand All @@ -212,7 +212,7 @@ public function testItGetsAvailabilityInterval()

public function testItSetsAvailabilityInterval()
{
$expected = new DateTimeInterval();
$expected = new DateTimeInterval;

$result = $this->resource->setAvailabilityInterval($expected);

Expand All @@ -229,7 +229,7 @@ public function testItGetsSubmissionInterval()

public function testItSetsSubmissionInterval()
{
$expected = new DateTimeInterval();
$expected = new DateTimeInterval;

$result = $this->resource->setSubmissionInterval($expected);

Expand All @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion tests/JwksEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Lti1p1KeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions tests/LtiAssignmentsGradesServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/LtiGradeSubmissionReviewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LtiGradeSubmissionReviewTest extends TestCase

public function setUp(): void
{
$this->gradeReview = new LtiGradeSubmissionReview();
$this->gradeReview = new LtiGradeSubmissionReview;
}

public function testItInstantiates()
Expand Down
2 changes: 1 addition & 1 deletion tests/LtiGradeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions tests/LtiLineitemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LtiLineitemTest extends TestCase

public function setUp(): void
{
$this->lineItem = new LtiLineitem();
$this->lineItem = new LtiLineitem;
}

public function testItInstantiates()
Expand Down Expand Up @@ -198,7 +198,7 @@ public function testItSetsGradesReleased(): void

public function testGradesReleasedConstructedNullable(): void
{
$grade = new LtiLineitem();
$grade = new LtiLineitem;

$result = $grade->getGradesReleased();

Expand Down
2 changes: 1 addition & 1 deletion tests/LtiRegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LtiRegistrationTest extends TestCase

public function setUp(): void
{
$this->registration = new LtiRegistration();
$this->registration = new LtiRegistration;
}

public function testItInstantiates()
Expand Down

0 comments on commit bb8b3d0

Please sign in to comment.