@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function load(ObjectManager $manager) |
44 | 44 | { |
45 | - for ($i=0; self::NUMBER_OF_NODE > $i; $i++) { |
|
46 | - $name = 'node' . $i; |
|
47 | - $pattern = '/node' . $i; |
|
48 | - $content = 'Node ' . $i . 'on ' . self::NUMBER_OF_NODE; |
|
45 | + for ($i = 0; self::NUMBER_OF_NODE > $i; $i++) { |
|
46 | + $name = 'node'.$i; |
|
47 | + $pattern = '/node'.$i; |
|
48 | + $content = 'Node '.$i.'on '.self::NUMBER_OF_NODE; |
|
49 | 49 | $this->generateSimpleNode($name, 'en', $manager, $content, $pattern); |
50 | 50 | $this->generateSimpleNode($name, 'fr', $manager, $content, $pattern); |
51 | 51 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $titleBlock = new Block(); |
79 | 79 | $titleBlock->setClass('block-body-header'); |
80 | 80 | $titleBlock->setComponent(TinyMCEWysiwygStrategy::TINYMCEWYSIWYG); |
81 | - $titleBlock->setAttributes(array('htmlContent' => '<h1>' . $name . '</h1>')); |
|
81 | + $titleBlock->setAttributes(array('htmlContent' => '<h1>'.$name.'</h1>')); |
|
82 | 82 | |
83 | 83 | $contentBlock = new Block(); |
84 | 84 | $contentBlock->setClass('block-body'); |
@@ -165,7 +165,7 @@ discard block |
||
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 |
||
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 | { |
@@ -100,9 +100,9 @@ |
||
100 | 100 | array(ContentListStrategy::NAME, array( |
101 | 101 | 'contentNodeId' => 'root', |
102 | 102 | 'contentSearch' => array( |
103 | - 'contentType' => 'news', |
|
104 | - 'choiceType' => 'choice_and', |
|
105 | - 'keywords' => null, |
|
103 | + 'contentType' => 'news', |
|
104 | + 'choiceType' => 'choice_and', |
|
105 | + 'keywords' => null, |
|
106 | 106 | ), |
107 | 107 | 'characterNumber' => 150, |
108 | 108 | 'contentTemplateEnabled' => true, |
@@ -45,7 +45,7 @@ discard block |
||
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( |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $block = new Block(); |
77 | 77 | $block->setComponent($component); |
78 | - $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
78 | + $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
79 | 79 | |
80 | 80 | $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false)); |
81 | 81 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | { |
130 | 130 | $block = new Block(); |
131 | 131 | $block->setComponent($component); |
132 | - $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
132 | + $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
133 | 133 | |
134 | 134 | $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false)); |
135 | 135 | $submittedValue = array_merge(array('id' => 'testId', 'class' => 'testClass'), $value); |
@@ -548,7 +548,7 @@ |
||
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 | { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | { |
155 | 155 | return array( |
156 | 156 | array('car', ContentRepositoryInterface::CHOICE_AND, 'lorem', 3), |
157 | - array('car',ContentRepositoryInterface::CHOICE_AND, 'sit', 1), |
|
157 | + array('car', ContentRepositoryInterface::CHOICE_AND, 'sit', 1), |
|
158 | 158 | array('car', ContentRepositoryInterface::CHOICE_AND, 'dolor', 0), |
159 | 159 | array('car', ContentRepositoryInterface::CHOICE_AND, 'sit AND lorem', 1), |
160 | 160 | array('news', ContentRepositoryInterface::CHOICE_AND, 'lorem', 1), |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $configuration->setPaginateConfiguration($order, $skip, $limit); |
283 | 283 | $contents = $this->repository->findPaginatedLastVersionByContentTypeAndsite($contentType, $configuration, $siteId); |
284 | 284 | |
285 | - if(!is_null($name)) { |
|
285 | + if (!is_null($name)) { |
|
286 | 286 | $this->assertEquals($name, $contents[0]->getName()); |
287 | 287 | } |
288 | 288 | $this->assertCount($count, $contents); |
@@ -296,21 +296,21 @@ discard block |
||
296 | 296 | $descriptionEntity = $this->getDescriptionColumnEntity(); |
297 | 297 | |
298 | 298 | return array( |
299 | - array('car', $descriptionEntity, null, array("name" => "name", "dir" => "asc"), null, 0 ,5 , 3, '206 3 portes fr'), |
|
300 | - array('car', $descriptionEntity, null, array("name" => "name", "dir" => "desc"), null, 0 ,5 , 3, 'R5 3 portes en'), |
|
301 | - array('car', $descriptionEntity, null, array("name" => "attributes.car_name.string_value", "dir" => "asc"), null, 0 ,5 , 3, '206 3 portes fr'), |
|
302 | - array('car', $descriptionEntity, null, array("name" => "attributes.car_name.string_value", "dir" => "desc"), null, 0 ,5 , 3, 'R5 3 portes en'), |
|
303 | - array('car', $descriptionEntity, null, null, null, 0 ,1 , 1), |
|
304 | - array('car', $descriptionEntity, $this->generateColumnsProvider(array('name' => '206')), null, null, 0 ,2 , 1), |
|
305 | - array('car', $descriptionEntity, $this->generateColumnsProvider(array('version' => '2')), null, null, 0 ,2 , 2), |
|
306 | - array('news', $descriptionEntity, null, null, null, 0 , 100, 4), |
|
307 | - array('news', $descriptionEntity, null, null, null, 50 , 100, 0), |
|
308 | - array('news', $descriptionEntity, $this->generateColumnsProvider(array('name' => 'news')), null, null, 0 , null, 0), |
|
309 | - array('car', $descriptionEntity, null, null, '2', 0 ,5 , 3), |
|
310 | - array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'publish')), null, null, null ,null , 3), |
|
311 | - array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'Publi')), null, null, null ,null , 3), |
|
312 | - array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'draft')), null, null, null ,null , 0), |
|
313 | - array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'brouillon')), null, null, null ,null , 0), |
|
299 | + array('car', $descriptionEntity, null, array("name" => "name", "dir" => "asc"), null, 0, 5, 3, '206 3 portes fr'), |
|
300 | + array('car', $descriptionEntity, null, array("name" => "name", "dir" => "desc"), null, 0, 5, 3, 'R5 3 portes en'), |
|
301 | + array('car', $descriptionEntity, null, array("name" => "attributes.car_name.string_value", "dir" => "asc"), null, 0, 5, 3, '206 3 portes fr'), |
|
302 | + array('car', $descriptionEntity, null, array("name" => "attributes.car_name.string_value", "dir" => "desc"), null, 0, 5, 3, 'R5 3 portes en'), |
|
303 | + array('car', $descriptionEntity, null, null, null, 0, 1, 1), |
|
304 | + array('car', $descriptionEntity, $this->generateColumnsProvider(array('name' => '206')), null, null, 0, 2, 1), |
|
305 | + array('car', $descriptionEntity, $this->generateColumnsProvider(array('version' => '2')), null, null, 0, 2, 2), |
|
306 | + array('news', $descriptionEntity, null, null, null, 0, 100, 4), |
|
307 | + array('news', $descriptionEntity, null, null, null, 50, 100, 0), |
|
308 | + array('news', $descriptionEntity, $this->generateColumnsProvider(array('name' => 'news')), null, null, 0, null, 0), |
|
309 | + array('car', $descriptionEntity, null, null, '2', 0, 5, 3), |
|
310 | + array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'publish')), null, null, null, null, 3), |
|
311 | + array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'Publi')), null, null, null, null, 3), |
|
312 | + array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'draft')), null, null, null, null, 0), |
|
313 | + array('car', $descriptionEntity, $this->generateColumnsProvider(array('status_label' => 'brouillon')), null, null, null, null, 0), |
|
314 | 314 | |
315 | 315 | ); |
316 | 316 | } |
@@ -508,63 +508,63 @@ discard block |
||
508 | 508 | */ |
509 | 509 | protected function getDescriptionColumnEntity() |
510 | 510 | { |
511 | - return array ( |
|
511 | + return array( |
|
512 | 512 | 'name' => |
513 | - array ( |
|
513 | + array( |
|
514 | 514 | 'key' => 'name', |
515 | 515 | 'field' => 'name', |
516 | 516 | 'type' => 'string', |
517 | 517 | ), |
518 | 518 | 'language' => |
519 | - array ( |
|
519 | + array( |
|
520 | 520 | 'key' => 'language', |
521 | 521 | 'field' => 'language', |
522 | 522 | 'type' => 'string', |
523 | 523 | ), |
524 | 524 | 'status_label' => |
525 | - array ( |
|
525 | + array( |
|
526 | 526 | 'key' => 'status_label', |
527 | 527 | 'field' => 'status', |
528 | 528 | 'type' => 'multiLanguages', |
529 | 529 | ), |
530 | 530 | 'version' => |
531 | - array ( |
|
531 | + array( |
|
532 | 532 | 'key' => 'version', |
533 | 533 | 'field' => 'version', |
534 | 534 | 'type' => 'integer', |
535 | 535 | ), |
536 | 536 | 'linked_to_site' => |
537 | - array ( |
|
537 | + array( |
|
538 | 538 | 'key' => 'linked_to_site', |
539 | 539 | 'field' => 'linkedTosite', |
540 | 540 | 'type' => 'boolean', |
541 | 541 | ), |
542 | 542 | 'created_by' => |
543 | - array ( |
|
543 | + array( |
|
544 | 544 | 'key' => 'created_by', |
545 | 545 | 'field' => 'createdBy', |
546 | 546 | 'type' => 'string', |
547 | 547 | ), |
548 | 548 | 'updated_by' => |
549 | - array ( |
|
549 | + array( |
|
550 | 550 | 'key' => 'updated_by', |
551 | 551 | 'field' => 'updatedBy', |
552 | 552 | 'type' => 'string', |
553 | 553 | ), |
554 | 554 | 'created_at' => |
555 | - array ( |
|
555 | + array( |
|
556 | 556 | 'key' => 'created_at', |
557 | 557 | 'field' => 'createdAt', |
558 | 558 | 'type' => 'date', |
559 | 559 | ), |
560 | 560 | 'updated_at' => |
561 | - array ( |
|
561 | + array( |
|
562 | 562 | 'key' => 'updated_at', |
563 | 563 | 'field' => 'updatedAt', |
564 | 564 | 'type' => 'date', |
565 | 565 | ), |
566 | 566 | 'deleted' => |
567 | - array ( |
|
567 | + array( |
|
568 | 568 | 'key' => 'deleted', |
569 | 569 | 'field' => 'deleted', |
570 | 570 | 'type' => 'boolean', |
@@ -166,7 +166,7 @@ |
||
166 | 166 | /** |
167 | 167 | * Check if the $sites ids matches $expectedIds |
168 | 168 | * |
169 | - * @param array $expectedIds |
|
169 | + * @param string[] $expectedIds |
|
170 | 170 | * @param array $sites |
171 | 171 | */ |
172 | 172 | protected function assertIdsMatches($expectedIds, $sites) |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | $descriptionEntity = $this->getDescriptionColumnEntity(); |
57 | 57 | |
58 | 58 | return array( |
59 | - array(false, array(), null, 0 ,1 , 1), |
|
60 | - array(true, array(), null, 0 ,2 , 1), |
|
59 | + array(false, array(), null, 0, 1, 1), |
|
60 | + array(true, array(), null, 0, 2, 1), |
|
61 | 61 | array(false, $descriptionEntity, $this->generateSearchProvider(array('site_id' => '2'), 'demo'), null, null, 1), |
62 | 62 | array(false, $descriptionEntity, $this->generateSearchProvider(array('site_id' => '1'), 'demo'), null, null, 0), |
63 | 63 | array(false, $descriptionEntity, $this->generateSearchProvider(array('site_id' => '1', 'name' => 'demo')), null, null, 0), |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | $descriptionEntity = $this->getDescriptionColumnEntity(); |
91 | 91 | |
92 | 92 | return array( |
93 | - array(array(), $this->generateSearchProvider(array('deleted' => false)), 0 ,1 , 1), |
|
94 | - array(array(), $this->generateSearchProvider(array('deleted' => true)), 0 ,1 , 1), |
|
93 | + array(array(), $this->generateSearchProvider(array('deleted' => false)), 0, 1, 1), |
|
94 | + array(array(), $this->generateSearchProvider(array('deleted' => true)), 0, 1, 1), |
|
95 | 95 | array($descriptionEntity, $this->generateSearchProvider(array('deleted' => false, 'site_id' => '2'), 'demo'), null, null, 1), |
96 | 96 | array($descriptionEntity, $this->generateSearchProvider(array('deleted' => false, 'site_id' => '1'), 'demo'), null, null, 0), |
97 | 97 | array($descriptionEntity, $this->generateSearchProvider(array('deleted' => false, 'site_id' => '1', 'name' => 'demo')), null, null, 0), |
@@ -36,7 +36,7 @@ |
||
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 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | $mediaFolderRepository = static::$kernel->getContainer()->get('open_orchestra_media.repository.media_folder'); |
72 | 72 | $mediaFolder = $mediaFolderRepository->findOneByName('Images folder'); |
73 | 73 | |
74 | - $url = '/admin/folder/form/' . $mediaFolder->getId(); |
|
74 | + $url = '/admin/folder/form/'.$mediaFolder->getId(); |
|
75 | 75 | $crawler = $this->client->request('GET', $url); |
76 | 76 | |
77 | 77 | return $crawler; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function testMediaForms($form) |
33 | 33 | { |
34 | - $url = '/admin/media/' . $this->media->getId() . '/' . $form; |
|
34 | + $url = '/admin/media/'.$this->media->getId().'/'.$form; |
|
35 | 35 | |
36 | 36 | $this->client->request('GET', $url); |
37 | 37 |
@@ -56,11 +56,11 @@ |
||
56 | 56 | $descriptionEntity = $this->getDescriptionColumnEntity(); |
57 | 57 | |
58 | 58 | return array( |
59 | - array($descriptionEntity, null, null, 0 ,5 , 2), |
|
60 | - array($descriptionEntity, $this->generateSearchProvider('validator'), null, 0 ,5 , 1), |
|
61 | - array($descriptionEntity, $this->generateSearchProvider('contributor'), null, 0 ,5 , 1), |
|
62 | - array($descriptionEntity, $this->generateSearchProvider('fakeName'), null, 0 ,5 , 0), |
|
63 | - array($descriptionEntity, $this->generateSearchProvider('', 'validator'), null, 0 ,5 , 1), |
|
59 | + array($descriptionEntity, null, null, 0, 5, 2), |
|
60 | + array($descriptionEntity, $this->generateSearchProvider('validator'), null, 0, 5, 1), |
|
61 | + array($descriptionEntity, $this->generateSearchProvider('contributor'), null, 0, 5, 1), |
|
62 | + array($descriptionEntity, $this->generateSearchProvider('fakeName'), null, 0, 5, 0), |
|
63 | + array($descriptionEntity, $this->generateSearchProvider('', 'validator'), null, 0, 5, 1), |
|
64 | 64 | ); |
65 | 65 | } |
66 | 66 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function testApi($url) |
20 | 20 | { |
21 | - $this->client->request('GET', $url . '?access_token=' . $this->getAccessToken()); |
|
21 | + $this->client->request('GET', $url.'?access_token='.$this->getAccessToken()); |
|
22 | 22 | |
23 | 23 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
24 | 24 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |