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

Commit 25cdf6c

Browse files
dbuStyleCIBot
authored andcommitted
Applied fixes from StyleCI
1 parent 6e29eae commit 25cdf6c

File tree

16 files changed

+70
-40
lines changed

16 files changed

+70
-40
lines changed

Controller/ResourceController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(
4242
public function resourceAction($repositoryName, $path)
4343
{
4444
$repository = $this->registry->get($repositoryName);
45-
$resource = $repository->get('/' . $path);
45+
$resource = $repository->get('/'.$path);
4646

4747
$context = SerializationContext::create();
4848
$context->enableMaxDepthChecks();
@@ -55,7 +55,7 @@ public function resourceAction($repositoryName, $path)
5555

5656
$response = new Response($json);
5757
$response->headers->set('Content-Type', 'application/json');
58-
58+
5959
return $response;
6060
}
6161
}

DependencyInjection/CmfResourceRestExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CmfResourceRestExtension extends Extension
2626
);
2727

2828
/**
29-
* {@inheritDoc}
29+
* {@inheritdoc}
3030
*/
3131
public function load(array $configs, ContainerBuilder $container)
3232
{
@@ -45,11 +45,11 @@ public function load(array $configs, ContainerBuilder $container)
4545

4646
public function getNamespace()
4747
{
48-
return 'http://cmf.symfony.com/schema/dic/' . $this->getAlias();
48+
return 'http://cmf.symfony.com/schema/dic/'.$this->getAlias();
4949
}
5050

5151
/**
52-
* Automatically include native enhancers
52+
* Automatically include native enhancers.
5353
*/
5454
private function loadEnhancers(ContainerBuilder $container, LoaderInterface $loader, $enhancerMap)
5555
{
@@ -65,7 +65,7 @@ private function loadEnhancers(ContainerBuilder $container, LoaderInterface $loa
6565
continue;
6666
}
6767

68-
$loader->load('enhancer.' . $enhancerName . '.xml');
68+
$loader->load('enhancer.'.$enhancerName.'.xml');
6969
$loaded[$enhancerName] = true;
7070
}
7171

Enhancer/EnhancerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Puli\Repository\Api\Resource\Resource;
1616

1717
/**
18-
* Enhancer classes enhance the REST response for resources
18+
* Enhancer classes enhance the REST response for resources.
1919
*
2020
* @author Daniel Leech <[email protected]>
2121
*/
@@ -29,7 +29,7 @@ interface EnhancerInterface
2929
* $context->addData('foobar', 'Some value');
3030
*
3131
* @param Context Serialization context
32-
* @param Resource The resource being serialized
32+
* @param resource The resource being serialized
3333
*/
3434
public function enhance(array $data, Resource $resource);
3535
}

Enhancer/PayloadEnhancer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
use Puli\Repository\Api\Resource\Resource;
1515

1616
/**
17-
* Serialize the payload
17+
* Serialize the payload.
1818
*
1919
* @author Daniel Leech <[email protected]>
2020
*/
2121
class PayloadEnhancer implements EnhancerInterface
2222
{
2323
/**
24-
* {@inheritDoc}
24+
* {@inheritdoc}
2525
*/
2626
public function enhance(array $data, Resource $resource)
2727
{

Enhancer/SonataAdminEnhancer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1818

1919
/**
20-
* Add links and meta-info from Sonata Admin
20+
* Add links and meta-info from Sonata Admin.
2121
*
2222
* @author Daniel Leech <[email protected]>
2323
*/
@@ -34,9 +34,9 @@ class SonataAdminEnhancer implements EnhancerInterface
3434
private $urlGenerator;
3535

3636
/**
37-
* __construct
37+
* __construct.
3838
*
39-
* @param Pool $pool
39+
* @param Pool $pool
4040
* @param UrlGeneratorInterface $urlGenerator
4141
*/
4242
public function __construct(Pool $pool, UrlGeneratorInterface $urlGenerator)
@@ -46,7 +46,7 @@ public function __construct(Pool $pool, UrlGeneratorInterface $urlGenerator)
4646
}
4747

4848
/**
49-
* {@inheritDoc}
49+
* {@inheritdoc}
5050
*/
5151
public function enhance(array $data, Resource $resource)
5252
{

Registry/EnhancerRegistry.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Puli\Repository\Api\Resource\Resource;
1616

1717
/**
18-
* Registry for resource enhancers
18+
* Registry for resource enhancers.
1919
*
2020
* @author Daniel Leech <[email protected]>
2121
*/
@@ -37,9 +37,9 @@ class EnhancerRegistry
3737
private $container;
3838

3939
/**
40-
* @param ContainerInterface $container The service container
41-
* @param array $enhancerMap Map of enhancer aliases to repository names
42-
* @param array $aliasMap Serice ID map for enhancer aliases
40+
* @param ContainerInterface $container The service container
41+
* @param array $enhancerMap Map of enhancer aliases to repository names
42+
* @param array $aliasMap Serice ID map for enhancer aliases
4343
*/
4444
public function __construct(
4545
ContainerInterface $container,
@@ -56,6 +56,7 @@ public function __construct(
5656
* the repository with the given alias.
5757
*
5858
* @param string $repositoryAlias
59+
*
5960
* @return EnhancerInterface[]
6061
*/
6162
public function getEnhancers($repositoryAlias)

Registry/PayloadAliasRegistry.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Cmf\Component\Resource\Repository\Resource\CmfResource;
1717

1818
/**
19-
* Registry for resource payload aliases
19+
* Registry for resource payload aliases.
2020
*
2121
* @author Daniel Leech <[email protected]>
2222
*/
@@ -34,7 +34,7 @@ class PayloadAliasRegistry
3434

3535
/**
3636
* @param RepositoryRegistryInterface $repositoryRegistry
37-
* @param array $aliases
37+
* @param array $aliases
3838
*/
3939
public function __construct(
4040
RepositoryRegistryInterface $repositoryRegistry,
@@ -52,9 +52,10 @@ public function __construct(
5252
}
5353

5454
/**
55-
* Return the alias for the given PHPCR resource
55+
* Return the alias for the given PHPCR resource.
56+
*
57+
* @param resource $resource
5658
*
57-
* @param Resource $resource
5859
* @return string
5960
*/
6061
public function getPayloadAlias(Resource $resource)

Serializer/Jms/EventSubscriber/PhpcrNodeSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use JMS\Serializer\EventDispatcher\PreSerializeEvent;
1818

1919
/**
20-
* Force the type of PHPCR node instances to PHPCR\NodeInterface
20+
* Force the type of PHPCR node instances to PHPCR\NodeInterface.
2121
*
2222
* @author Daniel Leech <[email protected]>
2323
*/

Serializer/Jms/EventSubscriber/ResourceSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Puli\Repository\Api\Resource\Resource;
1919

2020
/**
21-
* Force instaces of ResourceCollection to type "ResourceCollection"
21+
* Force instaces of ResourceCollection to type "ResourceCollection".
2222
*
2323
* @author Daniel Leech <[email protected]>
2424
*/

Serializer/Jms/Handler/PhpcrNodeHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use PHPCR\NodeInterface;
1919

2020
/**
21-
* Handle PHPCR node serialization
21+
* Handle PHPCR node serialization.
2222
*
2323
* @author Daniel Leech <[email protected]>
2424
*/
@@ -38,9 +38,9 @@ public static function getSubscribingMethods()
3838

3939
/**
4040
* @param JsonSerializationVisitor $visitor
41-
* @param NodeInterface $nodeInterface
42-
* @param array $type
43-
* @param Context $context
41+
* @param NodeInterface $nodeInterface
42+
* @param array $type
43+
* @param Context $context
4444
*/
4545
public function serializePhpcrNode(
4646
JsonSerializationVisitor $visitor,

0 commit comments

Comments
 (0)