for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* YAWIK
*
* @filesource
* @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
* @license MIT
*/
/** AbstractProfile.php */
namespace Auth\Controller\Plugin\SocialProfiles;
use Zend\Mvc\Controller\Plugin\AbstractPlugin;
use Hybrid_Provider_Adapter;
abstract class AbstractAdapter extends AbstractPlugin
{
public function __invoke($api)
return $this->fetch($api);
}
* @param mixed $api
* @param Hybrid_Provider_Adapter $hauthAdapter
public function init($api, Hybrid_Provider_Adapter $hauthAdapter)
{}
* @param string $network
$network
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.
* @return \Auth\Entity\SocialProfiles\ProfileInterface|bool
false|object
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 fetch($api)
$result = $this->queryApi($api);
if (!$result) {
return false;
$profile = $this->getProfile();
$profile->setData($result);
return $profile;
abstract protected function queryApi($api);
protected function getProfile()
$class = $this->getProfileClass();
$profile = new $class();
protected function getProfileClass()
$class = get_class($this);
$class = explode('\\', $class);
$class = array_pop($class);
$class = '\\Auth\\Entity\\SocialProfiles\\' . $class;
return $class;
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.