mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Cleanup and add various warnings.
This commit is contained in:
@@ -28,8 +28,6 @@ class ConnectJournalToPiggyBank
|
|||||||
/**
|
/**
|
||||||
* Handle the event when journal is saved.
|
* Handle the event when journal is saved.
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
|
||||||
*
|
|
||||||
* @param JournalCreated $event
|
* @param JournalCreated $event
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
@@ -21,7 +21,6 @@ use View;
|
|||||||
* Class BudgetController
|
* Class BudgetController
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Http\Controllers
|
* @package FireflyIII\Http\Controllers
|
||||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
|
||||||
*/
|
*/
|
||||||
class BudgetController extends Controller
|
class BudgetController extends Controller
|
||||||
{
|
{
|
||||||
|
@@ -18,7 +18,6 @@ use View;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
|
||||||
*
|
*
|
||||||
* Class PiggyBankController
|
* Class PiggyBankController
|
||||||
*
|
*
|
||||||
|
@@ -42,7 +42,6 @@ class Range
|
|||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $theNext
|
* @param \Closure $theNext
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@@ -51,7 +51,6 @@ class JournalFormRequest extends Request
|
|||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
|
||||||
*/
|
*/
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
|
@@ -50,7 +50,6 @@ class Account extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $fields
|
* @param array $fields
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
|
||||||
*
|
*
|
||||||
* @return Account|null
|
* @return Account|null
|
||||||
*/
|
*/
|
||||||
|
@@ -29,7 +29,6 @@ class Category extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $fields
|
* @param array $fields
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
|
||||||
*
|
*
|
||||||
* @return Category
|
* @return Category
|
||||||
*/
|
*/
|
||||||
|
@@ -44,8 +44,6 @@ class Tag extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $fields
|
* @param array $fields
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
|
||||||
* @SuppressWarnings(PHPMD.NPathComplexity)
|
|
||||||
*
|
*
|
||||||
* @return Tag|null
|
* @return Tag|null
|
||||||
*/
|
*/
|
||||||
|
@@ -19,7 +19,6 @@ class ConfigServiceProvider extends ServiceProvider
|
|||||||
* to overwrite any "vendor" or package configuration that you may want to
|
* to overwrite any "vendor" or package configuration that you may want to
|
||||||
* modify before the application handles the incoming request / command.
|
* modify before the application handles the incoming request / command.
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@@ -47,7 +47,7 @@ class FireflyServiceProvider extends ServiceProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
*
|
||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
|
@@ -39,6 +39,8 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
* @param \Illuminate\Routing\Router $router
|
* @param \Illuminate\Routing\Router $router
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function map(Router $router)
|
public function map(Router $router)
|
||||||
|
@@ -24,7 +24,6 @@ use Steam;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
|
||||||
*
|
*
|
||||||
* Class AccountRepository
|
* Class AccountRepository
|
||||||
*
|
*
|
||||||
@@ -609,7 +608,6 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
* @param Account $account
|
* @param Account $account
|
||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
|
||||||
*/
|
*/
|
||||||
protected function updateMetadata(Account $account, array $data)
|
protected function updateMetadata(Account $account, array $data)
|
||||||
{
|
{
|
||||||
|
@@ -24,7 +24,6 @@ class TagRepository implements TagRepositoryInterface
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five.
|
|
||||||
*
|
*
|
||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
* @param Tag $tag
|
* @param Tag $tag
|
||||||
@@ -33,7 +32,6 @@ class TagRepository implements TagRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function connect(TransactionJournal $journal, Tag $tag)
|
public function connect(TransactionJournal $journal, Tag $tag)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Already connected:
|
* Already connected:
|
||||||
*/
|
*/
|
||||||
|
@@ -15,7 +15,6 @@ use Session;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Support
|
* @package FireflyIII\Support
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
|
||||||
*/
|
*/
|
||||||
class ExpandedForm
|
class ExpandedForm
|
||||||
{
|
{
|
||||||
|
@@ -24,7 +24,6 @@ class General extends Twig_Extension
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getFilters()
|
public function getFilters()
|
||||||
|
@@ -28,7 +28,6 @@ class FireflyValidator extends Validator
|
|||||||
* @param array $rules
|
* @param array $rules
|
||||||
* @param array $messages
|
* @param array $messages
|
||||||
* @param array $customAttributes
|
* @param array $customAttributes
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
|
|
||||||
*/
|
*/
|
||||||
public function __construct(TranslatorInterface $translator, array $data, array $rules, array $messages = [], array $customAttributes = [])
|
public function __construct(TranslatorInterface $translator, array $data, array $rules, array $messages = [], array $customAttributes = [])
|
||||||
{
|
{
|
||||||
@@ -40,10 +39,12 @@ class FireflyValidator extends Validator
|
|||||||
* @param $value
|
* @param $value
|
||||||
* @param $parameters
|
* @param $parameters
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateBelongsToUser($attribute, $value, $parameters)
|
public function validateBelongsToUser($attribute, $value, $parameters
|
||||||
{
|
) {
|
||||||
|
|
||||||
$count = DB::table($parameters[0])->where('user_id', Auth::user()->id)->where('id', $value)->count();
|
$count = DB::table($parameters[0])->where('user_id', Auth::user()->id)->where('id', $value)->count();
|
||||||
if ($count == 1) {
|
if ($count == 1) {
|
||||||
@@ -58,6 +59,8 @@ class FireflyValidator extends Validator
|
|||||||
* @param $attribute
|
* @param $attribute
|
||||||
* @param $value
|
* @param $value
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateIban($attribute, $value)
|
public function validateIban($attribute, $value)
|
||||||
@@ -87,6 +90,8 @@ class FireflyValidator extends Validator
|
|||||||
* @param $value
|
* @param $value
|
||||||
* @param $parameters
|
* @param $parameters
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateUniqueAccountForUser($attribute, $value, $parameters)
|
public function validateUniqueAccountForUser($attribute, $value, $parameters)
|
||||||
@@ -232,6 +237,8 @@ class FireflyValidator extends Validator
|
|||||||
* @param $value
|
* @param $value
|
||||||
* @param $parameters
|
* @param $parameters
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateUniqueForUser($attribute, $value, $parameters)
|
public function validateUniqueForUser($attribute, $value, $parameters)
|
||||||
@@ -261,6 +268,8 @@ class FireflyValidator extends Validator
|
|||||||
* @param $value
|
* @param $value
|
||||||
* @param $parameters
|
* @param $parameters
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateUniqueObjectForUser($attribute, $value, $parameters)
|
public function validateUniqueObjectForUser($attribute, $value, $parameters)
|
||||||
@@ -291,6 +300,8 @@ class FireflyValidator extends Validator
|
|||||||
* @param $value
|
* @param $value
|
||||||
* @param $parameters
|
* @param $parameters
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateUniquePiggyBankForUser($attribute, $value, $parameters)
|
public function validateUniquePiggyBankForUser($attribute, $value, $parameters)
|
||||||
|
Reference in New Issue
Block a user