for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* This file is part of the Apix Project.
* (c) Franck Cassedanne <franck at ouarz.net>
* @license http://opensource.org/licenses/BSD-3-Clause New BSD License
*/
namespace Apix;
class Service
{
* Returns the specified service -- or all if unspecified.
* @param string $key=null The service key to retrieve.
$key=null
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param array|null $args=null An array of argument to pass to the service.
$args=null
* @return mixed
public static function get($key=null, $args=null)
return Config::getInstance()->getServices($key, $args);
}
* Sets the specified name, value as a service.
* @param string $name The service name to set.
* @param mixed $mix The corresponding value to set.
* @return void
public static function set($name, $mix)
Config::getInstance()->setService($name, $mix);
* Checks wether the named service exists or not.
* @param string $name The service name to look for.
* @return boolean
public static function has($name)
$services = Config::getInstance()->get('services');
return isset($services[$name]);
$name
public static function debug($key=null)
echo '<pre>';
var_dump( Config::getInstance()->getServices($key) );
var_dump(\Apix\Config::g...()->getServices($key));
echo '</pre>';
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.