MovieEarning   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 24
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A movie() 0 3 1
1
<?php
2
3
/**
4
 * MovieEarning
5
 *
6
 * @property integer        $id
7
 * @property integer        $movie_id
8
 * @property \Carbon\Carbon $date
9
 * @property integer        $domestic
10
 * @property integer        $worldwide
11
 * @property \Carbon\Carbon $created_at
12
 * @property \Carbon\Carbon $updated_at
13
 * @property-read \Movie    $movie
14
 * @method static \Illuminate\Database\Query\Builder|\MovieEarning whereId($value)
15
 * @method static \Illuminate\Database\Query\Builder|\MovieEarning whereMovieId($value)
16
 * @method static \Illuminate\Database\Query\Builder|\MovieEarning whereDate($value)
17
 * @method static \Illuminate\Database\Query\Builder|\MovieEarning whereDomestic($value)
18
 * @method static \Illuminate\Database\Query\Builder|\MovieEarning whereWorldwide($value)
19
 * @method static \Illuminate\Database\Query\Builder|\MovieEarning whereCreatedAt($value)
20
 * @method static \Illuminate\Database\Query\Builder|\MovieEarning whereUpdatedAt($value)
21
 */
22
class MovieEarning extends Eloquent {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
23
24
	/**
25
	 * Fields to format as dates
26
	 * @var array
27
	 */
28
	protected $dates = ['date'];
29
30
	/**
31
	 * Allow filling of these fields
32
	 * @var array
33
	 */
34
	protected $fillable = ['movie_id', 'date', 'domestic', 'worldwide'];
35
36
	/**
37
	 * Get the movie of the earning
38
	 *
39
	 * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
40
	 */
41
	public function movie() {
42
		return $this->belongsTo('Movie');
43
	}
44
45
}