for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license https://www.yiiframework.com/license/
*/
namespace yii\mutex;
use yii\base\InvalidConfigException;
use yii\db\Connection;
use yii\di\Instance;
* DbMutex is the base class for classes, which relies on database while implementing mutex "lock" mechanism.
*
* @see Mutex
* @author resurtm <[email protected]>
* @since 2.0
abstract class DbMutex extends Mutex
{
* @var Connection|array|string the DB connection object or the application component ID of the DB connection.
* After the Mutex object is created, if you want to change this property, you should only assign
* it with a DB connection object.
* Starting from version 2.0.2, this can also be a configuration array for creating the object.
public $db = 'db';
* Initializes generic database table based mutex implementation.
* @throws InvalidConfigException if [[db]] is invalid.
public function init()
parent::init();
$this->db = Instance::ensure($this->db, Connection::className());
yii\base\BaseObject::className()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
$this->db = Instance::ensure($this->db, /** @scrutinizer ignore-deprecated */ Connection::className());
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
}
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.