for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* GravitonRestBundle
*/
namespace Graviton\RestBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Graviton\BundleBundle\GravitonBundleInterface;
use JMS\SerializerBundle\JMSSerializerBundle;
use Misd\GuzzleBundle\MisdGuzzleBundle;
use Graviton\RestBundle\DependencyInjection\Compiler\RestServicesCompilerPass;
use Graviton\RestBundle\DependencyInjection\Compiler\RqlQueryDecoratorCompilerPass;
use Graviton\RestBundle\DependencyInjection\Compiler\RqlQueryRoutesCompilerPass;
*
* @author List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
* @license https://opensource.org/licenses/MIT MIT License
* @link http://swisscom.ch
class GravitonRestBundle extends Bundle implements GravitonBundleInterface
{
* {@inheritDoc}
* set up basic bundles needed for being RESTful
* @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
JMSSerializerBundle[]
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
public function getBundles()
return array(
new JMSSerializerBundle(),
);
}
* load compiler pass rest route loader
* @param ContainerBuilder $container container builder
* @return void
public function build(ContainerBuilder $container)
parent::build($container);
$container->addCompilerPass(new RestServicesCompilerPass);
$container->addCompilerPass(new RqlQueryRoutesCompilerPass());
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.