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.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
* @param JournalCreated $event
|
||||
*
|
||||
* @return boolean
|
||||
|
@@ -21,7 +21,6 @@ use View;
|
||||
* Class BudgetController
|
||||
*
|
||||
* @package FireflyIII\Http\Controllers
|
||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||
*/
|
||||
class BudgetController extends Controller
|
||||
{
|
||||
|
@@ -18,7 +18,6 @@ use View;
|
||||
|
||||
/**
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||
*
|
||||
* Class PiggyBankController
|
||||
*
|
||||
|
@@ -42,7 +42,6 @@ class Range
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $theNext
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@@ -51,7 +51,6 @@ class JournalFormRequest extends Request
|
||||
/**
|
||||
* @return array
|
||||
* @throws Exception
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
|
@@ -50,7 +50,6 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @param array $fields
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
* @return Account|null
|
||||
*/
|
||||
|
@@ -29,7 +29,6 @@ class Category extends Model
|
||||
|
||||
/**
|
||||
* @param array $fields
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
* @return Category
|
||||
*/
|
||||
|
@@ -44,8 +44,6 @@ class Tag extends Model
|
||||
|
||||
/**
|
||||
* @param array $fields
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.NPathComplexity)
|
||||
*
|
||||
* @return Tag|null
|
||||
*/
|
||||
|
@@ -19,7 +19,6 @@ class ConfigServiceProvider extends ServiceProvider
|
||||
* to overwrite any "vendor" or package configuration that you may want to
|
||||
* modify before the application handles the incoming request / command.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@@ -47,7 +47,7 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
@@ -39,6 +39,8 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map(Router $router)
|
||||
|
@@ -24,7 +24,6 @@ use Steam;
|
||||
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||
*
|
||||
* Class AccountRepository
|
||||
*
|
||||
@@ -609,7 +608,6 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
* @param Account $account
|
||||
* @param array $data
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
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 Tag $tag
|
||||
@@ -33,7 +32,6 @@ class TagRepository implements TagRepositoryInterface
|
||||
*/
|
||||
public function connect(TransactionJournal $journal, Tag $tag)
|
||||
{
|
||||
|
||||
/*
|
||||
* Already connected:
|
||||
*/
|
||||
|
@@ -15,7 +15,6 @@ use Session;
|
||||
*
|
||||
* @package FireflyIII\Support
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||
*/
|
||||
class ExpandedForm
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@ class General extends Twig_Extension
|
||||
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @return array
|
||||
*/
|
||||
public function getFilters()
|
||||
|
@@ -28,7 +28,6 @@ class FireflyValidator extends Validator
|
||||
* @param array $rules
|
||||
* @param array $messages
|
||||
* @param array $customAttributes
|
||||
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
|
||||
*/
|
||||
public function __construct(TranslatorInterface $translator, array $data, array $rules, array $messages = [], array $customAttributes = [])
|
||||
{
|
||||
@@ -40,10 +39,12 @@ class FireflyValidator extends Validator
|
||||
* @param $value
|
||||
* @param $parameters
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @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();
|
||||
if ($count == 1) {
|
||||
@@ -58,6 +59,8 @@ class FireflyValidator extends Validator
|
||||
* @param $attribute
|
||||
* @param $value
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateIban($attribute, $value)
|
||||
@@ -87,6 +90,8 @@ class FireflyValidator extends Validator
|
||||
* @param $value
|
||||
* @param $parameters
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateUniqueAccountForUser($attribute, $value, $parameters)
|
||||
@@ -232,6 +237,8 @@ class FireflyValidator extends Validator
|
||||
* @param $value
|
||||
* @param $parameters
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateUniqueForUser($attribute, $value, $parameters)
|
||||
@@ -261,6 +268,8 @@ class FireflyValidator extends Validator
|
||||
* @param $value
|
||||
* @param $parameters
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateUniqueObjectForUser($attribute, $value, $parameters)
|
||||
@@ -291,6 +300,8 @@ class FireflyValidator extends Validator
|
||||
* @param $value
|
||||
* @param $parameters
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateUniquePiggyBankForUser($attribute, $value, $parameters)
|
||||
|
Reference in New Issue
Block a user