Completed
Push — master ( 5c637a...214bce )
by Julien
03:47
created
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.
app/Http/Cart/Cart.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
     /**
29 29
      * Constructor
30 30
      */
31
-    public function __construct(Array $products = []){
31
+    public function __construct(Array $products = [ ]) {
32 32
         $this->products = $products;
33
-        $this->promotions = [];
33
+        $this->promotions = [ ];
34 34
         $this->total = 0;
35 35
     }
36 36
 
@@ -38,17 +38,17 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * @param ItemInterface $item
40 40
      */
41
-    public function add(ItemInterface $item){
42
-        $this->products[] = $item;
41
+    public function add(ItemInterface $item) {
42
+        $this->products[ ] = $item;
43 43
 
44 44
         return $this;
45 45
     }
46 46
     /**
47 47
      * @param ItemInterface $item
48 48
      */
49
-    public function addItems(Collection $collection){
50
-        foreach($collection as $item){
51
-            $this->products[] = $item;
49
+    public function addItems(Collection $collection) {
50
+        foreach ($collection as $item) {
51
+            $this->products[ ] = $item;
52 52
         }
53 53
         return $this->products;
54 54
     }
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * @param ItemInterface $item
58 58
      */
59
-    public function remove(ItemInterface $item){
60
-        $this->products[array_search($item,$this->products)] = $item;
59
+    public function remove(ItemInterface $item) {
60
+        $this->products[ array_search($item, $this->products) ] = $item;
61 61
 
62 62
         return $this;
63 63
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function clear()
70 70
     {
71
-        $this->products = [];
71
+        $this->products = [ ];
72 72
 
73 73
         return $this->products;
74 74
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * @return array
78 78
      */
79
-    public function all(){
79
+    public function all() {
80 80
 
81 81
         return $this->products;
82 82
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function total($taxe = 1)
107 107
     {
108
-        foreach($this as $movie){
108
+        foreach ($this as $movie) {
109 109
             $this->total += $movie->getMovie()->prix;
110 110
         }
111 111
 
Please login to merge, or discard this patch.