Code cleanup.

This commit is contained in:
James Cole
2016-04-26 21:40:15 +02:00
parent 1d2a4e707e
commit da202317c0
41 changed files with 167 additions and 197 deletions

View File

@@ -3,13 +3,11 @@
use Amount;
use Artisan;
use Carbon\Carbon;
use Config;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Tag;
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
use Input;
use Log;
use Preferences;
use Route;
use Session;
@@ -34,9 +32,9 @@ class HomeController extends Controller
public function dateRange()
{
$start = new Carbon(Input::get('start'));
$end = new Carbon(Input::get('end'));
$label = Input::get('label');
$start = new Carbon(Input::get('start'));
$end = new Carbon(Input::get('end'));
$label = Input::get('label');
// check if the label is "everything" or "Custom range" which will betray
// a possible problem with the budgets.
@@ -101,7 +99,7 @@ class HomeController extends Controller
*/
public function index(ARI $repository)
{
$types = Config::get('firefly.accountTypesByIdentifier.asset');
$types = config('firefly.accountTypesByIdentifier.asset');
$count = $repository->countAccounts($types);
if ($count == 0) {
@@ -168,7 +166,7 @@ class HomeController extends Controller
$methods = $route->getMethods();
if (!is_null($name) && in_array('GET', $methods) && !$this->startsWithAny($ignore, $name)) {
foreach (array_keys(Config::get('firefly.languages')) as $lang) {
foreach (array_keys(config('firefly.languages')) as $lang) {
echo 'touch ' . $lang . '/' . $name . '.md<br>';
}