for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* VisualPHPUnit
*
* VisualPHPUnit is a visual front-end for PHPUnit.
* PHP Version 5.6<
* @author Johannes Skov Frandsen <[email protected]>
* @copyright 2011-2016 VisualPHPUnit
* @license http://opensource.org/licenses/BSD-3-Clause The BSD License
* @link https://github.com/VisualPHPUnit/VisualPHPUnit VisualPHPUnit
*/
namespace Visualphpunit\Provider;
use Pimple\Container;
use Silex\Application;
use Pimple\ServiceProviderInterface;
use Silex\Api\BootableProviderInterface;
* Visualphpunit Silex Config provider
class ConfigServiceProvider implements ServiceProviderInterface, BootableProviderInterface
{
* Path to config file
* @var string
private $path;
* Specify the path to the config file
* @param string $path
public function __construct($path)
$this->path = $path;
}
* Register the provider
* @param Application $app
$app
Container
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.
* @return \Carpet\Provider\Jira
\Carpet\Provider\Jira|null
This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.
@return
public function register(Container $app)
$app["config"] = json_decode(file_get_contents($this->path), true)['config'];
* Boot the provider
public function boot(Application $app)
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.