Completed
Push — master ( a3b5f9...3352e6 )
by Laurent
03:26
created
src/AppBundle/Entity/Settings.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
     /**
130 130
      * Set first_inventory.
131 131
      *
132
-     * @param datetime $firstInventory Date du premier inventaire
132
+     * @param \DateTime $firstInventory Date du premier inventaire
133 133
      *
134 134
      * @return Settings
135 135
      */
Please login to merge, or discard this patch.
src/AppBundle/Tests/Controller/UserControllerTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
     }
95 95
 
96 96
 /**
97
-     * @depends testCreate
98
-     */
97
+ * @depends testCreate
98
+ */
99 99
 
100 100
     public function testSort() {
101 101
         $client = static::createClient();
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,9 +4,11 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6 6
 
7
-class UserControllerTest extends WebTestCase {
7
+class UserControllerTest extends WebTestCase
8
+{
8 9
 
9
-    public function testCreate() {
10
+    public function testCreate()
11
+    {
10 12
         $client = static::createClient();
11 13
         $crawler = $client->request('GET', '/admin/users/');
12 14
         $this->assertCount(0, $crawler->filter('table.records_list tbody tr'));
@@ -19,7 +21,8 @@  discard block
 block discarded – undo
19 21
         $this->assertCount(1, $crawler->filter('table.records_list tbody tr'));
20 22
     }
21 23
 
22
-    public function testCreateError() {
24
+    public function testCreateError()
25
+    {
23 26
         $client = static::createClient();
24 27
         $crawler = $client->request('GET', '/admin/users/new');
25 28
         $form = $crawler->filter('form button[type="submit"]')->form();
@@ -31,7 +34,8 @@  discard block
 block discarded – undo
31 34
     /**
32 35
      * @depends testCreate
33 36
      */
34
-    public function testEdit() {
37
+    public function testEdit()
38
+    {
35 39
         $client = static::createClient();
36 40
         $crawler = $client->request('GET', '/admin/users/');
37 41
         $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("First value")'));
@@ -50,7 +54,8 @@  discard block
 block discarded – undo
50 54
     /**
51 55
      * @depends testCreate
52 56
      */
53
-    public function testEditError() {
57
+    public function testEditError()
58
+    {
54 59
         $client = static::createClient();
55 60
         $crawler = $client->request('GET', '/admin/users/');
56 61
         $crawler = $client->click($crawler->filter('table.records_list tbody tr td .btn-group a')->eq(1)->link());
@@ -65,7 +70,8 @@  discard block
 block discarded – undo
65 70
     /**
66 71
      * @depends testCreate
67 72
      */
68
-    public function testDelete() {
73
+    public function testDelete()
74
+    {
69 75
         $client = static::createClient();
70 76
         $crawler = $client->request('GET', '/admin/users/');
71 77
         $this->assertTrue($client->getResponse()->isSuccessful());
@@ -79,7 +85,8 @@  discard block
 block discarded – undo
79 85
     /**
80 86
      * @depends testCreate
81 87
      */
82
-    public function testFilter() {
88
+    public function testFilter()
89
+    {
83 90
         $client = static::createClient();
84 91
         $crawler = $client->request('GET', '/admin/users/');
85 92
         $form = $crawler->filter('div#filter form button[type="submit"]')->form(array(
@@ -97,7 +104,8 @@  discard block
 block discarded – undo
97 104
      * @depends testCreate
98 105
      */
99 106
 
100
-    public function testSort() {
107
+    public function testSort()
108
+    {
101 109
         $client = static::createClient();
102 110
         $crawler = $client->request('GET', '/admin/users/');
103 111
         $this->assertCount(1, $crawler->filter('table.records_list th')->eq(0)->filter('a i.fa-sort'));
Please login to merge, or discard this patch.
src/AppBundle/Form/Type/UserFilterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
                 'class' => 'AppBundle\Entity\Group',
23 23
                 'expanded' => true,
24 24
                 'multiple' => true,
25
-                'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
25
+                'apply_filter' => function(QueryInterface $filterQuery, $field, $values) {
26 26
                     $query = $filterQuery->getQueryBuilder();
27 27
                     $query->leftJoin($field, 'm');
28 28
                     // Filter results using orWhere matching ID
Please login to merge, or discard this patch.
src/AppBundle/Menu/RequestVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         if ($item->getUri() === $request->getRequestUri()) {
23 23
             // URL's completely match
24 24
             return true;
25
-        } elseif ($item->getUri() !== $request->getBaseUrl() . '/' &&
25
+        } elseif ($item->getUri() !== $request->getBaseUrl().'/' &&
26 26
             substr($request->getRequestUri(), 0, strlen($item->getUri()))
27 27
             === $item->getUri()) {
28 28
             // URL isn't just "/" and the first part of the URL match
Please login to merge, or discard this patch.
src/AppBundle/Entity/Supplier.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
     /**
148 148
      * Get familylog.
149 149
      *
150
-     * @return FamilyLog
150
+     * @return string
151 151
      */
152 152
     public function getFamilylog()
153 153
     {
Please login to merge, or discard this patch.
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
  */
16 16
 namespace AppBundle\Entity;
17 17
 
18
+use AppBundle\Entity\Contact;
19
+use AppBundle\Entity\FamilyLog;
18 20
 use Doctrine\ORM\Mapping as ORM;
19
-use Symfony\Component\Validator\Constraints as Assert;
20 21
 use Gedmo\Mapping\Annotation as Gedmo;
21 22
 use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
22
-use AppBundle\Entity\Contact;
23
-use AppBundle\Entity\FamilyLog;
23
+use Symfony\Component\Validator\Constraints as Assert;
24 24
 
25 25
 /**
26 26
  * Supplier Entité Supplier.
Please login to merge, or discard this patch.
src/AppBundle/Entity/FamilyLog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -249,9 +249,9 @@
 block discarded – undo
249 249
     
250 250
     public function getIndentedName() {
251 251
         if ($this->parent !== null) {
252
-            return " >> " . $this->name;
252
+            return " >> ".$this->name;
253 253
         } else {
254
-            return "- " . $this->name;
254
+            return "- ".$this->name;
255 255
         }
256 256
     }
257 257
 }
Please login to merge, or discard this patch.
src/AppBundle/Controller/UserController.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
         $url = $this->generateUrl($route ?: $name, is_null($params) ? array() : $params);
205 205
         if (isset($request)) {
206 206
             if ($request->query->has('submit-filter') && $form->handleRequest($request)->isValid()) {
207
-                $request->getSession()->set('filter.' . $name, $request->query->get($form->getName()));
207
+                $request->getSession()->set('filter.'.$name, $request->query->get($form->getName()));
208 208
 
209 209
                 return $this->redirect($url);
210 210
             } elseif ($request->query->has('reset-filter')) {
211
-                $request->getSession()->set('filter.' . $name, null);
211
+                $request->getSession()->set('filter.'.$name, null);
212 212
 
213 213
                 return $this->redirect($url);
214 214
             }
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     protected function getFilter($name)
246 246
     {
247
-        return $this->getRequest()->getSession()->get('filter.' . $name);
247
+        return $this->getRequest()->getSession()->get('filter.'.$name);
248 248
     }
249 249
 
250 250
     /**
Please login to merge, or discard this patch.
Unused Use Statements   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
  */
15 15
 namespace AppBundle\Controller;
16 16
 
17
-use Symfony\Component\HttpFoundation\Request;
18 17
 use AppBundle\Controller\AbstractController;
18
+use AppBundle\Entity\User;
19
+use AppBundle\Form\Type\UserFilterType;
20
+use AppBundle\Form\Type\UserType;
21
+use Doctrine\ORM\QueryBuilder;
19 22
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
20 23
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
21
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
22 24
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
23
-use AppBundle\Entity\User;
24
-use AppBundle\Form\Type\UserType;
25
-use AppBundle\Form\Type\UserFilterType;
25
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
26 26
 use Symfony\Component\Form\FormInterface;
27
-use Doctrine\ORM\QueryBuilder;
27
+use Symfony\Component\HttpFoundation\Request;
28 28
 
29 29
 /**
30 30
  * User controller.
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
      * @param  FormInterface $form
192 192
      * @param  string        $name    route/entity name
193 193
      * @param  string|null   $route   route name, if different from entity name
194
-     * @param  nul|Request   $request Request
194
+     * @param  Request   $request Request
195 195
      * @param  array[]       $params  possible route parameters
196 196
      * @return \Symfony\Component\HttpFoundation\RedirectResponse|null
197 197
      */
Please login to merge, or discard this patch.
src/AppBundle/Controller/InventoryController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      */
291 291
     public function printAction(Inventory $inventory)
292 292
     {
293
-        $file = $inventory->getDate()->format('Ymd') . '-inventory.pdf';
293
+        $file = $inventory->getDate()->format('Ymd').'-inventory.pdf';
294 294
         // Créer et enregistrer le fichier PDF à imprimer
295 295
         $html = $this->renderView(
296 296
             'AppBundle:Inventory:print.pdf.twig',
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             200,
308 308
             array(
309 309
                 'Content-Type' => 'application/pdf',
310
-                'Content-Disposition' => 'attachment; filename="' . $file . '"'
310
+                'Content-Disposition' => 'attachment; filename="'.$file.'"'
311 311
             )
312 312
         );
313 313
     }
Please login to merge, or discard this patch.
Unused Use Statements   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,18 +14,17 @@
 block discarded – undo
14 14
  */
15 15
 namespace AppBundle\Controller;
16 16
 
17
-use Symfony\Component\HttpFoundation\Request;
18
-use Symfony\Component\HttpFoundation\Response;
19 17
 use AppBundle\Controller\AbstractController;
20
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
21
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
22
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
23
-
24 18
 use AppBundle\Entity\Inventory;
25
-use AppBundle\Form\Type\InventoryType;
26 19
 use AppBundle\Entity\InventoryArticles;
27 20
 use AppBundle\Form\Type\InventoryEditType;
21
+use AppBundle\Form\Type\InventoryType;
28 22
 use AppBundle\Form\Type\InventoryValidType;
23
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
24
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
25
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
26
+use Symfony\Component\HttpFoundation\Request;
27
+use Symfony\Component\HttpFoundation\Response;
29 28
 
30 29
 /**
31 30
  * Inventory controller.
Please login to merge, or discard this patch.
src/AppBundle/Entity/InventoryArticles.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     /**
90 90
      * Get inventory
91 91
      *
92
-     * @return string
92
+     * @return Inventory
93 93
      */
94 94
     public function getInventory()
95 95
     {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     /**
113 113
      * Get article
114 114
      *
115
-     * @return string
115
+     * @return Article
116 116
      */
117 117
     public function getArticle()
118 118
     {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     /**
205 205
      * Get unit_storage
206 206
      *
207
-     * @return \AppBundle\Entity\UnitStorage
207
+     * @return string
208 208
      */
209 209
     public function getUnitStorage()
210 210
     {
Please login to merge, or discard this patch.