Skip to content
This repository was archived by the owner on Sep 5, 2017. It is now read-only.

Commit 53b814e

Browse files
m1guelpfStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent acd51dd commit 53b814e

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

app/Console/Commands/JoinOrg.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public function handle()
4141
{
4242
$org = Org::findOrFail($this->argument('org'));
4343
Github::authenticate($org->user->token, null, 'http_token');
44-
if (config('app.env') != 'testing'){
45-
if (isset($org->team)) {
46-
Github::api('teams')->addMember($org->team->id, $this->argument('username'));
47-
} else {
48-
Github::api('organization')->members()->add($org->name, $this->argument('username'));
49-
}
44+
if (config('app.env') != 'testing') {
45+
if (isset($org->team)) {
46+
Github::api('teams')->addMember($org->team->id, $this->argument('username'));
47+
} else {
48+
Github::api('organization')->members()->add($org->name, $this->argument('username'));
49+
}
5050
}
5151
$org->invitecount++;
5252
$org->save();

tests/Unit/JoinTest.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@
22

33
namespace Tests\Unit;
44

5-
use Tests\TestCase;
5+
use Github;
66
use App\Org;
77
use App\User;
8+
use Tests\TestCase;
89
use Illuminate\Support\Facades\Artisan;
9-
use Github;
1010
use Illuminate\Foundation\Testing\DatabaseTransactions;
1111

1212
class JoinTest extends TestCase
1313
{
1414
use DatabaseTransactions;
15+
1516
/**
1617
* A basic test example.
1718
*
1819
* @return void
1920
*/
2021
public function testJoinCommand()
2122
{
22-
$user = factory(User::class)->create();
23-
$org = factory(Org::class)->create([
23+
$user = factory(User::class)->create();
24+
$org = factory(Org::class)->create([
2425
'userid' => $user->id,
2526
]);
26-
Github::shouldReceive('authenticate')
27+
Github::shouldReceive('authenticate')
2728
->once()
2829
->with($org->user->token, null, 'http_token')
2930
->andReturn();
30-
Artisan::call('orgmanager:joinorg', [
31+
Artisan::call('orgmanager:joinorg', [
3132
'org' => $org->id,
3233
'username' => $user->github_username,
3334
]);
34-
$this->assertEquals($user->github_username.' was invited to '.$org->name."\n", Artisan::output());
35+
$this->assertEquals($user->github_username.' was invited to '.$org->name."\n", Artisan::output());
3536
}
3637
}

0 commit comments

Comments
 (0)