Skip to content

Commit

Permalink
Merge pull request #151 from imanghafoori1/analysis-nedoDw
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI

[ci skip] [skip ci]
  • Loading branch information
imanghafoori1 authored Mar 2, 2024
2 parents 32f900f + f2982dd commit 1b4f56f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
final class EloquentSituations
{
protected $methods = [
'whenYouFetch' => 'retrieved',
'whenYouFetch' => 'retrieved',
'whenYouCreate' => 'creating',
'whenYouUpdate' => 'updating',
'whenYouSave' => 'saving',
'whenYouSave' => 'saving',
'whenYouDelete' => 'deleting',
];

Expand Down
2 changes: 1 addition & 1 deletion src/Switching/Consider.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private function changeMode($key)
{
config()->set($key, [
'turnOff' => true,
'turnOn' => false,
'turnOn' => false,
][$this->mode]);
}
}
10 changes: 5 additions & 5 deletions tests/ReactionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public function test_json_response()
return view('welcome');
})->name('welcome1.name');

HeyMan::whenYouVisitUrl(['welcome', 'welcome_'])->always()->response()->json(['m'=> 'm'], 403);
HeyMan::whenYouVisitUrl(['welcome', 'welcome_'])->always()->response()->json(['m' => 'm'], 403);
HeyMan::whenYouVisitUrl('welcome1')->thisValueShouldAllow(true)->otherwise()->weDenyAccess();
app(StartGuarding::class)->start();

$this->get('welcome')->assertJson(['m'=>'m'])->assertStatus(403);
$this->get('welcome')->assertJson(['m' => 'm'])->assertStatus(403);
$this->get('welcome1')->assertStatus(200);
}

Expand Down Expand Up @@ -101,10 +101,10 @@ public function test_we_respond_from()
HeyMan::whenYouVisitUrl('welcome')
->thisValueShouldAllow(false)
->otherwise()
->weRespondFrom(SomeClass::class.'@someMethod2', ['p1' => 20, 'p2' =>30]);
->weRespondFrom(SomeClass::class.'@someMethod2', ['p1' => 20, 'p2' => 30]);
app(StartGuarding::class)->start();

$this->get('welcome')->assertStatus(566)->assertJson(['Wow'=> '50']);
$this->get('welcome')->assertStatus(566)->assertJson(['Wow' => '50']);
}

public function test_we_respond_from_2()
Expand All @@ -118,7 +118,7 @@ public function test_we_respond_from_2()

app(StartGuarding::class)->start();

$this->get('welcome')->assertStatus(201)->assertJson(['Wow'=> '50']);
$this->get('welcome')->assertStatus(201)->assertJson(['Wow' => '50']);
}

public function test_we_respond_from_3()
Expand Down

0 comments on commit 1b4f56f

Please sign in to comment.