@@ -18,11 +18,11 @@ |
||
18 | 18 | public function visitProperty(PropertyMetadata $metadata, $data, Context $context) { |
19 | 19 | $name = $this->namingStrategy->translateName($metadata); |
20 | 20 | |
21 | - if (null === $data || ! is_array($data) || ! array_key_exists($name, $data)) { |
|
21 | + if (null === $data || !is_array($data) || !array_key_exists($name, $data)) { |
|
22 | 22 | return; |
23 | 23 | } |
24 | 24 | |
25 | - if ( ! $metadata->type) { |
|
25 | + if (!$metadata->type) { |
|
26 | 26 | throw new RuntimeException(sprintf('You must define a type for %s::$%s.', $metadata->reflection->class, $metadata->name)); |
27 | 27 | } |
28 | 28 |
@@ -64,11 +64,11 @@ |
||
64 | 64 | 'trait' => $this->trait, |
65 | 65 | 'namespace' => $bundle->getNamespace(), |
66 | 66 | 'bundle' => $bundle->getName(), |
67 | - "manager" => ($this->mongo===true)?"doctrine_mongodb.odm.default_document_manager":"doctrine.orm.default_entity_manager", |
|
68 | - 'serializer' => ($this->mongo===true)?"tpg_extjs.odm_serializer":"tpg_extjs.orm_serializer", |
|
67 | + "manager" => ($this->mongo === true) ? "doctrine_mongodb.odm.default_document_manager" : "doctrine.orm.default_entity_manager", |
|
68 | + 'serializer' => ($this->mongo === true) ? "tpg_extjs.odm_serializer" : "tpg_extjs.orm_serializer", |
|
69 | 69 | 'controller' => $controller, |
70 | 70 | 'entity_class' => $entityClass, |
71 | - 'entity_name' => str_replace(array("/","\\"), "_", $this->entityName), |
|
71 | + 'entity_name' => str_replace(array("/", "\\"), "_", $this->entityName), |
|
72 | 72 | 'entity_bundle' => $this->entityBundle->getName(), |
73 | 73 | 'entity' => array_pop($tmpEntity), |
74 | 74 | 'route_name_prefix' => strtolower(preg_replace('/([A-Z])/', '_\\1', $bundle->getName().'_api_')) |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | public function testGetWithAssociation() { |
9 | 9 | $filter = json_encode(array( |
10 | - array('property'=>'name','value'=>'Invoice 1') |
|
10 | + array('property'=>'name', 'value'=>'Invoice 1') |
|
11 | 11 | )); |
12 | 12 | $this->client->request('GET', '/orders.json?filter='.$filter); |
13 | 13 | $content = json_decode($this->client->getResponse()->getContent(), true); |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Tpg\ExtjsBundle\Tests\Command\ODM; |
3 | 3 | |
4 | -include_once(__DIR__ . '/../../app/AppKernel.php'); |
|
4 | +include_once(__DIR__.'/../../app/AppKernel.php'); |
|
5 | 5 | |
6 | 6 | use Symfony\Bundle\FrameworkBundle\Console\Application; |
7 | 7 | use Symfony\Component\Console\Tester\CommandTester; |