Skip to content

Commit

Permalink
CS-Fixer: Enable void_return
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Aug 20, 2024
1 parent b5037ce commit 366000a
Show file tree
Hide file tree
Showing 40 changed files with 151 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@
'case' => 'none',
],
],
'void_return' => true,

// temp disabled to keep the diff small in the first run
'declare_strict_types' => false,
'void_return' => false,
'ordered_imports' => false,
'php_unit_test_case_static_method_calls' => false,
'strict_comparison' => false,
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"ext-json": "*"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.43",
"ergebnis/php-cs-fixer-config": "^6.34",
"friendsofphp/php-cs-fixer": "^3.61",
"phpunit/phpunit": "*",
"ergebnis/composer-normalize": "^2.43"
"phpunit/phpunit": "*"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 11 additions & 11 deletions tests/Api/Glances/GlanceDataFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
*/
class GlanceDataFieldsTest extends TestCase
{
public function testCanBeCreated()
public function testCanBeCreated(): void
{
$glanceDataFields = new GlanceDataFields();

$this->assertInstanceOf(GlanceDataFields::class, $glanceDataFields);
}

public function testSetTitle()
public function testSetTitle(): void
{
$glanceDataFields = new GlanceDataFields();

Expand All @@ -44,7 +44,7 @@ public function testSetTitle()
$glanceDataFields->setTitle('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.');
}

public function testSetText()
public function testSetText(): void
{
$glanceDataFields = new GlanceDataFields();

Expand All @@ -61,7 +61,7 @@ public function testSetText()
$glanceDataFields->setText('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.');
}

public function testSetSubtext()
public function testSetSubtext(): void
{
$glanceDataFields = new GlanceDataFields();

Expand All @@ -78,7 +78,7 @@ public function testSetSubtext()
$glanceDataFields->setSubtext('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.');
}

public function testSetCount()
public function testSetCount(): void
{
$glanceDataFields = new GlanceDataFields();

Expand All @@ -92,7 +92,7 @@ public function testSetCount()
$this->assertEquals(1000, $glanceDataFields->getCount());
}

public function testSetPercent()
public function testSetPercent(): void
{
$glanceDataFields = new GlanceDataFields();

Expand All @@ -106,35 +106,35 @@ public function testSetPercent()
$glanceDataFields->setPercent(101);
}

public function testGetTitle()
public function testGetTitle(): void
{
$glanceDataFields = new GlanceDataFields();

$this->assertNull($glanceDataFields->getTitle());
}

public function testGetText()
public function testGetText(): void
{
$glanceDataFields = new GlanceDataFields();

$this->assertNull($glanceDataFields->getText());
}

public function testGetSubtext()
public function testGetSubtext(): void
{
$glanceDataFields = new GlanceDataFields();

$this->assertNull($glanceDataFields->getSubtext());
}

public function testGetCount()
public function testGetCount(): void
{
$glanceDataFields = new GlanceDataFields();

$this->assertNull($glanceDataFields->getCount());
}

public function testGetPercent()
public function testGetPercent(): void
{
$glanceDataFields = new GlanceDataFields();

Expand Down
18 changes: 9 additions & 9 deletions tests/Api/Glances/GlanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@ public function testCanBeCreated(): Glance
/**
* @depends testCanBeCreated
*/
public function testGetGlanceDataFields(Glance $glance)
public function testGetGlanceDataFields(Glance $glance): void
{
$this->assertInstanceOf(GlanceDataFields::class, $glance->getGlanceDataFields());
}

/**
* @depends testCanBeCreated
*/
public function testGetApplication(Glance $glance)
public function testGetApplication(Glance $glance): void
{
$this->assertInstanceOf(Application::class, $glance->getApplication());
}

/**
* @depends testCanBeCreated
*/
public function testGetRecipient(Glance $glance)
public function testGetRecipient(Glance $glance): void
{
$this->assertInstanceOf(Recipient::class, $glance->getRecipient());
}

/**
* @depends testCanBeCreated
*/
public function testSetApplication(Glance $glance)
public function testSetApplication(Glance $glance): void
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$glance->setApplication($application);
Expand All @@ -75,7 +75,7 @@ public function testSetApplication(Glance $glance)
/**
* @depends testCanBeCreated
*/
public function testSetGlanceDataFields(Glance $glance)
public function testSetGlanceDataFields(Glance $glance): void
{
$glanceDataFields = new GlanceDataFields();
$glance->setGlanceDataFields($glanceDataFields);
Expand All @@ -86,7 +86,7 @@ public function testSetGlanceDataFields(Glance $glance)
/**
* @depends testCanBeCreated
*/
public function testSetRecipient(Glance $glance)
public function testSetRecipient(Glance $glance): void
{
$recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key
$glance->setRecipient($recipient);
Expand All @@ -97,7 +97,7 @@ public function testSetRecipient(Glance $glance)
/**
* @depends testCanBeCreated
*/
public function testHasAtLeastOneField(Glance $glance)
public function testHasAtLeastOneField(Glance $glance): void
{
$this->assertFalse($glance->hasAtLeastOneField());

Expand All @@ -109,15 +109,15 @@ public function testHasAtLeastOneField(Glance $glance)
/**
* @depends testCanBeCreated
*/
public function testHasRecipient(Glance $glance)
public function testHasRecipient(Glance $glance): void
{
$this->assertTrue($glance->hasRecipient());
}

/**
* @group Integration
*/
public function testPush()
public function testPush(): void
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key
Expand Down
8 changes: 4 additions & 4 deletions tests/Api/Groups/GroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function testCanBeCreated(): Group
/**
* @depends testCanBeCreated
*/
public function testGetApplication(Group $group)
public function testGetApplication(Group $group): void
{
$this->assertInstanceOf(Application::class, $group->getApplication());
$this->assertEquals('cccc3333CCCC3333dddd4444DDDD44', $group->getApplication()->getToken());
Expand All @@ -44,15 +44,15 @@ public function testGetApplication(Group $group)
/**
* @depends testCanBeCreated
*/
public function testGetKey(Group $group)
public function testGetKey(Group $group): void
{
$this->assertEquals('eeee5555EEEE5555ffff6666FFFF66', $group->getKey());
}

/**
* @group Integration
*/
public function testRetrieveGroupInformation()
public function testRetrieveGroupInformation(): void
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$group = new Group('eeee5555EEEE5555ffff6666FFFF66', $application);
Expand All @@ -65,7 +65,7 @@ public function testRetrieveGroupInformation()
/**
* @group Integration
*/
public function testCreate()
public function testCreate(): void
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$group = new Group('eeee5555EEEE5555ffff6666FFFF66', $application);
Expand Down
22 changes: 11 additions & 11 deletions tests/Api/Licensing/LicenseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public function testCanBeCreated(): License
/**
* @depends testCanBeCreated
*/
public function testGetApplication(License $license)
public function testGetApplication(License $license): void
{
$this->assertInstanceOf(Application::class, $license->getApplication());
}

/**
* @depends testCanBeCreated
*/
public function testSetApplication(License $license)
public function testSetApplication(License $license): void
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$license->setApplication($application);
Expand All @@ -52,15 +52,15 @@ public function testSetApplication(License $license)
/**
* @depends testCanBeCreated
*/
public function testGetRecipient(License $license)
public function testGetRecipient(License $license): void
{
$this->assertNull($license->getRecipient());
}

/**
* @depends testCanBeCreated
*/
public function testSetRecipient(License $license)
public function testSetRecipient(License $license): void
{
$recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key

Expand All @@ -74,15 +74,15 @@ public function testSetRecipient(License $license)
/**
* @depends testCanBeCreated
*/
public function testGetEmail(License $license)
public function testGetEmail(License $license): void
{
$this->assertNull($license->getEmail());
}

/**
* @depends testCanBeCreated
*/
public function testSetEmail(License $license)
public function testSetEmail(License $license): void
{
$email = 'dummy@email.com';

Expand All @@ -96,15 +96,15 @@ public function testSetEmail(License $license)
/**
* @depends testCanBeCreated
*/
public function testGetOs(License $license)
public function testGetOs(License $license): void
{
$this->assertNull($license->getOs());
}

/**
* @depends testCanBeCreated
*/
public function testSetOs(License $license)
public function testSetOs(License $license): void
{
$license->setOs(License::OS_ANDROID);
$this->assertEquals(License::OS_ANDROID, $license->getOs());
Expand All @@ -119,7 +119,7 @@ public function testSetOs(License $license)
/**
* @depends testCanBeCreated
*/
public function testCanBeAssigned(License $license)
public function testCanBeAssigned(License $license): void
{
$recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key
$email = 'dummy@email.com';
Expand All @@ -142,7 +142,7 @@ public function testCanBeAssigned(License $license)
/**
* @depends testCanBeCreated
*/
public function testGetAvailableOsTypes(License $license)
public function testGetAvailableOsTypes(License $license): void
{
$licenseTypes = [
'OS_ANDROID' => 'Android',
Expand All @@ -157,7 +157,7 @@ public function testGetAvailableOsTypes(License $license)
/**
* @group Integration
*/
public function testCheckCredits()
public function testCheckCredits(): void
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$license = new License($application);
Expand Down
Loading

0 comments on commit 366000a

Please sign in to comment.