Skip to content

Commit 84455d8

Browse files
dantleechlsmith77
authored andcommitted
Fixed CI
1 parent 97d6fc4 commit 84455d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+201
-223
lines changed

Admin/Extension/FrontendLinkExtension.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class FrontendLinkExtension extends AdminExtension
4141
private $translator;
4242

4343
/**
44-
* @param RouterInterface $router
44+
* @param RouterInterface $router
4545
* @param TranslatorInterface $translator
4646
*/
4747
public function __construct(RouterInterface $router, TranslatorInterface $translator)
@@ -99,16 +99,15 @@ public function configureTabMenu(
9999
'uri' => $uri,
100100
'attributes' => array(
101101
'class' => 'sonata-admin-menu-item',
102-
'role' => 'menuitem'
102+
'role' => 'menuitem',
103103
),
104104
'linkAttributes' => array(
105105
'class' => 'sonata-admin-frontend-link',
106106
'role' => 'button',
107107
'target' => '_blank',
108-
'title' => $this->translator->trans('admin.menu_frontend_link_title', array(), 'CmfRoutingBundle')
109-
)
108+
'title' => $this->translator->trans('admin.menu_frontend_link_title', array(), 'CmfRoutingBundle'),
109+
),
110110
)
111111
);
112112
}
113-
114113
}

Admin/RedirectRouteAdmin.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ class RedirectRouteAdmin extends Admin
2121
{
2222
protected $translationDomain = 'CmfRoutingBundle';
2323

24-
/**
25-
* Root path for the route parent selection
24+
/**
25+
* Root path for the route parent selection.
26+
*
2627
* @var string
2728
*/
2829
protected $routeRoot;
@@ -54,7 +55,7 @@ protected function configureFormFields(FormMapper $formMapper)
5455
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
5556
{
5657
$datagridMapper
57-
->add('name', 'doctrine_phpcr_nodename')
58+
->add('name', 'doctrine_phpcr_nodename')
5859
;
5960
}
6061

Admin/RouteAdmin.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@ class RouteAdmin extends Admin
2424
protected $translationDomain = 'CmfRoutingBundle';
2525

2626
/**
27-
* Root path for the route parent selection
27+
* Root path for the route parent selection.
28+
*
2829
* @var string
2930
*/
3031
protected $routeRoot;
3132

3233
/**
33-
* Root path for the route content selection
34+
* Root path for the route content selection.
35+
*
3436
* @var string
3537
*/
3638
protected $contentRoot;
3739

3840
/**
39-
* Full class name for content that can be referenced by a route
41+
* Full class name for content that can be referenced by a route.
42+
*
4043
* @var string
4144
*/
4245
protected $contentClass;
@@ -163,7 +166,7 @@ protected function configureFieldsForDefaults($dynamicDefaults)
163166

164167
//parse variable pattern and add defaults for tokens - taken from routecompiler
165168
/** @var $route Route */
166-
$route = $this->subject;
169+
$route = $this->subject;
167170
if ($route && $route->getVariablePattern()) {
168171
preg_match_all('#\{\w+\}#', $route->getVariablePattern(), $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
169172
foreach ($matches as $match) {

CmfRoutingBundle.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Symfony\Cmf\Bundle\RoutingBundle\DependencyInjection\Compiler\SetRouterPass;
2222

2323
/**
24-
* Bundle class
24+
* Bundle class.
2525
*/
2626
class CmfRoutingBundle extends Bundle
2727
{
@@ -92,8 +92,8 @@ private function buildOrmCompilerPass(ContainerBuilder $container)
9292
$container->addCompilerPass(
9393
$doctrineOrmCompiler::createXmlMappingDriver(
9494
array(
95-
realpath(__DIR__ . '/Resources/config/doctrine-model') => 'Symfony\Cmf\Bundle\RoutingBundle\Model',
96-
realpath(__DIR__ . '/Resources/config/doctrine-orm') => 'Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Orm',
95+
realpath(__DIR__.'/Resources/config/doctrine-model') => 'Symfony\Cmf\Bundle\RoutingBundle\Model',
96+
realpath(__DIR__.'/Resources/config/doctrine-orm') => 'Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Orm',
9797
),
9898
array('cmf_routing.dynamic.persistence.orm.manager_name'),
9999
'cmf_routing.backend_type_orm',
@@ -107,8 +107,8 @@ private function buildOrmCompilerPass(ContainerBuilder $container)
107107
* DoctrineBundle (available only since DoctrineBundle 2.4 and Symfony 2.3)
108108
* Otherwise use the standalone one from CmfCoreBundle.
109109
*
110-
* @return boolean|string the compiler pass to use or false if no suitable
111-
* one was found
110+
* @return bool|string the compiler pass to use or false if no suitable
111+
* one was found
112112
*/
113113
private function findDoctrineOrmCompiler()
114114
{
@@ -138,7 +138,7 @@ private function findDoctrineOrmCompiler()
138138
*/
139139
private function buildBaseCompilerPass($compilerClass, $driverClass, $type)
140140
{
141-
$arguments = array(array(realpath(__DIR__ . '/Resources/config/doctrine-base')), sprintf('.%s.xml', $type));
141+
$arguments = array(array(realpath(__DIR__.'/Resources/config/doctrine-base')), sprintf('.%s.xml', $type));
142142
$locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\DefaultFileLocator', $arguments);
143143
$driver = new Definition($driverClass, array($locator));
144144

Controller/RedirectController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Routing\RouterInterface;
1515
use Symfony\Component\HttpFoundation\RedirectResponse;
16-
1716
use Symfony\Cmf\Component\Routing\RedirectRouteInterface;
1817

1918
/**
@@ -31,6 +30,7 @@ class RedirectController
3130
* @var RouterInterface
3231
*/
3332
protected $router;
33+
3434
/**
3535
* @param RouterInterface $router the router to use to build urls
3636
*/
@@ -40,7 +40,7 @@ public function __construct(RouterInterface $router)
4040
}
4141

4242
/**
43-
* Action to redirect based on a RedirectRouteInterface route
43+
* Action to redirect based on a RedirectRouteInterface route.
4444
*
4545
* @param RedirectRouteInterface $contentDocument
4646
*

DependencyInjection/Compiler/SetRouterPass.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
/**
1818
* Changes the Router implementation.
19-
*
2019
*/
2120
class SetRouterPass implements CompilerPassInterface
2221
{
@@ -26,6 +25,5 @@ public function process(ContainerBuilder $container)
2625
if ($container->hasParameter('cmf_routing.replace_symfony_router') && true === $container->getParameter('cmf_routing.replace_symfony_router')) {
2726
$container->setAlias('router', 'cmf_routing.router');
2827
}
29-
3028
}
3129
}

DependencyInjection/Configuration.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1717

1818
/**
19-
* This class contains the configuration information for the bundle
20-
*
21-
* This information is solely responsible for how the different configuration
22-
* sections are normalized, and merged.
23-
*
24-
* @author David Buchmann
25-
*/
19+
* This class contains the configuration information for the bundle.
20+
*
21+
* This information is solely responsible for how the different configuration
22+
* sections are normalized, and merged.
23+
*
24+
* @author David Buchmann
25+
*/
2626
class Configuration implements ConfigurationInterface
2727
{
2828
/**

Doctrine/DoctrineProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ abstract class DoctrineProvider
4444
protected $className;
4545

4646
/**
47-
* Limit to apply when calling getRoutesByNames() with null
47+
* Limit to apply when calling getRoutesByNames() with null.
4848
*
49-
* @var integer|null
49+
* @var int|null
5050
*/
5151
protected $routeCollectionLimit;
5252

@@ -76,7 +76,7 @@ public function setManagerName($managerName)
7676
*
7777
* Setting the limit to null means no limit is applied.
7878
*
79-
* @param integer|null $routeCollectionLimit
79+
* @param int|null $routeCollectionLimit
8080
*/
8181
public function setRouteCollectionLimit($routeCollectionLimit = null)
8282
{

Doctrine/Orm/ContentRepository.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class ContentRepository extends DoctrineProvider implements ContentRepositoryInterface
2828
{
2929
/**
30-
* Determine target class and id for this content
30+
* Determine target class and id for this content.
3131
*
3232
* @param mixed $identifier as produced by getContentId
3333
*
@@ -39,7 +39,7 @@ protected function getModelAndId($identifier)
3939
}
4040

4141
/**
42-
* {@inheritDoc}
42+
* {@inheritdoc}
4343
*
4444
* @param string $id The ID contains both model name and id, separated by a colon.
4545
*/
@@ -51,27 +51,27 @@ public function findById($id)
5151
}
5252

5353
/**
54-
* {@inheritDoc}
54+
* {@inheritdoc}
5555
*/
5656
public function getContentId($content)
5757
{
58-
if (! is_object($content)) {
59-
return null;
58+
if (!is_object($content)) {
59+
return;
6060
}
6161

6262
try {
6363
$meta = $this->getObjectManager()->getClassMetadata(get_class($content));
6464
$ids = $meta->getIdentifierValues($content);
6565
if (0 !== count($ids)) {
66-
throw new \Exception('Multi identifier values not supported in ' . get_class($content));
66+
throw new \Exception('Multi identifier values not supported in '.get_class($content));
6767
}
6868

6969
return implode(':', array(
7070
get_class($content),
71-
reset($ids)
71+
reset($ids),
7272
));
7373
} catch (\Exception $e) {
74-
return null;
74+
return;
7575
}
7676
}
7777
}

Doctrine/Orm/RouteProvider.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
use Symfony\Cmf\Component\Routing\Candidates\CandidatesInterface;
1717
use Symfony\Component\Routing\RouteCollection;
1818
use Symfony\Component\Routing\Exception\RouteNotFoundException;
19-
2019
use Symfony\Component\HttpFoundation\Request;
21-
2220
use Symfony\Cmf\Component\Routing\RouteProviderInterface;
2321
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\DoctrineProvider;
2422

2523
/**
26-
* Provider loading routes from Doctrine
24+
* Provider loading routes from Doctrine.
2725
*
2826
* This is <strong>NOT</strong> not a doctrine repository but just the route
2927
* provider for the NestedMatcher. (you could of course implement this
@@ -45,7 +43,7 @@ public function __construct(ManagerRegistry $managerRegistry, CandidatesInterfac
4543
}
4644

4745
/**
48-
* {@inheritDoc}
46+
* {@inheritdoc}
4947
*/
5048
public function getRouteCollectionForRequest(Request $request)
5149
{
@@ -65,7 +63,7 @@ public function getRouteCollectionForRequest(Request $request)
6563
}
6664

6765
/**
68-
* {@inheritDoc}
66+
* {@inheritdoc}
6967
*/
7068
public function getRouteByName($name)
7169
{
@@ -82,7 +80,7 @@ public function getRouteByName($name)
8280
}
8381

8482
/**
85-
* {@inheritDoc}
83+
* {@inheritdoc}
8684
*/
8785
public function getRoutesByNames($names = null)
8886
{

0 commit comments

Comments
 (0)