Skip to content

Commit

Permalink
Merge pull request #7 from zachleigh/analysis-8Qeg5o
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
zachleigh authored Nov 2, 2016
2 parents d37e246 + 3dc6e93 commit 56b327d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions src/BundleItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function setChoice($value)
public function setParameters($parameters)
{
$this->parameters = collect($parameters)->mapWithKeys(function ($value, $key) {
if(!$key = $this->getNamespacedKey($key)) {
if (!$key = $this->getNamespacedKey($key)) {
return;
}

Expand All @@ -164,7 +164,7 @@ public function setParameters($parameters)
/**
* Get only global and keys with this item's namespace.
*
* @param string $key
* @param string $key
*
* @return string|null
*/
Expand All @@ -175,7 +175,7 @@ protected function getNamespacedKey($key)
if (count($keyArray) === 2 && $keyArray[0] === $this->getNamespace()) {
$key = $keyArray[1];
} elseif (count($keyArray) === 2 && $keyArray[0] !== $this->getNamespace()) {
return null;
return;
}

return $key;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/BundleItemUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function it_sets_choice_if_namespaced_choice_value_passed_in_parameters()
$item = $bundle->getValues()[3];

$item->setParameters([
'inbox_status.choice' => 3
'inbox_status.choice' => 3,
]);

$this->assertEquals(3, $item->hasChoice());
Expand Down
22 changes: 11 additions & 11 deletions tests/stubs/ExpectedResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,18 @@ private function bundle10()
private function months()
{
return array_values([
'january' => 'Jan',
'february' => 'Feb',
'march' => 'March',
'april' => 'April',
'may' => 'May',
'june' => 'June',
'july' => 'July',
'august' => 'Aug',
'january' => 'Jan',
'february' => 'Feb',
'march' => 'March',
'april' => 'April',
'may' => 'May',
'june' => 'June',
'july' => 'July',
'august' => 'Aug',
'september' => 'Sept',
'october' => 'Oct',
'november' => 'Nov',
'december' => 'Dec'
'october' => 'Oct',
'november' => 'Nov',
'december' => 'Dec',
]);
}
}
2 changes: 1 addition & 1 deletion tests/stubs/bundle8.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
'user.welcome_user',
'user.message_to',
'user.invite_from',
'home.inbox_status'
'home.inbox_status',
];
26 changes: 13 additions & 13 deletions tests/stubs/en/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
'welcome' => 'Welcome',
'signup' => 'Signup',
'login' => 'Login',
'months' => [
'january' => 'Jan',
'february' => 'Feb',
'march' => 'March',
'april' => 'April',
'may' => 'May',
'june' => 'June',
'july' => 'July',
'august' => 'Aug',
'months' => [
'january' => 'Jan',
'february' => 'Feb',
'march' => 'March',
'april' => 'April',
'may' => 'May',
'june' => 'June',
'july' => 'July',
'august' => 'Aug',
'september' => 'Sept',
'october' => 'Oct',
'november' => 'Nov',
'december' => 'Dec'
'october' => 'Oct',
'november' => 'Nov',
'december' => 'Dec',
],
'inbox_status' => 'You have a new message.|You have new messages'
'inbox_status' => 'You have a new message.|You have new messages',
];

0 comments on commit 56b327d

Please sign in to comment.