Permalink
Browse files

Merge pull request #186 from alcaeus/phpcs-configuration

Add phpcs config
  • Loading branch information...
2 parents 5860d96 + 75485ed commit 735e6aac9a59ed5a19d962a00f87db511a856fef @alcaeus alcaeus committed May 13, 2017
View
@@ -1,3 +1,4 @@
vendor/
.idea/
phpunit.xml
+phpcs.xml
View
@@ -1,6 +1,7 @@
<?php
use Doctrine\Common\Proxy\AbstractProxyFactory;
use Doctrine\ODM\MongoDB\Configuration;
+use DoctrineMongoODMModule\Service\DoctrineObjectHydratorFactory;
return [
'doctrine' => [
@@ -84,7 +85,7 @@
'hydrators' => [
'factories' => [
- 'DoctrineModule\Stdlib\Hydrator\DoctrineObject' => 'DoctrineMongoODMModule\Service\DoctrineObjectHydratorFactory'
+ 'DoctrineModule\Stdlib\Hydrator\DoctrineObject' => DoctrineObjectHydratorFactory::class
]
],
View
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<ruleset name="Doctrine coding standard">
+ <description>Doctrine coding standard</description>
+
+ <!-- display progress -->
+ <arg value="p"/>
+ <arg name="colors"/>
+
+ <!-- inherit rules from: -->
+ <rule ref="PSR2"/>
+ <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
+ <rule ref="Generic.Formatting.SpaceAfterNot"/>
+ <rule ref="Squiz.WhiteSpace.OperatorSpacing">
+ <properties>
+ <property name="ignoreNewlines" value="true"/>
+ </properties>
+ </rule>
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
+ <properties>
+ <property name="ignoreBlankLines" value="false"/>
+ </properties>
+ </rule>
+
+ <!-- Paths to check -->
+ <file>config</file>
+ <file>src</file>
+ <file>tests</file>
+</ruleset>
@@ -60,7 +60,7 @@ public function init(ModuleManagerInterface $manager)
$events->attach('profiler_init', function (EventInterface $e) use ($manager) {
$manager->getEvent()->getParam('ServiceManager')->get('doctrine.mongo_logger_collector.odm_default');
});
- $events->getSharedManager()-> attach('doctrine', 'loadCli.post', [$this, 'loadCli']);
+ $events->getSharedManager()->attach('doctrine', 'loadCli.post', [$this, 'loadCli']);
}
/**
@@ -104,7 +104,7 @@ public function loadCli(EventInterface $event)
$arguments = new ArgvInput();
$documentManagerName = $arguments->getParameterOption('--documentmanager');
- $documentManagerName = !empty($documentManagerName) ? $documentManagerName : 'odm_default';
+ $documentManagerName = ! empty($documentManagerName) ? $documentManagerName : 'odm_default';
$documentManager = $event->getParam('ServiceManager')->get('doctrine.documentmanager.' . $documentManagerName);
$documentHelper = new \Doctrine\ODM\MongoDB\Tools\Console\Helper\DocumentManagerHelper($documentManager);
@@ -37,6 +37,5 @@ class CustomRepositoryFactory implements RepositoryFactory
*/
public function getRepository(DocumentManager $documentManager, $documentName)
{
-
}
}

0 comments on commit 735e6aa

Please sign in to comment.