Commit b0ef4c90 by Alexander Makarov

Removed unused variables

parent 15a41eae
...@@ -52,7 +52,7 @@ class ClassmapController extends Controller ...@@ -52,7 +52,7 @@ class ClassmapController extends Controller
$files = FileHelper::findFiles($root, $options); $files = FileHelper::findFiles($root, $options);
$map = []; $map = [];
foreach ($files as $file) { foreach ($files as $file) {
if (($pos = strpos($file, $root)) !== 0) { if (strpos($file, $root) !== 0) {
die("Something wrong: $file\n"); die("Something wrong: $file\n");
} }
$path = str_replace('\\', '/', substr($file, strlen($root))); $path = str_replace('\\', '/', substr($file, strlen($root)));
......
...@@ -471,7 +471,7 @@ class Generator extends \yii\gii\Generator ...@@ -471,7 +471,7 @@ class Generator extends \yii\gii\Generator
*/ */
public function validateTableName() 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.'); $this->addError('tableName', 'Asterisk is only allowed as the last character.');
return; return;
} }
......
...@@ -356,7 +356,7 @@ class BaseYii ...@@ -356,7 +356,7 @@ class BaseYii
$config = array_merge(static::$objectConfig[$class], $config); $config = array_merge(static::$objectConfig[$class], $config);
} }
if (($n = func_num_args()) > 1) { if (func_num_args() > 1) {
/** @var \ReflectionClass $reflection */ /** @var \ReflectionClass $reflection */
if (isset($reflections[$class])) { if (isset($reflections[$class])) {
$reflection = $reflections[$class]; $reflection = $reflections[$class];
......
...@@ -1579,7 +1579,7 @@ class BaseHtml ...@@ -1579,7 +1579,7 @@ class BaseHtml
{ {
if (isset($options['class'])) { if (isset($options['class'])) {
$classes = ' ' . $options['class'] . ' '; $classes = ' ' . $options['class'] . ' ';
if (($pos = strpos($classes, ' ' . $class . ' ')) === false) { if (strpos($classes, ' ' . $class . ' ') === false) {
$options['class'] .= ' ' . $class; $options['class'] .= ' ' . $class;
} }
} else { } 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