Completed
Push — master ( c67200...14b415 )
by amaury
06:24
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/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/BaseApiBundle/Controller/AuthorizationControllersTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $tokenReponse = json_decode($this->client->getResponse()->getContent(), true);
37 37
         $refreshToken = $tokenReponse['refresh_token'];
38 38
 
39
-        $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token=' . $refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret'));
39
+        $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token='.$refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret'));
40 40
         $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
41 41
         $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type'));
42 42
     }
Please login to merge, or discard this patch.
Tests/Functional/ApiBundle/Controller/ContentControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
         $this->client->request(
55 55
             'POST',
56
-            '/api/content/' . $content->getId() . '/update',
56
+            '/api/content/'.$content->getId().'/update',
57 57
             array(),
58 58
             array(),
59 59
             array(),
Please login to merge, or discard this patch.
Tests/Functional/ApiBundle/Controller/AuthorizationControllersTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,18 +47,18 @@
 block discarded – undo
47 47
         $accessToken = $tokenReponse['access_token'];
48 48
         $refreshToken = $tokenReponse['refresh_token'];
49 49
 
50
-        $this->client->request('GET', '/api/node/root?access_token=' . $accessToken);
50
+        $this->client->request('GET', '/api/node/root?access_token='.$accessToken);
51 51
         $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
52 52
         $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type'));
53 53
 
54
-        $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token=' . $refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret'));
54
+        $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token='.$refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret'));
55 55
         $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
56 56
         $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type'));
57 57
         $newTokenReponse = json_decode($this->client->getResponse()->getContent(), true);
58 58
         $newAccessToken = $newTokenReponse['access_token'];
59 59
         $this->assertNotSame($accessToken, $newAccessToken);
60 60
 
61
-        $this->client->request('GET', '/api/node/root?access_token=' . $newAccessToken);
61
+        $this->client->request('GET', '/api/node/root?access_token='.$newAccessToken);
62 62
         $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
63 63
         $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type'));
64 64
     }
Please login to merge, or discard this patch.
Functional/BackofficeBundle/DependencyInjection/ContextManagerClassTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function testDifferentEnv($classExpected, $env, $debug)
22 22
     {
23
-        $kernel = static::createKernel(array('environment' => $env ,'debug' => $debug));
23
+        $kernel = static::createKernel(array('environment' => $env, 'debug' => $debug));
24 24
         $kernel->boot();
25 25
         $this->assertInstanceOf(
26 26
             $classExpected,
Please login to merge, or discard this patch.
Tests/Functional/BackofficeBundle/Controller/SiteControllerTest.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
         $this->assertNodeCount(1, 'fr');
52 52
         $this->assertNodeCount(0, 'en');
53 53
 
54
-        $crawler = $this->client->request('GET', '/admin/site/form/' . $this->siteId);
54
+        $crawler = $this->client->request('GET', '/admin/site/form/'.$this->siteId);
55 55
         $form = $crawler->selectButton('Save')->form();
56
-        foreach($form->all() as $key => $value){
56
+        foreach ($form->all() as $key => $value) {
57 57
             if (preg_match('/^oo_site\[aliases\]\[.*\]\[language\]$/', $key)) {
58 58
                 $form[$key] = 'en';
59 59
             }
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
      */
86 86
     protected function createSite()
87 87
     {
88
-        $crawler =  $this->client->request('GET', '/admin/site/new');
88
+        $crawler = $this->client->request('GET', '/admin/site/new');
89 89
 
90 90
         $form = $crawler->selectButton('Save')->form();
91 91
         $form['oo_site[siteId]'] = $this->siteId;
92
-        $form['oo_site[name]'] = $this->siteId . 'domain';
93
-        foreach($form->all() as $key => $value){
92
+        $form['oo_site[name]'] = $this->siteId.'domain';
93
+        foreach ($form->all() as $key => $value) {
94 94
             if (preg_match('/^oo_site\[aliases\]\[.*\]\[domain\]$/', $key)) {
95
-                $form[$key] = $this->siteId . 'name';
95
+                $form[$key] = $this->siteId.'name';
96 96
             }
97 97
             if (preg_match('/^oo_site\[aliases\]\[.*\]\[language\]$/', $key)) {
98 98
                 $form[$key] = 'fr';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@
 block discarded – undo
114 114
      */
115 115
     protected function assertNodeCount($count, $language)
116 116
     {
117
-         $nodes = $this->nodeRepository->findNotDeletedSortByUpdatedAt(NodeInterface::ROOT_NODE_ID, $language, $this->siteId);
117
+            $nodes = $this->nodeRepository->findNotDeletedSortByUpdatedAt(NodeInterface::ROOT_NODE_ID, $language, $this->siteId);
118 118
 
119
-         $this->assertCount($count, $nodes);
119
+            $this->assertCount($count, $nodes);
120 120
     }
121 121
 
122 122
     /**
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/BackofficeBundle/Controller/EditNodeControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $nodeDocument = $this->nodeRepository->findInLastVersion($nodeId, $this->language, $this->siteId);
42 42
 
43
-        $url = '/admin/node/form/' . $this->siteId . '/' . $nodeDocument->getNodeId() . '/' . $this->language . '/' . $nodeDocument->getVersion();
43
+        $url = '/admin/node/form/'.$this->siteId.'/'.$nodeDocument->getNodeId().'/'.$this->language.'/'.$nodeDocument->getVersion();
44 44
 
45 45
         $crawler = $this->client->request('GET', $url);
46 46
         $formNode = $crawler->selectButton('Save')->form();
Please login to merge, or discard this patch.