Commit b0ef4c90 by Alexander Makarov

Removed unused variables

parent 15a41eae
......@@ -52,7 +52,7 @@ class ClassmapController extends Controller
$files = FileHelper::findFiles($root, $options);
$map = [];
foreach ($files as $file) {
if (($pos = strpos($file, $root)) !== 0) {
if (strpos($file, $root) !== 0) {
die("Something wrong: $file\n");
}
$path = str_replace('\\', '/', substr($file, strlen($root)));
......
......@@ -471,7 +471,7 @@ class Generator extends \yii\gii\Generator
*/
public function validateTableName()
{
if (($pos = strpos($this->tableName, '*')) !== false && substr($this->tableName, -1) !== '*') {
if (strpos($this->tableName, '*') !== false && substr($this->tableName, -1) !== '*') {
$this->addError('tableName', 'Asterisk is only allowed as the last character.');
return;
}
......
......@@ -356,7 +356,7 @@ class BaseYii
$config = array_merge(static::$objectConfig[$class], $config);
}
if (($n = func_num_args()) > 1) {
if (func_num_args() > 1) {
/** @var \ReflectionClass $reflection */
if (isset($reflections[$class])) {
$reflection = $reflections[$class];
......
......@@ -1579,7 +1579,7 @@ class BaseHtml
{
if (isset($options['class'])) {
$classes = ' ' . $options['class'] . ' ';
if (($pos = strpos($classes, ' ' . $class . ' ')) === false) {
if (strpos($classes, ' ' . $class . ' ') === false) {
$options['class'] .= ' ' . $class;
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment