From b0733d14c2b50c3102cbf89d8e549cdd1665a145 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Sun, 27 Apr 2014 17:36:55 +0200 Subject: [PATCH] cs cleanup --- Admin/PageAdmin.php | 1 - CmfSimpleCmsBundle.php | 1 - DependencyInjection/CmfSimpleCmsExtension.php | 3 --- DependencyInjection/Configuration.php | 1 - Doctrine/Phpcr/Page.php | 7 +++---- Initializer/HomepageInitializer.php | 1 - Migrator/Phpcr/Page.php | 1 - Tests/Functional/Doctrine/Phpcr/PageTest.php | 3 +-- Tests/Functional/Migrator/Phpcr/PageTest.php | 16 +++++++++++++--- .../DataFixtures/Phpcr/LoadPageData.php | 1 - Tests/Resources/app/AppKernel.php | 2 +- .../CmfSimpleCmsExtensionTest.php | 4 +--- .../DependencyInjection/ConfigurationTest.php | 3 +-- Tests/Unit/DependencyInjection/XmlSchemaTest.php | 2 -- Tests/Unit/Doctrine/Phpcr/PageTest.php | 1 - Tests/WebTest/Admin/PageAdminTest.php | 1 - Tests/WebTest/TestApp/HttpStatusCodeTest.php | 1 - 17 files changed, 20 insertions(+), 29 deletions(-) diff --git a/Admin/PageAdmin.php b/Admin/PageAdmin.php index 0bb380d..c5cc3b5 100644 --- a/Admin/PageAdmin.php +++ b/Admin/PageAdmin.php @@ -17,7 +17,6 @@ use Sonata\DoctrinePHPCRAdminBundle\Admin\Admin; use Symfony\Cmf\Bundle\RoutingBundle\Admin\RouteAdmin; use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page; -use Symfony\Component\Form\FormBuilder; class PageAdmin extends RouteAdmin { diff --git a/CmfSimpleCmsBundle.php b/CmfSimpleCmsBundle.php index 0844af9..ef6b4d6 100644 --- a/CmfSimpleCmsBundle.php +++ b/CmfSimpleCmsBundle.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/DependencyInjection/CmfSimpleCmsExtension.php b/DependencyInjection/CmfSimpleCmsExtension.php index 7957a2d..698a326 100644 --- a/DependencyInjection/CmfSimpleCmsExtension.php +++ b/DependencyInjection/CmfSimpleCmsExtension.php @@ -9,15 +9,12 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\DependencyInjection; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\Config\FileLocator; diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 6df5d05..cbf3791 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/Doctrine/Phpcr/Page.php b/Doctrine/Phpcr/Page.php index fb7d378..3e57469 100644 --- a/Doctrine/Phpcr/Page.php +++ b/Doctrine/Phpcr/Page.php @@ -11,7 +11,6 @@ namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr; -use Doctrine\Common\Collections\Collection; use LogicException; use Knp\Menu\NodeInterface; use Doctrine\Common\Collections\ArrayCollection; @@ -273,8 +272,8 @@ public function getExtras() * without needing to extend the document class. * * @param array $extras a flat key-value hashmap. The values are cast to - * string as PHPCR stores multivalue data with only one data type for - * all values. + * string as PHPCR stores multivalue data with only + * one data type for all values. */ public function setExtras($extras) { @@ -456,7 +455,7 @@ public function getAdditionalInfoBlock() * be a container block in order to be able to add several blocks. * * @param BlockInterface $block must be persistable through cascade by the - * persistence layer. + * persistence layer. */ public function setAdditionalInfoBlock($block) { diff --git a/Initializer/HomepageInitializer.php b/Initializer/HomepageInitializer.php index 2160dae..ff42fcb 100644 --- a/Initializer/HomepageInitializer.php +++ b/Initializer/HomepageInitializer.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Initializer; use PHPCR\Util\NodeHelper; diff --git a/Migrator/Phpcr/Page.php b/Migrator/Phpcr/Page.php index 8bdf2ac..5016b9e 100644 --- a/Migrator/Phpcr/Page.php +++ b/Migrator/Phpcr/Page.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Migrator\Phpcr; use Symfony\Component\Yaml\Parser; diff --git a/Tests/Functional/Doctrine/Phpcr/PageTest.php b/Tests/Functional/Doctrine/Phpcr/PageTest.php index 097df6e..a41408b 100644 --- a/Tests/Functional/Doctrine/Phpcr/PageTest.php +++ b/Tests/Functional/Doctrine/Phpcr/PageTest.php @@ -9,8 +9,7 @@ * file that was distributed with this source code. */ - -namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Functional\Migrator\Phpcr; +namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Functional\Doctrine\Phpcr; use Doctrine\ODM\PHPCR\DocumentManager; use Symfony\Cmf\Component\Testing\Functional\BaseTestCase; diff --git a/Tests/Functional/Migrator/Phpcr/PageTest.php b/Tests/Functional/Migrator/Phpcr/PageTest.php index 7e6d42d..3f12703 100644 --- a/Tests/Functional/Migrator/Phpcr/PageTest.php +++ b/Tests/Functional/Migrator/Phpcr/PageTest.php @@ -9,14 +9,24 @@ * file that was distributed with this source code. */ +namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Functional\Migrator\Phpcr; -namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Functional\Doctrine\Phpcr; - +use Doctrine\ODM\PHPCR\DocumentManager; use Symfony\Cmf\Component\Testing\Functional\BaseTestCase; -use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page; +use Symfony\Cmf\Bundle\SimpleCmsBundle\Migrator\Phpcr\Page; class PageTest extends BaseTestCase { + /** + * @var Page + */ + private $migrator; + + /** + * @var DocumentManager + */ + private $dm; + public function setUp() { $this->db('PHPCR')->createTestNode(); diff --git a/Tests/Resources/DataFixtures/Phpcr/LoadPageData.php b/Tests/Resources/DataFixtures/Phpcr/LoadPageData.php index eb23771..be17cf3 100644 --- a/Tests/Resources/DataFixtures/Phpcr/LoadPageData.php +++ b/Tests/Resources/DataFixtures/Phpcr/LoadPageData.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Resources\DataFixtures\Phpcr; use Doctrine\Common\DataFixtures\FixtureInterface; diff --git a/Tests/Resources/app/AppKernel.php b/Tests/Resources/app/AppKernel.php index 204fc84..61b462b 100644 --- a/Tests/Resources/app/AppKernel.php +++ b/Tests/Resources/app/AppKernel.php @@ -10,7 +10,7 @@ public function configure() $this->requireBundleSets(array( 'default', 'phpcr_odm', - 'sonata_admin', + 'sonata_admin_phpcr', )); $this->addBundles(array( diff --git a/Tests/Unit/DependencyInjection/CmfSimpleCmsExtensionTest.php b/Tests/Unit/DependencyInjection/CmfSimpleCmsExtensionTest.php index b5a0f04..2c9215b 100644 --- a/Tests/Unit/DependencyInjection/CmfSimpleCmsExtensionTest.php +++ b/Tests/Unit/DependencyInjection/CmfSimpleCmsExtensionTest.php @@ -9,12 +9,10 @@ * file that was distributed with this source code. */ - -namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\DependencyInjection; +namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Unit\DependencyInjection; use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; use Symfony\Cmf\Bundle\SimpleCmsBundle\DependencyInjection\CmfSimpleCmsExtension; -use Symfony\Component\DependencyInjection\Reference; class CmfSimpleCmsExtensionTest extends AbstractExtensionTestCase { diff --git a/Tests/Unit/DependencyInjection/ConfigurationTest.php b/Tests/Unit/DependencyInjection/ConfigurationTest.php index 8559895..f4fc755 100644 --- a/Tests/Unit/DependencyInjection/ConfigurationTest.php +++ b/Tests/Unit/DependencyInjection/ConfigurationTest.php @@ -9,8 +9,7 @@ * file that was distributed with this source code. */ - -namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\DependencyInjection; +namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Unit\DependencyInjection; use Symfony\Cmf\Bundle\SimpleCmsBundle\DependencyInjection\CmfSimpleCmsExtension; use Symfony\Cmf\Bundle\SimpleCmsBundle\DependencyInjection\Configuration; diff --git a/Tests/Unit/DependencyInjection/XmlSchemaTest.php b/Tests/Unit/DependencyInjection/XmlSchemaTest.php index 531f5ad..9fec364 100644 --- a/Tests/Unit/DependencyInjection/XmlSchemaTest.php +++ b/Tests/Unit/DependencyInjection/XmlSchemaTest.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\RoutingBundle\Tests\Unit\DependencyInjection; use Symfony\Cmf\Component\Testing\Unit\XmlSchemaTestCase; @@ -38,4 +37,3 @@ public function testSchema() $this->assertSchemaAcceptsXml($xmlFiles, $this->schemaPath); } } - diff --git a/Tests/Unit/Doctrine/Phpcr/PageTest.php b/Tests/Unit/Doctrine/Phpcr/PageTest.php index b777e7b..2ec4302 100644 --- a/Tests/Unit/Doctrine/Phpcr/PageTest.php +++ b/Tests/Unit/Doctrine/Phpcr/PageTest.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\Unit\Doctrine\Phpcr; use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page; diff --git a/Tests/WebTest/Admin/PageAdminTest.php b/Tests/WebTest/Admin/PageAdminTest.php index 2e9824b..11dee9e 100644 --- a/Tests/WebTest/Admin/PageAdminTest.php +++ b/Tests/WebTest/Admin/PageAdminTest.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\WebTest\Admin; use Symfony\Bundle\FrameworkBundle\Client; diff --git a/Tests/WebTest/TestApp/HttpStatusCodeTest.php b/Tests/WebTest/TestApp/HttpStatusCodeTest.php index 2718891..38a3556 100644 --- a/Tests/WebTest/TestApp/HttpStatusCodeTest.php +++ b/Tests/WebTest/TestApp/HttpStatusCodeTest.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Cmf\Bundle\SimpleCmsBundle\Tests\WebTest\TestApp; use Symfony\Bundle\FrameworkBundle\Client;