Merge branch 'master' into useNamespaces_master

This commit is contained in:
Hugues Peccatte 2015-09-27 20:50:19 +02:00
commit c752c01309
9 changed files with 37 additions and 40 deletions

View File

@ -24,6 +24,8 @@ class Advisor
protected $runResult;
/**
* Get variables
*
* @return mixed
*/
public function getVariables()
@ -32,7 +34,9 @@ class Advisor
}
/**
* @param mixed $variables
* Set variables
*
* @param array $variables Variables
*
* @return Advisor
*/
@ -43,13 +47,24 @@ class Advisor
return $this;
}
public function setVariable($variable, $value) {
/**
* Set a variable and its value
*
* @param string|int $variable Variable to set
* @param mixed $value Value to set
*
* @return $this
*/
public function setVariable($variable, $value)
{
$this->variables[$variable] = $value;
return $this;
}
/**
* Get parseResult
*
* @return mixed
*/
public function getParseResult()
@ -58,7 +73,9 @@ class Advisor
}
/**
* @param mixed $parseResult
* Set parseResult
*
* @param array $parseResult Parse result
*
* @return Advisor
*/
@ -70,6 +87,8 @@ class Advisor
}
/**
* Get runResult
*
* @return mixed
*/
public function getRunResult()
@ -78,7 +97,9 @@ class Advisor
}
/**
* @param mixed $runResult
* Set runResult
*
* @param array $runResult Run result
*
* @return Advisor
*/
@ -114,7 +135,7 @@ class Advisor
= isset($memory['MemTotal']) ? $memory['MemTotal'] : 0;
// Step 2: Read and parse the list of rules
$this->setParseResult($this->parseRulesFile());
$this->setParseResult(static::parseRulesFile());
// Step 3: Feed the variables to the rules and let them fire. Sets
// $runResult
$this->runRules();
@ -511,7 +532,7 @@ class Advisor
/*overload*/mb_substr($line, 1)
);
$lines[$ruleNo][$ruleSyntax[$ruleLine]] = $i + 1;
$ruleLine += 1;
++$ruleLine;
}
// Rule complete

View File

@ -339,7 +339,7 @@ class Console
. __('Add') . '</span></div>';
$output .= '</div><div class="content bookmark">';
$output .= $this->getBookmarkContent();
$output .= static::getBookmarkContent();
$output .= '</div>';
$output .= '<div class="mid_layer"></div>';
$output .= '<div class="card add">';

View File

@ -3078,10 +3078,10 @@ class Util
$i = 0;
$printable = '';
while ($value >= pow(2, $i)) {
$i++;
++$i;
}
if ($i != 0) {
$i = $i - 1;
--$i;
}
while ($i >= 0) {
@ -3091,7 +3091,7 @@ class Util
$printable = '1' . $printable;
$value = $value - pow(2, $i);
}
$i--;
--$i;
}
$printable = strrev($printable);
}

View File

@ -15,17 +15,6 @@ namespace PMA\libraries\di;
class FactoryItem extends ReflectorItem
{
/**
* Constructor
*
* @param Container $container Container
* @param mixed $definition Definition
*/
public function __construct(Container $container, $definition)
{
parent::__construct($container, $definition);
}
/**
* Construct an instance
*

View File

@ -18,17 +18,6 @@ class ServiceItem extends ReflectorItem
/** @var mixed */
protected $instance;
/**
* Constructor
*
* @param Container $container Container
* @param mixed $definition Definition
*/
public function __construct(Container $container, $definition)
{
parent::__construct($container, $definition);
}
/**
* Get the instance of the service
*

View File

@ -248,7 +248,7 @@ function PMA_ipv6MaskTest($test_range, $ip_to_test)
// We processed one nibble, move to previous position
$flexbits -= 4;
$pos -= 1;
--$pos;
}
// check if the IP to test is within the range

View File

@ -129,9 +129,8 @@ class ImportMediawiki extends ImportPlugin
$full_buffer_lines_count = count($buffer_lines);
// If the reading is not finalised, the final line of the current chunk
// will not be complete
if (!$finished) {
$full_buffer_lines_count -= 1;
$last_chunk_line = $buffer_lines[$full_buffer_lines_count];
if (! $finished) {
$last_chunk_line = $buffer_lines[--$full_buffer_lines_count];
}
for ($line_nr = 0; $line_nr < $full_buffer_lines_count; ++$line_nr) {

View File

@ -113,7 +113,7 @@ class RelationStatsDia
*/
public function relationDraw($showColor)
{
DiaRelationSchema::$objectId += 1;
++DiaRelationSchema::$objectId;
/*
* if source connection points and destination connection
* points are same then return it false and don't draw that

View File

@ -61,9 +61,8 @@ class TableStatsDia extends TableStats
/**
* Every object in Dia document needs an ID to identify
* so, we used a static variable to keep the things unique
*/
DiaRelationSchema::$objectId += 1;
$this->tableId = DiaRelationSchema::$objectId;
*/
$this->tableId = ++DiaRelationSchema::$objectId;
}
/**