for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2018 Spomky-Labs
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2Framework\Bundle\DependencyInjection\Component\Grant;
use Fluent\PhpConfigFileLoader;
use OAuth2Framework\Bundle\DependencyInjection\Component\Component;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
final class NoneSource implements Component
{
/**
* {@inheritdoc}
protected function continueLoading(string $path, ContainerBuilder $container, array $config)
$path
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$config
$loader = new PhpConfigFileLoader($container, new FileLocator(__DIR__.'/../../../Resources/config/grant'));
$loader->load('none.php');
}
public function name(): string
return 'none';
public function getNodeDefinition(NodeDefinition $node)
$node
->validate()
->ifTrue(function ($config) {
return true === $config['enabled'];
})
->thenInvalid('The grant type "none" is not fully implemented. Please disable it.')
->end();