mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-25 08:21:08 -06:00
Various code cleanup.
This commit is contained in:
parent
59fdf5b77a
commit
e0aa7f3ff5
@ -103,6 +103,7 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return bool
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
private function exportAttachment(Attachment $attachment): bool
|
||||
{
|
||||
|
@ -225,6 +225,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
||||
* @param string $note
|
||||
*
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public function updateNote(Attachment $attachment, string $note): bool
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
if ($categories->count() > 0) {
|
||||
$collector->setCategories($categories);
|
||||
}
|
||||
if ($categories->count() === 0) {
|
||||
if (0 === $categories->count()) {
|
||||
$collector->setCategories($this->getCategories());
|
||||
}
|
||||
|
||||
@ -653,7 +653,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
if ($categories->count() > 0) {
|
||||
$collector->setCategories($categories);
|
||||
}
|
||||
if ($categories->count() === 0) {
|
||||
if (0 === $categories->count()) {
|
||||
$collector->setCategories($this->getCategories());
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
$attachment->size = $file->getSize();
|
||||
$attachment->uploaded = false;
|
||||
$attachment->save();
|
||||
$fileObject = $file->openFile('r');
|
||||
$fileObject = $file->openFile();
|
||||
$fileObject->rewind();
|
||||
|
||||
|
||||
|
@ -348,6 +348,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
|
||||
* @param string $text
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @throws \Exception
|
||||
*/
|
||||
private function setNoteText(TransactionJournalLink $link, string $text): void
|
||||
{
|
||||
|
@ -554,6 +554,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
* @param string $note
|
||||
*
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
private function updateNote(PiggyBank $piggyBank, string $note): bool
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Internal\Support;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Factory\AccountFactory;
|
||||
use FireflyIII\Factory\AccountMetaFactory;
|
||||
use FireflyIII\Factory\TransactionFactory;
|
||||
@ -340,7 +341,7 @@ trait AccountServiceTrait
|
||||
if (null !== $dbNote) {
|
||||
try {
|
||||
$dbNote->delete();
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
Log::debug($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ trait BillServiceTrait
|
||||
* @param string $note
|
||||
*
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function updateNote(Bill $bill, string $note): bool
|
||||
{
|
||||
|
@ -165,7 +165,7 @@ trait RequestInformation
|
||||
}
|
||||
$baseHref = route('index');
|
||||
$helpString = sprintf(
|
||||
'<p><em><img src="%s/images/flags/%s.png" /> %s</em></p>', $baseHref, $originalLanguage, (string)trans('firefly.help_translating')
|
||||
'<p><em><img alt="" src="%s/images/flags/%s.png" /> %s</em></p>', $baseHref, $originalLanguage, (string)trans('firefly.help_translating')
|
||||
);
|
||||
$content = $helpString . $help->getFromGitHub($route, $language);
|
||||
}
|
||||
|
@ -212,6 +212,7 @@ class User extends Authenticatable
|
||||
* Generates access token.
|
||||
*
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function generateAccessToken(): string
|
||||
{
|
||||
|
@ -1,3 +1,7 @@
|
||||
{
|
||||
"/v1/js/app.js": "/v1/js/app.js"
|
||||
}
|
||||
"/v2/js/index.js": "/v2/js/index.js",
|
||||
"/v2/js/manifest.js": "/v2/js/manifest.js",
|
||||
"/v2/js/vendor.js": "/v2/js/vendor.js",
|
||||
"/undefined.js": "/undefined.js",
|
||||
"/v2/css/app.css": "/v2/css/app.css"
|
||||
}
|
||||
|
4
public/v1/js/lib/bootstrap-multiselect.js
vendored
4
public/v1/js/lib/bootstrap-multiselect.js
vendored
@ -795,7 +795,7 @@
|
||||
}
|
||||
|
||||
$options.push(this.getOptionByValue(value));
|
||||
}, this))
|
||||
}, this));
|
||||
|
||||
// Cannot use select or deselect here because it would call updateOptGroups again.
|
||||
|
||||
@ -1548,7 +1548,7 @@
|
||||
* Update opt groups.
|
||||
*/
|
||||
updateOptGroups: function () {
|
||||
var $groups = $('li.multiselect-group', this.$ul)
|
||||
var $groups = $('li.multiselect-group', this.$ul);
|
||||
var selectedClass = this.options.selectedClass;
|
||||
|
||||
$groups.each(function () {
|
||||
|
8
public/v1/js/lib/daterangepicker.js
vendored
8
public/v1/js/lib/daterangepicker.js
vendored
@ -11,7 +11,7 @@
|
||||
// AMD. Make globaly available as well
|
||||
define(['moment', 'jquery'], function (moment, jquery) {
|
||||
if (!jquery.fn) jquery.fn = {}; // webpack server rendering
|
||||
if (typeof moment !== 'function' && moment.default) moment = moment.default
|
||||
if (typeof moment !== 'function' && moment.default) moment = moment.default;
|
||||
return factory(moment, jquery);
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
@ -417,14 +417,14 @@
|
||||
.on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this))
|
||||
.on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this))
|
||||
.on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this))
|
||||
.on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this))
|
||||
.on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this));
|
||||
|
||||
this.container.find('.ranges')
|
||||
.on('click.daterangepicker', 'li', $.proxy(this.clickRange, this))
|
||||
.on('click.daterangepicker', 'li', $.proxy(this.clickRange, this));
|
||||
|
||||
this.container.find('.drp-buttons')
|
||||
.on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))
|
||||
.on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this))
|
||||
.on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this));
|
||||
|
||||
if (this.element.is('input') || this.element.is('button')) {
|
||||
this.element.on({
|
||||
|
1450
public/v1/lib/bs/js/bootstrap.js
vendored
1450
public/v1/lib/bs/js/bootstrap.js
vendored
File diff suppressed because it is too large
Load Diff
24
public/v1/lib/bs/js/npm.js
vendored
24
public/v1/lib/bs/js/npm.js
vendored
@ -1,13 +1,13 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
||||
require('../../js/transition.js');
|
||||
require('../../js/alert.js');
|
||||
require('../../js/button.js');
|
||||
require('../../js/carousel.js');
|
||||
require('../../js/collapse.js');
|
||||
require('../../js/dropdown.js');
|
||||
require('../../js/modal.js');
|
||||
require('../../js/tooltip.js');
|
||||
require('../../js/popover.js');
|
||||
require('../../js/scrollspy.js');
|
||||
require('../../js/tab.js');
|
||||
require('../../js/affix.js');
|
Loading…
Reference in New Issue
Block a user