for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @file
* Variable.php
*
* @author: Frédéric G. MARAND <[email protected]>
* @copyright (c) 2014 Ouest Systèmes Informatiques (OSInet).
* @license General Public License version 2 or later
*/
namespace Drupal\qa;
class Variable {
public $is_set;
public $name;
public $value;
public $default;
public function __construct($name) {
$this->name = $name;
$this->is_set = isset($GLOBALS['conf'][$name]);
if ($this->is_set) {
$this->value = $GLOBALS['conf'][$name];
}
if (function_exists('variable_get_default')) {
$this->default = variable_get_default($name);
public function dump() {
return kprint_r($this->value, TRUE, $this->name);
kprint_r
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return /** @scrutinizer ignore-call */ kprint_r($this->value, TRUE, $this->name);
public function link() {
return l($this->name, "/admin/reports/qa/variable/{$this->name}");
l
return /** @scrutinizer ignore-call */ l($this->name, "/admin/reports/qa/variable/{$this->name}");