Adopt PSR-2 coding style
The Laravel framework adopts the PSR-2 coding style in version 5.1. Laravel apps *should* adopt this coding style as well. Read the [PSR-2 coding style guide][1] for more details and check out [PHPCS][2] to use as a code formatting tool. [1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md [2]: https://github.com/squizlabs/PHP_CodeSniffer
This commit is contained in:
@@ -298,7 +298,9 @@ class SetupController extends Controller
|
|||||||
$envValue = env($envKey) ?: 'null';
|
$envValue = env($envKey) ?: 'null';
|
||||||
|
|
||||||
file_put_contents($path, str_replace(
|
file_put_contents($path, str_replace(
|
||||||
$envKey.'='.$envValue, $envKey.'='.$value, file_get_contents($path)
|
$envKey.'='.$envValue,
|
||||||
|
$envKey.'='.$value,
|
||||||
|
file_get_contents($path)
|
||||||
));
|
));
|
||||||
} catch (InvalidPathException $e) {
|
} catch (InvalidPathException $e) {
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -29,10 +29,14 @@ class ComponentPresenter extends BasePresenter implements Arrayable
|
|||||||
public function status_color()
|
public function status_color()
|
||||||
{
|
{
|
||||||
switch ($this->wrappedObject->status) {
|
switch ($this->wrappedObject->status) {
|
||||||
case 1: return 'greens';
|
case 1:
|
||||||
case 2: return 'blues';
|
return 'greens';
|
||||||
case 3: return 'yellows';
|
case 2:
|
||||||
case 4: return 'reds';
|
return 'blues';
|
||||||
|
case 3:
|
||||||
|
return 'yellows';
|
||||||
|
case 4:
|
||||||
|
return 'reds';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,14 @@ class MetricPresenter extends BasePresenter implements Arrayable
|
|||||||
public function view_name()
|
public function view_name()
|
||||||
{
|
{
|
||||||
switch ($this->wrappedObject->default_view) {
|
switch ($this->wrappedObject->default_view) {
|
||||||
case 0: return 'last_hour';
|
case 0:
|
||||||
case 1: return 'today';
|
return 'last_hour';
|
||||||
case 2: return 'week';
|
case 1:
|
||||||
case 3: return 'month';
|
return 'today';
|
||||||
|
case 2:
|
||||||
|
return 'week';
|
||||||
|
case 3:
|
||||||
|
return 'month';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,10 +56,14 @@ class MetricPresenter extends BasePresenter implements Arrayable
|
|||||||
public function trans_string_name()
|
public function trans_string_name()
|
||||||
{
|
{
|
||||||
switch ($this->wrappedObject->default_view) {
|
switch ($this->wrappedObject->default_view) {
|
||||||
case 0: return 'last_hour';
|
case 0:
|
||||||
case 1: return 'hourly';
|
return 'last_hour';
|
||||||
case 2: return 'weekly';
|
case 1:
|
||||||
case 3: return 'monthly';
|
return 'hourly';
|
||||||
|
case 2:
|
||||||
|
return 'weekly';
|
||||||
|
case 3:
|
||||||
|
return 'monthly';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ class AddComponentGroupCommandTest extends AbstractTestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$object = new AddComponentGroupCommand(
|
$object = new AddComponentGroupCommand(
|
||||||
$params['name'], $params['order'], $params['collapsed'], $params['visible']
|
$params['name'],
|
||||||
|
$params['order'],
|
||||||
|
$params['collapsed'],
|
||||||
|
$params['visible']
|
||||||
);
|
);
|
||||||
|
|
||||||
return compact('params', 'object');
|
return compact('params', 'object');
|
||||||
|
|||||||
Reference in New Issue
Block a user