mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-29 02:11:12 -06:00
Some spell checking [skip ci]
This commit is contained in:
parent
cddc123539
commit
8ec8042045
@ -118,7 +118,7 @@ class BillController extends BaseController
|
||||
$hideBill = true;
|
||||
|
||||
|
||||
return View::make('bills.show', compact('journals', 'hideBills'))->with('bill', $bill)->with(
|
||||
return View::make('bills.show', compact('journals', 'hideBill', 'bill'))->with(
|
||||
'subTitle', $bill->name
|
||||
);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.
|
||||
*
|
||||
* Class HelpController
|
||||
*/
|
||||
class HelpController extends BaseController
|
||||
@ -16,10 +18,9 @@ class HelpController extends BaseController
|
||||
$helpTitle = 'Help';
|
||||
if (!Route::has($route)) {
|
||||
\Log::error('No such route: ' . $route);
|
||||
|
||||
return Response::json(['title' => $helpTitle, 'text' => $helpText]);
|
||||
}
|
||||
|
||||
// content in cache
|
||||
if (Cache::has('help.' . $route . '.title') && Cache::has('help.' . $route . '.text')) {
|
||||
$helpText = Cache::get('help.' . $route . '.text');
|
||||
$helpTitle = Cache::get('help.' . $route . '.title');
|
||||
@ -30,19 +31,18 @@ class HelpController extends BaseController
|
||||
$uri = 'https://raw.githubusercontent.com/JC5/firefly-iii-help/master/' . e($route) . '.md';
|
||||
\Log::debug('URL is: ' . $uri);
|
||||
try {
|
||||
$content = file_get_contents($uri);
|
||||
$helpText = file_get_contents($uri);
|
||||
} catch (ErrorException $e) {
|
||||
$content = '<p>There is no help for this route!</p>';
|
||||
\Log::error(trim($e->getMessage()));
|
||||
}
|
||||
\Log::debug('Found help for ' . $route);
|
||||
\Log::debug('Help text length for route ' . $route . ' is ' . strlen($content));
|
||||
\Log::debug('Help text IS: "' . $content . '".');
|
||||
if (strlen(trim($content)) == 0) {
|
||||
$content = '<p>There is no help for this route.</p>';
|
||||
\Log::debug('Help text length for route ' . $route . ' is ' . strlen($helpText));
|
||||
\Log::debug('Help text IS: "' . $helpText . '".');
|
||||
if (strlen(trim($helpText)) == 0) {
|
||||
$helpText = '<p>There is no help for this route.</p>';
|
||||
}
|
||||
|
||||
$helpText = \Michelf\Markdown::defaultTransform($content);
|
||||
$helpText = \Michelf\Markdown::defaultTransform($helpText);
|
||||
$helpTitle = $route;
|
||||
|
||||
Cache::put('help.' . $route . '.text', $helpText, 10080); // a week.
|
||||
|
@ -239,6 +239,8 @@ class PiggyBankController extends BaseController
|
||||
/**
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @SuppressWarnings("Unused")
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function remove(PiggyBank $piggyBank)
|
||||
@ -326,7 +328,6 @@ class PiggyBankController extends BaseController
|
||||
// always validate:
|
||||
$messages = $this->_repository->validate($data);
|
||||
|
||||
// flash messages:
|
||||
Session::flash('warnings', $messages['warnings']);
|
||||
Session::flash('successes', $messages['successes']);
|
||||
Session::flash('errors', $messages['errors']);
|
||||
|
@ -5,6 +5,10 @@ use FireflyIII\Database\PiggyBank\RepeatedExpense as Repository;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
|
||||
/**
|
||||
* @SuppressWarnings("CamelCase") // I'm fine with this.
|
||||
* @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.
|
||||
* @SuppressWarnings("CouplingBetweenObjects") // There's only so much I can remove.
|
||||
*
|
||||
* Class RepeatedExpenseController
|
||||
*/
|
||||
class RepeatedExpenseController extends BaseController
|
||||
@ -29,10 +33,7 @@ class RepeatedExpenseController extends BaseController
|
||||
{
|
||||
/** @var \FireflyIII\Database\Account\Account $acct */
|
||||
$acct = App::make('FireflyIII\Database\Account\Account');
|
||||
|
||||
$periods = Config::get('firefly.piggy_bank_periods');
|
||||
|
||||
|
||||
$accounts = FFForm::makeSelectList($acct->getAssetAccounts());
|
||||
|
||||
return View::make('repeatedExpense.create', compact('accounts', 'periods'))->with('subTitle', 'Create new repeated expense')->with(
|
||||
@ -124,8 +125,8 @@ class RepeatedExpenseController extends BaseController
|
||||
{
|
||||
$subTitle = $repeatedExpense->name;
|
||||
$today = Carbon::now();
|
||||
|
||||
$repetitions = $repeatedExpense->piggyBankRepetitions()->get();
|
||||
|
||||
$repetitions->each(
|
||||
function (PiggyBankRepetition $repetition) {
|
||||
$repetition->bars = $this->_repository->calculateParts($repetition);
|
||||
@ -154,7 +155,6 @@ class RepeatedExpenseController extends BaseController
|
||||
// always validate:
|
||||
$messages = $this->_repository->validate($data);
|
||||
|
||||
// flash messages:
|
||||
Session::flash('warnings', $messages['warnings']);
|
||||
Session::flash('successes', $messages['successes']);
|
||||
Session::flash('errors', $messages['errors']);
|
||||
@ -199,7 +199,6 @@ class RepeatedExpenseController extends BaseController
|
||||
// always validate:
|
||||
$messages = $this->_repository->validate($data);
|
||||
|
||||
// flash messages:
|
||||
Session::flash('warnings', $messages['warnings']);
|
||||
Session::flash('successes', $messages['successes']);
|
||||
Session::flash('errors', $messages['errors']);
|
||||
|
@ -4,6 +4,8 @@ use FireflyIII\Database\TransactionJournal\TransactionJournal as TransactionJour
|
||||
use FireflyIII\Report\ReportInterface as Report;
|
||||
|
||||
/**
|
||||
*
|
||||
* @SuppressWarnings("CamelCase") // I'm fine with this.
|
||||
*
|
||||
* Class ReportController
|
||||
*/
|
||||
@ -92,7 +94,7 @@ class ReportController extends BaseController
|
||||
$budgets = $this->_repository->getBudgetsForMonth($date);
|
||||
$categories = $this->_repository->getCategoriesForMonth($date, 10);
|
||||
$accounts = $this->_repository->getAccountsForMonth($date);
|
||||
$piggyBanks = $this->_repository->getPiggyBanksForMonth($date);
|
||||
//$piggyBanks = $this->_repository->getPiggyBanksForMonth($date);
|
||||
|
||||
return View::make(
|
||||
'reports.month',
|
||||
|
@ -7,6 +7,13 @@ use FireflyIII\Helper\TransactionJournal\HelperInterface as Helper;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @SuppressWarnings("CamelCase") // I'm fine with this.
|
||||
* @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.
|
||||
* @SuppressWarnings("CouplingBetweenObjects") // There's only so much I can remove.
|
||||
* @SuppressWarnings("TooManyMethods") // I'm also fine with this.
|
||||
* @SuppressWarnings("ExcessiveClassComplexity")
|
||||
*
|
||||
* Class TransactionController
|
||||
*
|
||||
*/
|
||||
@ -158,10 +165,10 @@ class TransactionController extends BaseController
|
||||
*/
|
||||
public function doRelate()
|
||||
{
|
||||
$id = intval(Input::get('id'));
|
||||
$brother = intval(Input::get('id'));
|
||||
$sister = intval(Input::get('relateTo'));
|
||||
|
||||
$journal = $this->_repository->find($id);
|
||||
$journal = $this->_repository->find($brother);
|
||||
$sis = $this->_repository->find($sister);
|
||||
|
||||
if ($journal && $sis) {
|
||||
@ -358,7 +365,6 @@ class TransactionController extends BaseController
|
||||
// always validate:
|
||||
$messages = $this->_repository->validate($data);
|
||||
|
||||
// flash messages:
|
||||
Session::flash('warnings', $messages['warnings']);
|
||||
Session::flash('successes', $messages['successes']);
|
||||
Session::flash('errors', $messages['errors']);
|
||||
|
@ -94,7 +94,7 @@ class UserController extends BaseController
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function postRemindme()
|
||||
public function postRemindMe()
|
||||
{
|
||||
|
||||
/** @var \FireflyIII\Database\User\User $repository */
|
||||
@ -108,7 +108,7 @@ class UserController extends BaseController
|
||||
if (!$user) {
|
||||
Session::flash('error', 'No good!');
|
||||
|
||||
return View::make('user.remindme');
|
||||
return View::make('user.remindMe');
|
||||
}
|
||||
$email->sendResetVerification($user);
|
||||
|
||||
@ -132,9 +132,9 @@ class UserController extends BaseController
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function remindme()
|
||||
public function remindMe()
|
||||
{
|
||||
return View::make('user.remindme');
|
||||
return View::make('user.remindMe');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -160,7 +160,7 @@ class UserController extends BaseController
|
||||
return View::make('user.registered');
|
||||
}
|
||||
|
||||
return View::make('error')->with('message', 'Yo no hablo reset code!');
|
||||
return View::make('error')->with('message', 'No reset code found!');
|
||||
}
|
||||
|
||||
}
|
@ -115,7 +115,7 @@ class PiggyBankPart
|
||||
{
|
||||
if ($this->getCurrentamount() < $this->getCumulativeAmount()) {
|
||||
$pct = 0;
|
||||
// calculate halway point?
|
||||
// calculate halfway point?
|
||||
if ($this->getCumulativeAmount() - $this->getCurrentamount() < $this->getAmountPerBar()) {
|
||||
$left = $this->getCurrentamount() % $this->getAmountPerBar();
|
||||
$pct = round($left / $this->getAmountPerBar() * 100);
|
||||
|
@ -51,7 +51,7 @@ class Registration implements RegistrationInterface
|
||||
$data = ['reset' => $reset];
|
||||
try {
|
||||
\Mail::send(
|
||||
['emails.user.remindme-html', 'emails.user.remindme-text'], $data, function ($message) use ($email) {
|
||||
['emails.user.remindMe-html', 'emails.user.remindMe-text'], $data, function ($message) use ($email) {
|
||||
$message->to($email, $email)->subject('Forgot your password?');
|
||||
}
|
||||
);
|
||||
|
@ -368,7 +368,7 @@ Route::group(
|
||||
Route::get('/login', ['uses' => 'UserController@login', 'as' => 'login']);
|
||||
Route::get('/register', ['uses' => 'UserController@register', 'as' => 'register','before' => 'allow-register']);
|
||||
Route::get('/reset/{reset}', ['uses' => 'UserController@reset', 'as' => 'reset']);
|
||||
Route::get('/remindme', ['uses' => 'UserController@remindme', 'as' => 'remindme']);
|
||||
Route::get('/remindMe', ['uses' => 'UserController@remindMe', 'as' => 'remindMe']);
|
||||
|
||||
|
||||
}
|
||||
@ -381,6 +381,6 @@ Route::group(
|
||||
// user controller
|
||||
Route::post('/login', ['uses' => 'UserController@postLogin', 'as' => 'login.post']);
|
||||
Route::post('/register', ['uses' => 'UserController@postRegister', 'as' => 'register.post','before' => 'allow-register']);
|
||||
Route::post('/remindme', ['uses' => 'UserController@postRemindme', 'as' => 'remindme.post']);
|
||||
Route::post('/remindMe', ['uses' => 'UserController@postRemindMe', 'as' => 'remindMe.post']);
|
||||
}
|
||||
);
|
@ -29,7 +29,7 @@
|
||||
@if(Config::get('auth.allow_register') === true)
|
||||
<a href="{{route('register')}}" class="btn btn-default">Register</a>
|
||||
@endif
|
||||
<a href="{{route('remindme')}}" class="btn btn-default">Forgot your password?</a>
|
||||
<a href="{{route('remindMe')}}" class="btn btn-default">Forgot your password?</a>
|
||||
</div>
|
||||
{{Form::close()}}
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
<div class="btn-group btn-group-justified btn-group-sm">
|
||||
<a href="{{route('login')}}" class="btn btn-default">Back to the login form</a>
|
||||
<a href="{{route('remindme')}}" class="btn btn-default">Forgot your password?</a>
|
||||
<a href="{{route('remindMe')}}" class="btn btn-default">Forgot your password?</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<h3 class="panel-title">Firefly III — Reset your password</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{Form::open(['id' => 'remindme'])}}
|
||||
{{Form::open(['id' => 'remindMe'])}}
|
||||
<div class="form-group">
|
||||
<label for="inputEmail">Email address</label>
|
||||
<input type="email" class="form-control" id="inputEmail" name="email" placeholder="Enter email">
|
@ -90,8 +90,8 @@ class UserControllerCest
|
||||
public function postRemindme(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('get a password reminder');
|
||||
$I->amOnRoute('remindme');
|
||||
$I->submitForm('#remindme', ['email' => 'functional@example.com']);
|
||||
$I->amOnRoute('remindMe');
|
||||
$I->submitForm('#remindMe', ['email' => 'functional@example.com']);
|
||||
$I->see('You\'re about to get an e-mail.');
|
||||
}
|
||||
|
||||
@ -101,8 +101,8 @@ class UserControllerCest
|
||||
public function postRemindmeFail(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('get a password reminder and fail');
|
||||
$I->amOnRoute('remindme');
|
||||
$I->submitForm('#remindme', ['email' => 'abcdee']);
|
||||
$I->amOnRoute('remindMe');
|
||||
$I->submitForm('#remindMe', ['email' => 'abcdee']);
|
||||
$I->see('No good!');
|
||||
}
|
||||
|
||||
@ -120,10 +120,10 @@ class UserControllerCest
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function remindme(FunctionalTester $I)
|
||||
public function remindMe(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('reminded of my password');
|
||||
$I->amOnRoute('remindme');
|
||||
$I->amOnRoute('remindMe');
|
||||
$I->see('Firefly III — Reset your password');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user