Skip to content

Commit 3aa6e9a

Browse files
committed
CS, Strict PHP7 and updated docs
1 parent 7eb17e8 commit 3aa6e9a

File tree

6 files changed

+22
-8
lines changed

6 files changed

+22
-8
lines changed

Collector/DebugLogger.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare (strict_types=1);
4+
35
namespace GraphAware\Neo4jBundle\Collector;
46

57
use GraphAware\Common\Cypher\StatementInterface;

Collector/Neo4jDataCollector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare (strict_types=1);
4+
35
namespace GraphAware\Neo4jBundle\Collector;
46

57
use Symfony\Component\HttpFoundation\Request;

Collector/Twig/Neo4jResultExtension.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare (strict_types=1);
4+
35
namespace GraphAware\Neo4jBundle\Collector\Twig;
46

57
use GraphAware\Neo4j\Client\Formatter\Type\Node;
@@ -22,25 +24,27 @@ public function getFilters()
2224
}
2325

2426
/**
25-
* @param string $message http message
27+
* @param mixed $object
28+
*
29+
* @return string
2630
*/
27-
public function getType($object)
31+
public function getType($object):string
2832
{
2933
return $this->doGetType($object, true);
3034
}
3135

32-
public function getName()
36+
public function getName():string
3337
{
3438
return 'neo4j.result';
3539
}
3640

3741
/**
38-
* @param $object
39-
* @param $recursive
42+
* @param mixed $object
43+
* @param bool $recursive
4044
*
4145
* @return string
4246
*/
43-
private function doGetType($object, $recursive):string
47+
private function doGetType($object, bool $recursive):string
4448
{
4549
if ($object instanceof Node) {
4650
return sprintf('%s: %s', $object->identity(), implode(', ', $object->labels()));

DependencyInjection/Configuration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare (strict_types=1);
4+
35
namespace GraphAware\Neo4jBundle\DependencyInjection;
46

57
use Symfony\Component\Config\Definition\Builder\TreeBuilder;

DependencyInjection/GraphAwareNeo4jExtension.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare (strict_types=1);
4+
35
namespace GraphAware\Neo4jBundle\DependencyInjection;
46

57
use GraphAware\Neo4j\Client\Connection\Connection;
@@ -52,7 +54,7 @@ public function load(array $configs, ContainerBuilder $container)
5254
*
5355
* @return array with service ids
5456
*/
55-
private function handleClients(array &$config, ContainerBuilder $container):array
57+
private function handleClients(array &$config, ContainerBuilder $container): array
5658
{
5759
if (empty($config['clients'])) {
5860
// Add default entity manager if none set.
@@ -172,7 +174,7 @@ private function getUrl(array $config): string
172174
/**
173175
* {@inheritdoc}
174176
*/
175-
public function getConfiguration(array $config, ContainerBuilder $container)
177+
public function getConfiguration(array $config, ContainerBuilder $container): Configuration
176178
{
177179
return new Configuration($container->getParameter('kernel.debug'));
178180
}

Factory/ClientFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare (strict_types=1);
4+
35
namespace GraphAware\Neo4jBundle\Factory;
46

57
use GraphAware\Neo4j\Client\ClientBuilder;

0 commit comments

Comments
 (0)