Skip to content

Commit

Permalink
Code cleaning (removed redundant name space root paths)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjdejong committed Dec 28, 2024
1 parent 42a520e commit 301af2c
Show file tree
Hide file tree
Showing 20 changed files with 97 additions and 97 deletions.
18 changes: 9 additions & 9 deletions app/Models/Actor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,47 @@ class Actor extends Model

public function company()
{
return $this->belongsTo(\App\Models\Actor::class, 'company_id');
return $this->belongsTo(Actor::class, 'company_id');
}

public function parent()
{
return $this->belongsTo(\App\Models\Actor::class, 'parent_id');
return $this->belongsTo(Actor::class, 'parent_id');
}

public function site()
{
return $this->belongsTo(\App\Models\Actor::class, 'site_id');
return $this->belongsTo(Actor::class, 'site_id');
}

public function matters()
{
return $this->belongsToMany(\App\Models\Matter::class, 'matter_actor_lnk');
return $this->belongsToMany(Matter::class, 'matter_actor_lnk');
}

public function droleInfo()
{
return $this->belongsTo(\App\Models\Role::class, 'default_role');
return $this->belongsTo(Role::class, 'default_role');
}

public function countryInfo()
{
return $this->belongsTo(\App\Models\Country::class, 'country');
return $this->belongsTo(Country::class, 'country');
}

public function country_mailingInfo()
{
return $this->belongsTo(\App\Models\Country::class, 'country_mailing');
return $this->belongsTo(Country::class, 'country_mailing');
}

public function country_billingInfo()
{
return $this->belongsTo(\App\Models\Country::class, 'country_billing');
return $this->belongsTo(Country::class, 'country_billing');
}

public function nationalityInfo()
{
return $this->belongsTo(\App\Models\Country::class, 'nationality');
return $this->belongsTo(Country::class, 'nationality');
}

public function getTableComments($table_name = null)
Expand Down
8 changes: 4 additions & 4 deletions app/Models/ActorPivot.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ class ActorPivot extends Pivot

public function matter()
{
return $this->belongsTo(\App\Models\Matter::class);
return $this->belongsTo(Matter::class);
}

public function actor()
{
return $this->belongsTo(\App\Models\Actor::class);
return $this->belongsTo(Actor::class);
}

public function role()
{
return $this->belongsTo(\App\Models\Role::class, 'role');
return $this->belongsTo(Role::class, 'role');
}

public function company()
{
return $this->belongsTo(\App\Models\Actor::class, 'company_id');
return $this->belongsTo(Actor::class, 'company_id');
}
}
4 changes: 2 additions & 2 deletions app/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class Category extends Model

public function matter()
{
return $this->hasMany(\App\Models\Matter::class);
return $this->hasMany(Matter::class);
}

public function displayWithInfo()
{
return $this->belongsTo(\App\Models\Category::class, 'display_with', 'code');
return $this->belongsTo(Category::class, 'display_with', 'code');
}
}
6 changes: 3 additions & 3 deletions app/Models/Classifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ class Classifier extends Model

public function type()
{
return $this->belongsTo(\App\Models\ClassifierType::class, 'type_code');
return $this->belongsTo(ClassifierType::class, 'type_code');
}

public function linkedMatter()
{
return $this->belongsTo(\App\Models\Matter::class, 'lnk_matter_id');
return $this->belongsTo(Matter::class, 'lnk_matter_id');
}

public function matter()
{
return $this->belongsTo(\App\Models\Matter::class);
return $this->belongsTo(Matter::class);
}
}
2 changes: 1 addition & 1 deletion app/Models/ClassifierType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class ClassifierType extends Model

public function category()
{
return $this->belongsTo(\App\Models\Category::class, 'for_category', 'code');
return $this->belongsTo(Category::class, 'for_category', 'code');
}
}
10 changes: 5 additions & 5 deletions app/Models/DefaultActor.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ class DefaultActor extends Model

public function actor()
{
return $this->belongsTo(\App\Models\Actor::class);
return $this->belongsTo(Actor::class);
}

public function country()
{
return $this->belongsTo(\App\Models\Country::class, 'for_country', 'iso');
return $this->belongsTo(Country::class, 'for_country', 'iso');
}

public function category()
{
return $this->belongsTo(\App\Models\Category::class, 'for_category', 'code');
return $this->belongsTo(Category::class, 'for_category', 'code');
}

public function client()
{
return $this->belongsTo(\App\Models\Actor::class, 'for_client');
return $this->belongsTo(Actor::class, 'for_client');
}

public function roleInfo()
{
return $this->belongsTo(\App\Models\Role::class, 'role', 'code');
return $this->belongsTo(Role::class, 'role', 'code');
}
}
12 changes: 6 additions & 6 deletions app/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ class Event extends Model

public function info()
{
return $this->hasOne(\App\Models\EventName::class, 'code', 'code');
return $this->hasOne(EventName::class, 'code', 'code');
}

public function matter()
{
return $this->belongsTo(\App\Models\Matter::class);
return $this->belongsTo(Matter::class);
}

public function altMatter()
{
return $this->belongsTo(\App\Models\Matter::class, 'alt_matter_id')->withDefault();
return $this->belongsTo(Matter::class, 'alt_matter_id')->withDefault();
}

public function link()
{
return $this->hasOne(\App\Models\Event::class, 'matter_id', 'alt_matter_id')->whereCode('FIL')->withDefault();
return $this->hasOne(Event::class, 'matter_id', 'alt_matter_id')->whereCode('FIL')->withDefault();
}

public function retroLink()
{
return $this->belongsTo(\App\Models\Event::class, 'matter_id', 'alt_matter_id')->withDefault();
return $this->belongsTo(Event::class, 'matter_id', 'alt_matter_id')->withDefault();
}

public function tasks()
Expand All @@ -49,7 +49,7 @@ public function tasks()
var_dump($query->sql);
var_dump($query->bindings);
}); */
return $this->hasMany(\App\Models\Task::class, 'trigger_id')->orderBy('due_date');
return $this->hasMany(Task::class, 'trigger_id')->orderBy('due_date');
}

public function cleanNumber()
Expand Down
2 changes: 1 addition & 1 deletion app/Models/EventClassLnk.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class EventClassLnk extends Model

public function class()
{
return $this->belongsTo(\App\Models\TemplateClass::class, 'template_class_id');
return $this->belongsTo(TemplateClass::class, 'template_class_id');
}
}
12 changes: 6 additions & 6 deletions app/Models/EventName.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@ class EventName extends Model

public function events()
{
return $this->hasMany(\App\Models\Event::class, 'code');
return $this->hasMany(Event::class, 'code');
}

public function tasks()
{
return $this->hasMany(\App\Models\Task::class, 'code');
return $this->hasMany(Task::class, 'code');
}

public function countryInfo()
{
return $this->belongsTo(\App\Models\Country::class, 'country', 'iso');
return $this->belongsTo(Country::class, 'country', 'iso');
}

public function categoryInfo()
{
return $this->belongsTo(\App\Models\Category::class, 'category', 'code');
return $this->belongsTo(Category::class, 'category', 'code');
}

public function default_responsibleInfo()
{
return $this->belongsTo(\App\Models\User::class, 'default_responsible', 'login');
return $this->belongsTo(User::class, 'default_responsible', 'login');
}

public function templates()
{
return $this->belongsToMany(\App\Models\TemplateClass::class, 'event_class_lnk', 'event_name_code', 'template_class_id');
return $this->belongsToMany(TemplateClass::class, 'event_class_lnk', 'event_name_code', 'template_class_id');
}
}
6 changes: 3 additions & 3 deletions app/Models/Fee.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ class Fee extends Model

public function country()
{
return $this->belongsTo(\App\Models\Country::class, 'for_country');
return $this->belongsTo(Country::class, 'for_country');
}

public function category()
{
return $this->belongsTo(\App\Models\Category::class, 'for_category', 'code');
return $this->belongsTo(Category::class, 'for_category', 'code');
}

public function origin()
{
return $this->belongsTo(\App\Models\Country::class, 'for_origin', 'iso');
return $this->belongsTo(Country::class, 'for_origin', 'iso');
}
}
Loading

0 comments on commit 301af2c

Please sign in to comment.