Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Jun 2, 2016
1 parent 59d8cca commit d9f6cfb
Show file tree
Hide file tree
Showing 20 changed files with 163 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cache/CachedCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class CachedCollection implements \IteratorAggregate, \Serializable

/**
* @param array $data
* @param null|string $resource The path to the file of the content object, this is
* used to determine if the cache needs to be updated
* @param null|string $resource The path to the file of the content object, this is
* used to determine if the cache needs to be updated
*/
public function __construct(array $data, $resource = null)
{
Expand Down
8 changes: 6 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public function getConfigTreeBuilder()
->end()
// validation needs to be on top, when no values are set a validation inside the content_listener array node will not be triggered
->validate()
->ifTrue(function ($v) { return $v['content_listener']['enabled'] && empty($v['content_listener']['content_key']); })
->ifTrue(function ($v) {
return $v['content_listener']['enabled'] && empty($v['content_listener']['content_key']);
})
->thenInvalid('Configure the content_listener.content_key or disable the content_listener when not using the CmfRoutingBundle DynamicRouter.')
->end()
->children()
Expand Down Expand Up @@ -136,7 +138,9 @@ private function addSonataAdminSection(NodeBuilder $treeBuilder)
->arrayNode('sonata_admin_extension')
->addDefaultsIfNotSet()
->beforeNormalization()
->ifTrue(function ($v) { return is_scalar($v); })
->ifTrue(function ($v) {
return is_scalar($v);
})
->then(function ($v) {
return array('enabled' => $v);
})
Expand Down
9 changes: 9 additions & 0 deletions Loader/Annotation/Extras.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation;

use Symfony\Cmf\Bundle\SeoBundle\Exception\InvalidArgumentException;
Expand Down
9 changes: 9 additions & 0 deletions Loader/Annotation/MetaDescription.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation;

use Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadataInterface;
Expand Down
9 changes: 9 additions & 0 deletions Loader/Annotation/MetaKeywords.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation;

use Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadataInterface;
Expand Down
9 changes: 9 additions & 0 deletions Loader/Annotation/OriginalUrl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation;

use Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadataInterface;
Expand Down
9 changes: 9 additions & 0 deletions Loader/Annotation/SeoMetadataAnnotation.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation;

use Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadataInterface;
Expand Down
9 changes: 9 additions & 0 deletions Loader/Annotation/Title.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation;

use Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadataInterface;
Expand Down
9 changes: 9 additions & 0 deletions Loader/AnnotationLoader.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader;

use Doctrine\Common\Annotations\Reader;
Expand Down
9 changes: 9 additions & 0 deletions Loader/ExtractorLoader.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader;

use Psr\Cache\CacheItemPoolInterface;
Expand Down
9 changes: 9 additions & 0 deletions Loader/SeoMetadataFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Loader;

use Symfony\Cmf\Bundle\SeoBundle\Exception\InvalidArgumentException;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Functional/Loader/LoaderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Functional\Loader;

use Symfony\Cmf\Bundle\SeoBundle\Tests\Resources\Document\ContentWithExtractors;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Resources/Document/MethodAnnotatedContent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Resources\Document;

use Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation as SEO;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Resources/Document/PropertyAnnotatedContent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Resources\Document;

use Symfony\Cmf\Bundle\SeoBundle\Loader\Annotation as SEO;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Unit/Loader/BaseAnnotationLoaderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Unit\Loader;

use Doctrine\Common\Annotations\AnnotationReader;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Unit/Loader/ExtractorLoaderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Unit\Loader;

use Symfony\Cmf\Bundle\SeoBundle\Loader\ExtractorLoader;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Unit/Loader/Method_AnnotationLoaderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Unit\Loader;

use Symfony\Cmf\Bundle\SeoBundle\Tests\Resources\Document\MethodAnnotatedContent;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Unit/Loader/Property_AnnotationLoaderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Unit\Loader;

use Symfony\Cmf\Bundle\SeoBundle\Tests\Resources\Document\PropertyAnnotatedContent;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Unit/Loader/SeoMetadataFactoryTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2016 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Unit\Loader;

use Symfony\Cmf\Bundle\SeoBundle\Loader\SeoMetadataFactory;
Expand Down
5 changes: 2 additions & 3 deletions Tests/Unit/SeoPresentationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Unit;

use Symfony\Cmf\Bundle\SeoBundle\DependencyInjection\ConfigValues;
use Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadataInterface;
use Symfony\Cmf\Bundle\SeoBundle\SeoPresentation;
use Symfony\Component\Config\Loader\LoaderInterface;

Expand All @@ -36,7 +35,7 @@ public function setUp()
$this->pageService = $this->getMock('Sonata\SeoBundle\Seo\SeoPage');
$this->translator = $this->getMock('Symfony\Component\Translation\TranslatorInterface');
$this->seoMetadata = $this->getMock('Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata');
$this->content = new \stdClass;
$this->content = new \stdClass();

$this->loader = $this->getMock(LoaderInterface::class);
$this->loader
Expand Down Expand Up @@ -80,7 +79,7 @@ public function testDefaultTitle()
;

// test
$this->seoPresentation->updateSeoPage(new \stdClass);
$this->seoPresentation->updateSeoPage(new \stdClass());
}

public function testContentTitle()
Expand Down

0 comments on commit d9f6cfb

Please sign in to comment.