Expand tests and fix various small issues in strict comparison.

This commit is contained in:
James Cole
2017-07-15 22:17:24 +02:00
parent aac1338bdd
commit fa00ba2edd
12 changed files with 37 additions and 13 deletions

View File

@@ -116,7 +116,7 @@ class Account extends Model
{
if (auth()->check()) {
if ($value->user_id === auth()->user()->id) {
if (intval($value->user_id) === auth()->user()->id) {
return $value;
}
}

View File

@@ -55,7 +55,7 @@ class Attachment extends Model
{
if (auth()->check()) {
if ($value->user_id === auth()->user()->id) {
if (intval($value->user_id) === auth()->user()->id) {
return $value;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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