Completed
Push — master ( 5c637a...214bce )
by Julien
03:47
created
app/Http/Models/Movies.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * de ma table movies
13 13
  * Hérite de ma super classe Model
14 14
  */
15
-class Movies extends Model implements ItemInterface{
15
+class Movies extends Model implements ItemInterface {
16 16
 
17 17
 
18 18
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      *  Retourne tous les films
32 32
      */
33
-    public function getAllMovies(){
33
+    public function getAllMovies() {
34 34
 
35 35
         // retourne le resultat de ma requete SELECT * FROM movies
36 36
         return DB::table('movies')->get();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * Return moyenne des notes de presse
43 43
      */
44
-    public function getAvgNotePresse(){
44
+    public function getAvgNotePresse() {
45 45
         $result = DB::table('movies')
46 46
                 ->select(DB::raw("ROUND(AVG(note_presse)) as avgpress"))
47 47
                 ->first();
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function user()
70 70
     {
71
-        return $this->belongsToMany('App\Http\Models\User', 'user_favoris',  'movies_id', 'user_id');
71
+        return $this->belongsToMany('App\Http\Models\User', 'user_favoris', 'movies_id', 'user_id');
72 72
     }
73 73
 
74 74
     /**
Please login to merge, or discard this patch.
app/Http/Cart/MoviesItem.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * Interface ItemInterface
9 9
  * @package App\Http\Cart
10 10
  */
11
-class MoviesItem implements ItemInterface{
11
+class MoviesItem implements ItemInterface {
12 12
 
13 13
     /**
14 14
      * @var $id
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * Constructor
20 20
      * @param $id
21 21
      */
22
-    public function __construct($id){
22
+    public function __construct($id) {
23 23
 
24 24
         $this->id = $id;
25 25
     }
@@ -27,22 +27,22 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @return mixed
29 29
      */
30
-    public function add(ItemInterface $item){}
30
+    public function add(ItemInterface $item) {}
31 31
 
32 32
     /**
33 33
      * @return mixed
34 34
      */
35
-    public function remove(ItemInterface $item){}
35
+    public function remove(ItemInterface $item) {}
36 36
 
37 37
     /**
38 38
      * @return mixed
39 39
      */
40
-    public function clear(){}
40
+    public function clear() {}
41 41
 
42 42
     /**
43 43
      * @return mixed
44 44
      */
45
-    public function all(){}
45
+    public function all() {}
46 46
 
47 47
 
48 48
     /**
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
      * @return mixed
51 51
      * @throws ItemException
52 52
      */
53
-    public function getMovie(){
53
+    public function getMovie() {
54 54
         $movie = Movies::find($this->id);
55 55
 
56
-        if($movie->price !== 0){
56
+        if ($movie->price !== 0) {
57 57
             throw new ItemException('Le produit a un prix à 0');
58 58
         }
59 59
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @return mixed
66 66
      * @throws ItemException
67 67
      */
68
-    public function __toString(){
68
+    public function __toString() {
69 69
         return $this->getMovie()->id;
70 70
     }
71 71
 
Please login to merge, or discard this patch.
app/Http/Cart/CartServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function register()
31 31
     {
32
-        $this->app->singleton(Cart::class, function ($app) {
32
+        $this->app->singleton(Cart::class, function($app) {
33 33
             return new Cart();
34 34
         });
35 35
     }
Please login to merge, or discard this patch.
app/Http/Cart/ItemInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Interface ItemInterface
7 7
  * @package App\Http\Cart
8 8
  */
9
-interface ItemInterface{
9
+interface ItemInterface {
10 10
 
11 11
     /**
12 12
      * @return mixed
Please login to merge, or discard this patch.