Code cleanup

This commit is contained in:
James Cole
2018-04-28 06:23:13 +02:00
parent 6f0e1c79ac
commit 13b78bdc20
218 changed files with 621 additions and 681 deletions

View File

@@ -28,6 +28,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\User;
/**
* Class Attachment.
@@ -101,7 +102,7 @@ class Attachment extends Model
*/
public function getDescriptionAttribute($value)
{
if (null === $value || 0 === strlen($value)) {
if (null === $value || 0 === \strlen($value)) {
return null;
}
@@ -117,7 +118,7 @@ class Attachment extends Model
*/
public function getFilenameAttribute($value)
{
if (null === $value || 0 === strlen($value)) {
if (null === $value || 0 === \strlen($value)) {
return null;
}
@@ -133,7 +134,7 @@ class Attachment extends Model
*/
public function getMimeAttribute($value)
{
if (null === $value || 0 === strlen($value)) {
if (null === $value || 0 === \strlen($value)) {
return null;
}
@@ -149,7 +150,7 @@ class Attachment extends Model
*/
public function getTitleAttribute($value)
{
if (null === $value || 0 === strlen($value)) {
if (null === $value || 0 === \strlen($value)) {
return null;
}
@@ -219,6 +220,6 @@ class Attachment extends Model
*/
public function user(): BelongsTo
{
return $this->belongsTo('FireflyIII\User');
return $this->belongsTo(User::class);
}
}