for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* citeproc-php
*
* @link http://github.com/seboettg/citeproc-php for the source repository
* @copyright Copyright (c) 2016 Sebastian Böttger.
* @license https://opensource.org/licenses/MIT
*/
namespace Seboettg\CiteProc\Constraint;
/**
* Class Variable
* @package Seboettg\CiteProc\Choose\Constraint
* @author Sebastian Böttger <[email protected]>
class Variable implements ConstraintInterface
{
private $name;
public function __construct($name, $match = null)
$match
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function __construct($name, /** @scrutinizer ignore-unused */ $match = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$this->name = $name;
}
$value
* @param $value
* @param int|null $citationNumber
* @return bool
public function validate($value, $citationNumber = null)
return !empty($value->{$this->name});