Passed
Push — master ( c430e0...09e8fc )
by Davide
02:42 queued 11s
created

EventVenue   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 29
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getVenueName() 0 5 1
1
<?php
2
3
namespace DavideCasiraghi\LaravelEventsCalendar\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class EventVenue extends Model
8
{
9
    /***************************************************************************/
10
    /**
11
     * The table associated with the model.
12
     *
13
     * @var string
14
     */
15
    protected $table = 'event_venues';
16
17
    /***************************************************************************/
18
19
    protected $fillable = [
20
        'name', 'slug', 'continent_id', 'country_id', 'city', 'state_province', 'address', 'zip_code', 'description', 'website', 'created_by', 'created_at', 'updated_at',
21
    ];
22
23
    /***************************************************************************/
24
25
    /**
26
     * Return the venue name.
27
     *
28
     * @param int $venueId
29
     * @return string
30
     */
31
    public static function getVenueName($venueId)
32
    {
33
        $ret = self::find($venueId)->name;
34
35
        return $ret;
36
    }
37
}
38