Completed
Push — master ( ae2ff7...098746 )
by Maxence
02:30
created
src/Maxpou/BeerBundle/Entity/Brewery.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     /**
79 79
      * Get id
80 80
      *
81
-     * @return UUID
81
+     * @return integer
82 82
      */
83 83
     public function getId()
84 84
     {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     /**
158 158
      * Get beers
159 159
      *
160
-     * @return \Doctrine\Common\Collections\Collection
160
+     * @return Beer
161 161
      */
162 162
     public function getBeers()
163 163
     {
Please login to merge, or discard this patch.
src/ApiBundle/Tests/Controller/BreweryApiControllerTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
     {
15 15
         $client = static::createClient();
16 16
         $em = $client->getContainer()
17
-                     ->get('doctrine')
18
-                     ->getManager();
17
+                        ->get('doctrine')
18
+                        ->getManager();
19 19
 
20 20
         $loader = new Loader();
21 21
         $loader->addFixture(new LoadBeersData());
Please login to merge, or discard this patch.
src/ApiBundle/Controller/BreweryController.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $em        = $this->getDoctrine()->getManager();
43 43
         $breweries = $em  ->getRepository('MaxpouBeerBundle:Brewery')
44
-                          ->findBy([], ['name' => 'ASC'], $limit, $offset);
44
+                            ->findBy([], ['name' => 'ASC'], $limit, $offset);
45 45
 
46 46
         $context = SerializationContext::create()->setGroups(array('Default','list'));
47 47
         $view = $this->view($breweries, 200);
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
     }
52 52
 
53 53
     /**
54
-      * Get a Brewery entity
55
-      * @ApiDoc(
56
-      *  statusCodes={
57
-      *      200="Returned when successful",
58
-      *      400="Returned when parameter is wrong",
59
-      *      404="Returned when not found"
60
-      * })
61
-      */
54
+     * Get a Brewery entity
55
+     * @ApiDoc(
56
+     *  statusCodes={
57
+     *      200="Returned when successful",
58
+     *      400="Returned when parameter is wrong",
59
+     *      404="Returned when not found"
60
+     * })
61
+     */
62 62
     public function getAction($breweryId)
63 63
     {
64 64
     //   * @Route(requirements={
@@ -81,20 +81,20 @@  discard block
 block discarded – undo
81 81
     }
82 82
 
83 83
     /**
84
-      * Add a Brewery
85
-      *
86
-      * @ApiDoc(
87
-      *  statusCodes={
88
-      *      201="Returned when successful",
89
-      *      400="Returned when parameter is wrong"
90
-      *  },
91
-      *  input = {
92
-      *      "class" = "Maxpou\BeerBundle\Form\Type\BreweryType",
93
-      *      "groups"={"list"},
94
-      *      "name" = ""
95
-      *  },
96
-      * )
97
-      */
84
+     * Add a Brewery
85
+     *
86
+     * @ApiDoc(
87
+     *  statusCodes={
88
+     *      201="Returned when successful",
89
+     *      400="Returned when parameter is wrong"
90
+     *  },
91
+     *  input = {
92
+     *      "class" = "Maxpou\BeerBundle\Form\Type\BreweryType",
93
+     *      "groups"={"list"},
94
+     *      "name" = ""
95
+     *  },
96
+     * )
97
+     */
98 98
     public function postAction(Request $request)
99 99
     {
100 100
         $brewery = new Brewery();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $breweries = $em  ->getRepository('MaxpouBeerBundle:Brewery')
44 44
                           ->findBy([], ['name' => 'ASC'], $limit, $offset);
45 45
 
46
-        $context = SerializationContext::create()->setGroups(array('Default','list'));
46
+        $context = SerializationContext::create()->setGroups(array('Default', 'list'));
47 47
         $view = $this->view($breweries, 200);
48 48
         $view->setSerializationContext($context);
49 49
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             throw new HttpException(404, 'Unable to find this Brewery entity');
74 74
         }
75 75
 
76
-        $context = SerializationContext::create()->setGroups(array('Default','details'));
76
+        $context = SerializationContext::create()->setGroups(array('Default', 'details'));
77 77
         $view = $this->view($brewery, 200);
78 78
         $view->setSerializationContext($context);
79 79
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $em->flush();
109 109
 
110 110
             $view = $this->view($brewery, 201);
111
-            $context = SerializationContext::create()->setGroups(array('Default','details'));
111
+            $context = SerializationContext::create()->setGroups(array('Default', 'details'));
112 112
             $view->setSerializationContext($context);
113 113
         } else {
114 114
             $view = $this->view($form, 400);
Please login to merge, or discard this patch.
src/ApiBundle/Controller/BeerController.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -39,23 +39,23 @@  discard block
 block discarded – undo
39 39
 
40 40
         $em    = $this->getDoctrine()->getManager();
41 41
         $beers = $em ->getRepository('MaxpouBeerBundle:Beer')
42
-                     ->findBy(
43
-                         ['brewery' => $breweryId],
44
-                         ['name' => 'ASC'], $limit, $offset
45
-                     );
42
+                        ->findBy(
43
+                            ['brewery' => $breweryId],
44
+                            ['name' => 'ASC'], $limit, $offset
45
+                        );
46 46
 
47 47
         return $beers;
48 48
     }
49 49
 
50 50
     /**
51
-      * Get a Beer entity
52
-      *
53
-      * @ApiDoc(
54
-      *  statusCodes={
55
-      *      200="Returned when successful",
56
-      *      404="Returned when not found"
57
-      * })
58
-      */
51
+     * Get a Beer entity
52
+     *
53
+     * @ApiDoc(
54
+     *  statusCodes={
55
+     *      200="Returned when successful",
56
+     *      404="Returned when not found"
57
+     * })
58
+     */
59 59
     public function getAction($breweryId, $beerId)
60 60
     {
61 61
         $brewery = $this->getDoctrine()->getManager()
@@ -78,18 +78,18 @@  discard block
 block discarded – undo
78 78
     }
79 79
 
80 80
     /**
81
-      * Add a Beer
82
-      *
83
-      * @ApiDoc(
84
-      *  statusCodes={
85
-      *       201="Returned when successful",
86
-      *       400="Returned when parameter is wrong"
87
-      *  },
88
-      *  input = {
89
-      *      "class" = "Maxpou\BeerBundle\Form\Type\BeerApiType",
90
-      *      "name"  = ""
91
-      * })
92
-      */
81
+     * Add a Beer
82
+     *
83
+     * @ApiDoc(
84
+     *  statusCodes={
85
+     *       201="Returned when successful",
86
+     *       400="Returned when parameter is wrong"
87
+     *  },
88
+     *  input = {
89
+     *      "class" = "Maxpou\BeerBundle\Form\Type\BeerApiType",
90
+     *      "name"  = ""
91
+     * })
92
+     */
93 93
     public function postAction($breweryId, Request $request)
94 94
     {
95 95
         $brewery = $this->getDoctrine()->getManager()
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
     public function putAction($breweryId, Request $request, $beerId)
139 139
     {
140 140
         $beer = $this->getDoctrine()->getManager()
141
-                     ->getRepository('MaxpouBeerBundle:Beer')
142
-                     ->find($beerId);
141
+                        ->getRepository('MaxpouBeerBundle:Beer')
142
+                        ->find($beerId);
143 143
 
144 144
         if (!$beer) {
145 145
             throw new HttpException(404, 'Unable to find this Beer entity');
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
     public function deleteAction($breweryId, $beerId)
175 175
     {
176 176
         $beer = $this->getDoctrine()->getManager()
177
-                     ->getRepository('MaxpouBeerBundle:Beer')
178
-                     ->find($beerId);
177
+                        ->getRepository('MaxpouBeerBundle:Beer')
178
+                        ->find($beerId);
179 179
 
180 180
         if ($beer) {
181 181
             $em = $this->getDoctrine()->getManager();
Please login to merge, or discard this patch.
src/ApiBundle/Tests/Controller/BeerApiControllerTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
     {
15 15
         $client = static::createClient();
16 16
         $em = $client->getContainer()
17
-                     ->get('doctrine')
18
-                     ->getManager();
17
+                        ->get('doctrine')
18
+                        ->getManager();
19 19
 
20 20
         $loader = new Loader();
21 21
         $loader->addFixture(new LoadBeersData());
Please login to merge, or discard this patch.
src/Maxpou/BeerBundle/Tests/Controller/BeerControllerTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
     {
15 15
         $client = static::createClient();
16 16
         $em = $client->getContainer()
17
-                     ->get('doctrine')
18
-                     ->getManager();
17
+                        ->get('doctrine')
18
+                        ->getManager();
19 19
 
20 20
         $loader = new Loader();
21 21
         $loader->addFixture(new LoadBeersData());
Please login to merge, or discard this patch.