Skip to content

Commit 8a82381

Browse files
committed
Fixed typo in annotation for SeparatorPage
Added dev dependencies Code reformat
1 parent 985c065 commit 8a82381

20 files changed

+2211
-105
lines changed

.gitignore

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,4 @@
1-
### Symfony template
2-
# Cache and logs (Symfony2)
3-
/app/cache/*
4-
/app/logs/*
5-
!app/cache/.gitkeep
6-
!app/logs/.gitkeep
7-
8-
# Cache and logs (Symfony3)
9-
/var/cache/*
10-
/var/logs/*
11-
!var/cache/.gitkeep
12-
!var/logs/.gitkeep
13-
14-
# Parameters
15-
/app/config/parameters.yml
16-
/app/config/parameters.ini
17-
18-
# Managed by Composer
19-
/app/bootstrap.php.cache
20-
/var/bootstrap.php.cache
21-
/bin/*
22-
!bin/console
23-
!bin/symfony_requirements
24-
/vendor/
25-
26-
# Assets and user uploads
27-
/web/bundles/
28-
/web/uploads/
29-
30-
# PHPUnit
31-
/app/phpunit.xml
32-
/phpunit.xml
33-
34-
# Build data
35-
/build/
36-
37-
# Composer PHAR
38-
/composer.phar
1+
vendor
392

403
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
414

.idea/composerJson.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DependencyInjection/Ten24CMSPagesExtension.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace Ten24\CMSPagesBundle\DependencyInjection;
44

5-
use Symfony\Component\DependencyInjection\ContainerBuilder;
65
use Symfony\Component\Config\FileLocator;
7-
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
6+
use Symfony\Component\DependencyInjection\ContainerBuilder;
87
use Symfony\Component\DependencyInjection\Loader;
8+
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
99

1010
/**
1111
* This is the class that loads and manages your bundle configuration
@@ -17,7 +17,8 @@ class Ten24CMSPagesExtension extends Extension
1717
/**
1818
* {@inheritDoc}
1919
*/
20-
public function load(array $configs, ContainerBuilder $container)
20+
public function load(array $configs,
21+
ContainerBuilder $container)
2122
{
2223
$configuration = new Configuration();
2324
$this->processConfiguration($configuration, $configs);

Entity/ContentPage.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,39 @@ public function getDefaultAdminType()
3131
*/
3232
public function getPossibleChildTypes()
3333
{
34-
return array(
35-
array(
34+
return [
35+
[
3636
'name' => 'Content Page',
3737
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'
38-
),
39-
array(
38+
],
39+
[
4040
'name' => 'Separator',
4141
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'
42-
),
43-
);
42+
],
43+
];
4444
}
4545

4646
/**
4747
* @return string[]
4848
*/
4949
public function getPagePartAdminConfigurations()
5050
{
51-
return array(
51+
return [
5252
'Ten24CMSPagesBundle:main',
5353
'Ten24CMSPagesBundle:sidebar'
54-
);
54+
];
5555
}
5656

5757
/**
5858
* {@inheritdoc}
5959
*/
6060
public function getPageTemplates()
6161
{
62-
return array(
62+
return [
6363
'Ten24CMSPagesBundle:default-one-column',
6464
'Ten24CMSPagesBundle:default-two-column-left',
6565
'Ten24CMSPagesBundle:default-two-column-right'
66-
);
66+
];
6767
}
6868

6969
/**

Entity/HomePage.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace Ten24\CMSPagesBundle\Entity;
44

5-
use Ten24\CMSPagesBundle\Form\HomePageAdminType;
65
use Doctrine\ORM\Mapping as ORM;
76
use Kunstmaan\NodeBundle\Entity\AbstractPage;
87
use Kunstmaan\PagePartBundle\Helper\HasPageTemplateInterface;
8+
use Ten24\CMSPagesBundle\Form\HomePageAdminType;
99

1010
/**
1111
* HomePage Superclass
@@ -14,7 +14,6 @@
1414
*/
1515
abstract class HomePage extends AbstractPage implements HasPageTemplateInterface
1616
{
17-
1817
/**
1918
* Returns the default backend form type for this page
2019
*
@@ -31,13 +30,13 @@ public function getDefaultAdminType()
3130
*/
3231
public function getPossibleChildTypes()
3332
{
34-
return array(
35-
array(
33+
return [
34+
[
3635
'name' => 'Content Page',
37-
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'),
38-
array(
36+
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'],
37+
[
3938
'name' => 'Separator',
40-
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'),);
39+
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'],];
4140
}
4241

4342
/**
@@ -46,20 +45,20 @@ public function getPossibleChildTypes()
4645
*/
4746
public function getPagePartAdminConfigurations()
4847
{
49-
return array(
50-
'Ten24CMSPagesBundle:home');
48+
return [
49+
'Ten24CMSPagesBundle:home'];
5150
}
5251

5352
/**
5453
* @return array
5554
*/
5655
public function getPageTemplates()
5756
{
58-
return array(
57+
return [
5958
'Ten24CMSPagesBundle:default-one-column',
6059
'Ten24CMSPagesBundle:default-two-column-left',
6160
'Ten24CMSPagesBundle:default-two-column-right',
62-
'Ten24CMSPagesBundle:homepage');
61+
'Ten24CMSPagesBundle:homepage'];
6362
}
6463

6564
/**

Entity/SeparatorPage.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
namespace Ten24\CMSPagesBundle\Entity;
44

55
use Doctrine\ORM\Mapping as ORM;
6+
use Kunstmaan\NodeBundle\Entity\AbstractPage;
7+
use Kunstmaan\PagePartBundle\Helper\HasPageTemplateInterface;
68
use Ten24\CMSPagesBundle\Form\SeparatorPageAdminType;
79

810
/**
911
* SeparatorPage Mappedsuperclass
1012
*
11-
* @ORM\Mappedsuperclass
13+
* @ORM\MappedSuperclass
1214
*/
13-
class SeparatorPage extends \Kunstmaan\NodeBundle\Entity\AbstractPage
14-
implements \Kunstmaan\PagePartBundle\Helper\HasPageTemplateInterface
15+
abstract class SeparatorPage extends AbstractPage implements HasPageTemplateInterface
1516
{
1617

1718
/**
@@ -30,32 +31,34 @@ public function getDefaultAdminType()
3031
*/
3132
public function getPossibleChildTypes()
3233
{
33-
return array(
34-
array(
34+
return [
35+
[
3536
'name' => 'Content Page',
36-
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'),
37-
array(
37+
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'],
38+
[
3839
'name' => 'Separator',
39-
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'));
40+
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage']];
4041
}
4142

4243
/**
4344
* Get possible page part admin configurations
45+
*
4446
* @return array
4547
*/
4648
public function getPagePartAdminConfigurations()
4749
{
48-
return array();
50+
return [];
4951
}
5052

5153
/**
5254
* Get possible page templates for this page
55+
*
5356
* @return array
5457
*/
5558
public function getPageTemplates()
5659
{
57-
return array(
58-
'Ten24CMSPagesBundle:separator');
60+
return [
61+
'Ten24CMSPagesBundle:separator'];
5962
}
6063

6164
/**

Form/ContentPageAdminType.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ class ContentPageAdminType extends PageAdminType
2020
* @see FormTypeExtensionInterface::buildForm()
2121
*
2222
* @param FormBuilderInterface $builder The form builder
23-
* @param array $options The options
23+
* @param array $options The options
2424
*
2525
* @SuppressWarnings("unused")
2626
*/
27-
public function buildForm(FormBuilderInterface $builder, array $options)
27+
public function buildForm(FormBuilderInterface $builder,
28+
array $options)
2829
{
2930
parent::buildForm($builder, $options);
3031
}
@@ -36,9 +37,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
3637
*/
3738
public function setDefaultOptions(OptionsResolverInterface $resolver)
3839
{
39-
$resolver->setDefaults(array(
40-
'data_class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'
41-
));
40+
$resolver->setDefaults([
41+
'data_class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'
42+
]);
4243
}
4344

4445
/**

0 commit comments

Comments
 (0)