@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | { |
12 | 12 | /** |
13 | 13 | * @Route("/izberg/connector", name="izberg_connector") |
14 | - * @return Response |
|
14 | + * @return \Symfony\Component\HttpFoundation\Response |
|
15 | 15 | */ |
16 | 16 | public function connectAction() |
17 | 17 | { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | /** |
31 | 31 | * @Route("/izberg/users", name="izberg_users") |
32 | - * @return Response |
|
32 | + * @return \Symfony\Component\HttpFoundation\Response |
|
33 | 33 | */ |
34 | 34 | public function usersAction() |
35 | 35 | { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | /** |
42 | 42 | * @Route("/izberg/users/{id}", name="izberg_user", requirements={"id":"\d+"}) |
43 | - * @return Response |
|
43 | + * @return \Symfony\Component\HttpFoundation\Response |
|
44 | 44 | */ |
45 | 45 | public function userAction(Request $request, int $id) |
46 | 46 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | /** |
53 | 53 | * @Route("/izberg/users/schema", name="izberg_user_schema_action") |
54 | - * @return Response |
|
54 | + * @return \Symfony\Component\HttpFoundation\Response |
|
55 | 55 | */ |
56 | 56 | public function userSchemaAction() |
57 | 57 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | /** |
64 | 64 | * @Route("/izberg/carts", name="izberg_carts") |
65 | - * @return Response |
|
65 | + * @return \Symfony\Component\HttpFoundation\Response |
|
66 | 66 | */ |
67 | 67 | public function cartsAction() |
68 | 68 | { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | /** |
75 | 75 | * @Route("/izberg/carts/{id}", name="izberg_cart", requirements={"id":"\d+"}) |
76 | - * @return Response |
|
76 | + * @return \Symfony\Component\HttpFoundation\Response |
|
77 | 77 | */ |
78 | 78 | public function cartAction(Request $request, $id) |
79 | 79 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | /** |
86 | 86 | * @Route("/izberg/carts/schema", name="izberg_cart_schema_action") |
87 | - * @return Response |
|
87 | + * @return \Symfony\Component\HttpFoundation\Response |
|
88 | 88 | */ |
89 | 89 | public function cartSchemaAction() |
90 | 90 | { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | try { |
77 | 77 | return $request->send()->json(); |
78 | - } catch(BadResponseException $e) { |
|
78 | + } catch (BadResponseException $e) { |
|
79 | 79 | echo $e->getMessage(); |
80 | 80 | echo 'There is no object with this id:'.$id; |
81 | 81 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $className = (new \ReflectionClass($this))->getShortName(); |
103 | 103 | $apiNameCalled = str_replace('Izberg', '', $className); |
104 | 104 | |
105 | - switch($functionName) { |
|
105 | + switch ($functionName) { |
|
106 | 106 | case 'get'.$apiNameCalled.'s': |
107 | 107 | return $this->getObjects(static::$url); |
108 | 108 | break; |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/cart/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/cart/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/cart/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/cart/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -9,8 +9,4 @@ |
||
9 | 9 | class IzbergCart extends IzbergClient |
10 | 10 | { |
11 | 11 | protected static $url = 'v1/cart/'; |
12 | -<<<<<<< HEAD |
|
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
|
12 | +<< << <<< HEAD |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/cart/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/cart/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/order/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/order/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/order/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/order/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -9,8 +9,4 @@ |
||
9 | 9 | class IzbergOrder extends IzbergClient |
10 | 10 | { |
11 | 11 | protected static $url = 'v1/order/'; |
12 | -<<<<<<< HEAD |
|
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
|
12 | +<< << <<< HEAD |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/order/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/order/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/user/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/user/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/user/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/user/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -9,8 +9,4 @@ |
||
9 | 9 | class IzbergUser extends IzbergClient |
10 | 10 | { |
11 | 11 | protected static $url = 'v1/user/'; |
12 | -<<<<<<< HEAD |
|
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
|
12 | +<< << <<< HEAD |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/user/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -10,7 +10,3 @@ |
||
10 | 10 | { |
11 | 11 | protected static $url = 'v1/user/'; |
12 | 12 | <<<<<<< HEAD |
13 | -} |
|
14 | -======= |
|
15 | -} |
|
16 | ->>>>>>> 60508b8848c0977a9f9f73f2e8db3c91a48127bc |
@@ -109,8 +109,8 @@ |
||
109 | 109 | $message_auth = hash_hmac('sha1', implode(";", $toCompose), $secretKey); |
110 | 110 | |
111 | 111 | $url = $this->izbergUrl; |
112 | - $url .= 'first_name=' . urlencode($firstName) . '&last_name=' . urlencode($lastName) . '&message_auth=' . $message_auth . '&email=' . urlencode($email); |
|
113 | - $url .= '×tamp=' . $timestamp . '&is_staff=true'; |
|
112 | + $url .= 'first_name='.urlencode($firstName).'&last_name='.urlencode($lastName).'&message_auth='.$message_auth.'&email='.urlencode($email); |
|
113 | + $url .= '×tamp='.$timestamp.'&is_staff=true'; |
|
114 | 114 | return $url; |
115 | 115 | } |
116 | 116 |