Code cleanup for scrutinizer.

This commit is contained in:
James Cole
2017-11-25 08:54:52 +01:00
parent f2cf0ed446
commit f7b1168e7c
36 changed files with 53 additions and 179 deletions

View File

@@ -115,7 +115,7 @@ class Account extends Model
*
* @return Account
*/
public static function routeBinder(self $value)
public static function routeBinder(Account $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {

View File

@@ -56,7 +56,7 @@ class Attachment extends Model
*
* @return Attachment
*/
public static function routeBinder(self $value)
public static function routeBinder(Attachment $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {

View File

@@ -64,7 +64,7 @@ class Bill extends Model
*
* @return Bill
*/
public static function routeBinder(self $value)
public static function routeBinder(Bill $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {

View File

@@ -88,7 +88,7 @@ class Budget extends Model
*
* @return Budget
*/
public static function routeBinder(self $value)
public static function routeBinder(Budget $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {

View File

@@ -87,7 +87,7 @@ class Category extends Model
*
* @return Category
*/
public static function routeBinder(self $value)
public static function routeBinder(Category $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {

View File

@@ -65,7 +65,7 @@ class PiggyBank extends Model
*
* @return PiggyBank
*/
public static function routeBinder(self $value)
public static function routeBinder(PiggyBank $value)
{
if (auth()->check()) {
if (intval($value->account->user_id) === auth()->user()->id) {

View File

@@ -53,7 +53,7 @@ class Rule extends Model
*
* @return Rule
*/
public static function routeBinder(self $value)
public static function routeBinder(Rule $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {

View File

@@ -53,7 +53,7 @@ class RuleGroup extends Model
*
* @return RuleGroup
*/
public static function routeBinder(self $value)
public static function routeBinder(RuleGroup $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {

View File

@@ -91,7 +91,7 @@ class Tag extends Model
*
* @return Tag
*/
public static function routeBinder(self $value)
public static function routeBinder(Tag $value)
{
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {