Completed
Push — master ( bc41e1...0c40f4 )
by itkg-nanne
03:44
created
Functional/BackofficeBundle/EventSubscriber/BlockFormTypeSubscriberTest.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     }
166 166
 
167 167
     /**
168
-     * @param $data
168
+     * @param BlockInterface $data
169 169
      */
170 170
     protected function assertBlock($data)
171 171
     {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     /**
178 178
      * @param string $condition
179 179
      *
180
-     * @return array
180
+     * @return string
181 181
      */
182 182
     protected function replaceKeywordLabelById($condition)
183 183
     {
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -48,20 +48,20 @@  discard block
 block discarded – undo
48 48
         $formType =  static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block);
49 49
         $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false));
50 50
 
51
-         $form->submit(array(
52
-             'style' => 'default',
53
-             'videoType' => 'youtube',
54
-             'youtubeVideoId' => 'videoId',
55
-             'youtubeAutoplay' => true,
56
-         ));
57
-
58
-         $this->assertTrue($form->isSynchronized());
59
-         /** @var BlockInterface $data */
60
-         $data = $form->getConfig()->getData();
61
-         $this->assertBlock($data);
62
-         $this->assertSame('videoId', $data->getAttribute('youtubeVideoId'));
63
-         $this->assertTrue($data->getAttribute('youtubeAutoplay'));
64
-         $this->assertFalse($data->getAttribute('youtubeFs'));
51
+            $form->submit(array(
52
+                'style' => 'default',
53
+                'videoType' => 'youtube',
54
+                'youtubeVideoId' => 'videoId',
55
+                'youtubeAutoplay' => true,
56
+            ));
57
+
58
+            $this->assertTrue($form->isSynchronized());
59
+            /** @var BlockInterface $data */
60
+            $data = $form->getConfig()->getData();
61
+            $this->assertBlock($data);
62
+            $this->assertSame('videoId', $data->getAttribute('youtubeVideoId'));
63
+            $this->assertTrue($data->getAttribute('youtubeAutoplay'));
64
+            $this->assertFalse($data->getAttribute('youtubeFs'));
65 65
     }
66 66
 
67 67
     /**
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
             array(ContentListStrategy::NAME, array(
100 100
                 'contentNodeId' => 'root',
101 101
                 'contentSearch' => array(
102
-                  'contentType' => 'news',
103
-                  'choiceType' => 'choice_and',
104
-                  'keywords' => null,
102
+                    'contentType' => 'news',
103
+                    'choiceType' => 'choice_and',
104
+                    'keywords' => null,
105 105
                 ),
106 106
                 'characterNumber' => 150,
107 107
                 'contentTemplateEnabled' => true,
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $block->setComponent(VideoStrategy::NAME);
46 46
         $block->addAttribute('videoType', 'youtube');
47 47
         $block->addAttribute('youtubeFs', true);
48
-        $formType =  static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block);
48
+        $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block);
49 49
         $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false));
50 50
 
51 51
          $form->submit(array(
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $block = new Block();
76 76
         $block->setComponent($component);
77
-        $formType =  static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block);
77
+        $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block);
78 78
 
79 79
         $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false));
80 80
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $block = new Block();
130 130
         $block->setComponent($component);
131
-        $formType =  static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block);
131
+        $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block);
132 132
 
133 133
         $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false));
134 134
         $submittedValue = array_merge(array('style' => 'default'), $value);
Please login to merge, or discard this patch.
Tests/Functional/MediaAdminBundle/Controller/MediaControllerTest.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@
 block discarded – undo
25 25
     }
26 26
 
27 27
     /**
28
-     * @param string $form
29 28
      */
30 29
     public function testMediaForms()
31 30
     {
Please login to merge, or discard this 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 testMediaForms()
31 31
     {
32
-        $url = '/admin/media/' . $this->media->getId();
32
+        $url = '/admin/media/'.$this->media->getId();
33 33
 
34 34
         $this->client->request('GET', $url);
35 35
 
Please login to merge, or discard this patch.
MediaAdminBundle/EventSubscriber/UpdateMediaReferenceSubscriberTest.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,6 @@
 block discarded – undo
129 129
 
130 130
     /**
131 131
      * @param string $blockType
132
-     * @param string $id
133 132
      *
134 133
      * @return Block
135 134
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
         $block = $this->generateBlock($blockType['component']);
67 67
         $attributes = $block->getAttributes();
68 68
         $attributes['pictures'] = array(array('id' => $media->getId(), 'format' => ''));
69
-        $attributes['id'] = $blockType["component"] . self::ATTRIBUTE_ID_SUFFIX;
70
-        $method = $blockType["component"] . self::METHOD_SUFFIX;
69
+        $attributes['id'] = $blockType["component"].self::ATTRIBUTE_ID_SUFFIX;
70
+        $method = $blockType["component"].self::METHOD_SUFFIX;
71 71
         $attributes = $this->$method($attributes);
72 72
         $block->setAttributes($attributes);
73 73
 
Please login to merge, or discard this patch.
Tests/Functional/MediaAdminBundle/Repository/MediaRepositoryTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -548,7 +548,7 @@
 block discarded – undo
548 548
     /**
549 549
      * @param string $condition
550 550
      *
551
-     * @return array
551
+     * @return string
552 552
      */
553 553
     protected function replaceKeywordLabelById($condition)
554 554
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,10 +137,10 @@
 block discarded – undo
137 137
      */
138 138
     public function providePaginateConfiguration()
139 139
     {
140
-        $mapping =  array();
141
-        $conf1 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, null);
142
-        $conf2 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, array('label' => 'dolor', 'language' => 'en'));
143
-        $conf3 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, array('type' => 'pdf'));
140
+        $mapping = array();
141
+        $conf1 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, null);
142
+        $conf2 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, array('label' => 'dolor', 'language' => 'en'));
143
+        $conf3 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, array('type' => 'pdf'));
144 144
 
145 145
         return array(
146 146
             'No criteria'       => array('2', $conf1, 6, 6),
Please login to merge, or discard this patch.
Tests/Functional/ModelBundle/Repository/ContentRepositoryTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -548,7 +548,7 @@
 block discarded – undo
548 548
     /**
549 549
      * @param string $condition
550 550
      *
551
-     * @return array
551
+     * @return string
552 552
      */
553 553
     protected function replaceKeywordLabelById($condition)
554 554
     {
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     {
197 197
         return array(
198 198
             array('car', ContentRepositoryInterface::CHOICE_AND, 'lorem', 3),
199
-            array('car',ContentRepositoryInterface::CHOICE_AND, 'sit', 1),
199
+            array('car', ContentRepositoryInterface::CHOICE_AND, 'sit', 1),
200 200
             array('car', ContentRepositoryInterface::CHOICE_AND, 'dolor', 0),
201 201
             array('car', ContentRepositoryInterface::CHOICE_AND, 'sit AND lorem', 1),
202 202
             array('news', ContentRepositoryInterface::CHOICE_AND, 'lorem', 1),
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             'fields.tinimce_test.string_value' => 'attributes.tinimce_test.stringValue',
338 338
         );
339 339
 
340
-        $searchTypes = array (
340
+        $searchTypes = array(
341 341
             'attributes.car_name' => 'text',
342 342
             'attributes.description' => 'text',
343 343
             'attributes.on_market' => 'date',
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         $contents = $this->repository->findForPaginateFilterByContentTypeSiteAndLanguage($configuration, $contentType, $siteId, $language, $searchTypes);
350 350
         $repositoryCount = $this->repository->countWithFilterAndContentTypeSiteAndLanguage($configuration, $contentType, $siteId, $language, $searchTypes);
351 351
 
352
-        if(!is_null($name)) {
352
+        if (!is_null($name)) {
353 353
             $this->assertEquals($name, $contents[0]->getName());
354 354
         }
355 355
         $this->assertCount($count, $contents);
@@ -362,16 +362,16 @@  discard block
 block discarded – undo
362 362
     public function provideContentTypeAndPaginateAndSearchAndsiteId()
363 363
     {
364 364
         return array(
365
-            1  => array('car', null, array("name" => "name", "dir" => "asc"), '2', 0 ,5 , 'en', 3, 3, '206 3 portes en'),
366
-            2  => array('car', null, array("name" => "name", "dir" => "desc"), '2', 0 ,5 , 'en', 3, 3, 'R5 3 portes en'),
367
-            3  => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "asc"), '2', 0 ,5 , 'en', 3, 3, '206 3 portes en'),
368
-            4  => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "desc"),'2', 0 ,5 , 'en', 3, 3, 'R5 3 portes en'),
369
-            5  => array('car', null, null, null, 0 ,1 , 'en', 1, 2),
370
-            6  => array('car', array('attributes.car_name' => '206'), null, '2', 0 , 2 , 'en', 1, 1),
371
-            7  => array('news', null, null, '2', 0 , 100, 'fr', 4, 4),
372
-            8  => array('news', null, null, '2', 50 , 100, 'en', 0, 0),
373
-            9 => array('news', array('name' => 'news'), null, '2', 0 , null, 'fr', 0, 0),
374
-            10 => array('car', null, null, '2', 0 ,5 , 'en', 3, 3),
365
+            1  => array('car', null, array("name" => "name", "dir" => "asc"), '2', 0, 5, 'en', 3, 3, '206 3 portes en'),
366
+            2  => array('car', null, array("name" => "name", "dir" => "desc"), '2', 0, 5, 'en', 3, 3, 'R5 3 portes en'),
367
+            3  => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "asc"), '2', 0, 5, 'en', 3, 3, '206 3 portes en'),
368
+            4  => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "desc"), '2', 0, 5, 'en', 3, 3, 'R5 3 portes en'),
369
+            5  => array('car', null, null, null, 0, 1, 'en', 1, 2),
370
+            6  => array('car', array('attributes.car_name' => '206'), null, '2', 0, 2, 'en', 1, 1),
371
+            7  => array('news', null, null, '2', 0, 100, 'fr', 4, 4),
372
+            8  => array('news', null, null, '2', 50, 100, 'en', 0, 0),
373
+            9 => array('news', array('name' => 'news'), null, '2', 0, null, 'fr', 0, 0),
374
+            10 => array('car', null, null, '2', 0, 5, 'en', 3, 3),
375 375
         );
376 376
     }
377 377
 
@@ -523,63 +523,63 @@  discard block
 block discarded – undo
523 523
      */
524 524
     protected function getDescriptionColumnEntity()
525 525
     {
526
-        return array (
526
+        return array(
527 527
             'name' =>
528
-            array (
528
+            array(
529 529
                 'key' => 'name',
530 530
                 'field' => 'name',
531 531
                 'type' => 'string',
532 532
             ),
533 533
             'language' =>
534
-            array (
534
+            array(
535 535
                 'key' => 'language',
536 536
                 'field' => 'language',
537 537
                 'type' => 'string',
538 538
             ),
539 539
             'status_label' =>
540
-            array (
540
+            array(
541 541
                 'key' => 'status_label',
542 542
                 'field' => 'status',
543 543
                 'type' => 'multiLanguages',
544 544
             ),
545 545
             'version' =>
546
-            array (
546
+            array(
547 547
                 'key' => 'version',
548 548
                 'field' => 'version',
549 549
                 'type' => 'integer',
550 550
             ),
551 551
             'linked_to_site' =>
552
-            array (
552
+            array(
553 553
                 'key' => 'linked_to_site',
554 554
                 'field' => 'linkedTosite',
555 555
                 'type' => 'boolean',
556 556
             ),
557 557
             'created_by' =>
558
-            array (
558
+            array(
559 559
                 'key' => 'created_by',
560 560
                 'field' => 'createdBy',
561 561
                 'type' => 'string',
562 562
             ),
563 563
             'updated_by' =>
564
-            array (
564
+            array(
565 565
                 'key' => 'updated_by',
566 566
                 'field' => 'updatedBy',
567 567
                 'type' => 'string',
568 568
             ),
569 569
             'created_at' =>
570
-            array (
570
+            array(
571 571
                 'key' => 'created_at',
572 572
                 'field' => 'createdAt',
573 573
                 'type' => 'date',
574 574
             ),
575 575
             'updated_at' =>
576
-            array (
576
+            array(
577 577
                 'key' => 'updated_at',
578 578
                 'field' => 'updatedAt',
579 579
                 'type' => 'date',
580 580
             ),
581 581
             'deleted' =>
582
-            array (
582
+            array(
583 583
                 'key' => 'deleted',
584 584
                 'field' => 'deleted',
585 585
                 'type' => 'boolean',
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
 
708 708
         $this->repository->softDeleteContent($contentId);
709 709
         $contents = $this->repository->findByContentId($contentId);
710
-        foreach ($contents as $content ) {
710
+        foreach ($contents as $content) {
711 711
             $this->assertTrue($content->isDeleted());
712 712
         }
713 713
         $this->repository->restoreDeletedContent($contentId);
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
         $documentManager->close();
718 718
 
719 719
         $contents = $this->repository->findByContentId($contentId);
720
-        foreach ($contents as $content ) {
720
+        foreach ($contents as $content) {
721 721
             $this->assertFalse($content->isDeleted());
722 722
         }
723 723
     }
Please login to merge, or discard this patch.
Tests/Functional/GroupBundle/Repository/GroupRepositoryTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
         $this->assertNull($this->repository->findOneByName('test'));
139 139
     }
140 140
 
141
-   /**
141
+    /**
142 142
      * Test remove users
143 143
      */
144 144
     public function testSoftDeleteGroupBySite()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     /**
139 139
      * @return array
140 140
      */
141
-    public function provideColumnsAndSearchAndCount(){
141
+    public function provideColumnsAndSearchAndCount() {
142 142
 
143 143
         $configuration = new PaginateFinderConfiguration();
144 144
         $configuration->setPaginateConfiguration(null, 0, 100, array('label' => 'labels'));
Please login to merge, or discard this patch.
Tests/Functional/UserAdminBundle/Controller/ApiControllersTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function testApi($url, $method = 'GET')
21 21
     {
22
-        $this->client->request($method, $url . '?access_token=' . $this->getAccessToken());
22
+        $this->client->request($method, $url.'?access_token='.$this->getAccessToken());
23 23
 
24 24
         $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
25 25
         $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type'));
Please login to merge, or discard this patch.
Tests/Functional/UserAdminBundle/Controller/FormControllersSecurityTest.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
     public function testEditForm()
30 30
     {
31 31
         $user = $this->client->getContainer()->get('open_orchestra_user.repository.user')->findOneByUsername('p-admin');
32
-        $this->client->request('GET', '/admin/user/form/' . $user->getId());
32
+        $this->client->request('GET', '/admin/user/form/'.$user->getId());
33 33
         $this->assertEquals(403, $this->client->getResponse()->getStatusCode());
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
Tests/Functional/UserAdminBundle/Controller/ApiControllersSecurityTest.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
      */
23 23
     public function testApi($url, $method = 'GET')
24 24
     {
25
-        $this->client->request($method, $url . '?access_token=' . $this->getAccessToken());
25
+        $this->client->request($method, $url.'?access_token='.$this->getAccessToken());
26 26
 
27 27
         $this->assertEquals(403, $this->client->getResponse()->getStatusCode());
28 28
     }
Please login to merge, or discard this patch.