Missing class import via use statement (line '48', column '15'). Open
$row = (new \App\Db\Query())
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '50', column '34'). Open
'estimated_work_time' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time)'),
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '29', column '15'). Open
return (new \App\Db\Query())
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '51', column '32'). Open
'progress_in_hours' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time * vtiger_projecttask.projecttaskprogress / 100)')
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method calculateEstimatedWorkTime uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$progressInHours = 0;
$tmpEstimatedWorkTime = 0;
foreach (static::getChildren($id) as $child) {
$tmpEstimatedWorkTime += static::calculateEstimatedWorkTime($child['id']);
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Vtiger_Record_Model' in method 'updateProgress'. Open
$recordModel = Vtiger_Record_Model::getInstanceById($id);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Project_Module_Model' in method 'updateProgress'. Open
Project_Module_Model::updateProgress($recordModel->get('projectid'));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method updateProgress uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
static::updateProgress(
$recordModel->get('parentid'),
$estimatedWorkTime,
$progressInHours,
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Define a constant instead of duplicating this literal "estimated_work_time" 4 times. Open
'estimated_work_time' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time)'),
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "projectid" 4 times. Open
Project_Module_Model::updateProgress($recordModel->get('projectid'));
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Parameter $queryGenerator
has undeclared type \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
public function getQueryByRelatedField(Vtiger_ListView_Model $listviewModel, App\QueryGenerator $queryGenerator)
- Exclude checks
Suspicious array access to int
Open
if ($callerId !== $child['id']) {
- Exclude checks
Suspicious array access to int
Open
$tmpEstimatedWorkTime += static::calculateEstimatedWorkTime($child['id']);
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
return (new \App\Db\Query())
- Exclude checks
Suspicious array access to int
Open
$childEstimatedWorkTime = static::calculateEstimatedWorkTime($child['id']);
- Exclude checks
Call to method __construct
from undeclared class \yii\db\Expression
Open
'progress_in_hours' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time * vtiger_projecttask.projecttaskprogress / 100)')
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$row = (new \App\Db\Query())
- Exclude checks
Suspicious array access to int
Open
$progressInHours += ($childEstimatedWorkTime * $child['projectmilestone_progress'] / 100);
- Exclude checks
Call to method addNativeCondition
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$queryGenerator->addNativeCondition(['projectid' => (int) $filterFields['projectid']]);
- Exclude checks
Call to method __construct
from undeclared class \yii\db\Expression
Open
'estimated_work_time' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time)'),
- Exclude checks
Avoid excessively long variable names like $childEstimatedWorkTime. Keep variable name length under 20. Open
$childEstimatedWorkTime = static::calculateEstimatedWorkTime($child['id']);
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $cacheEstimatedWorkTime. Keep variable name length under 20. Open
protected static $cacheEstimatedWorkTime = [];
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class ProjectMilestone_Module_Model extends Vtiger_Module_Model
- Exclude checks
Avoid variables with short names like $id. Configured minimum length is 3. Open
public static function updateProgress(int $id, float $estimatedWorkTime = 0, float $progressInHours = 0, ?int $callerId = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The class ProjectMilestone_Module_Model is not named in CamelCase. Open
class ProjectMilestone_Module_Model extends Vtiger_Module_Model
{
/**
* Cache for estimated work time.
*
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Avoid variables with short names like $id. Configured minimum length is 3. Open
public static function calculateEstimatedWorkTime(int $id, float $estimatedWorkTime = 0): float
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
protected static function getChildren(int $id): array
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
protected static function calculateProgressOfTasks(int $id, float &$estimatedWorkTime, float &$progressInHours)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->innerJoin('vtiger_crmentity', 'vtiger_projecttask.projecttaskid = vtiger_crmentity.crmid')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param float $progressInHours
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$row = (new \App\Db\Query())
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @throws \App\Exceptions\AppException
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::calculateProgressOfTasks($id, $tmpEstimatedWorkTime, $progressInHours);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::$cacheEstimatedWorkTime[$id] = $tmpEstimatedWorkTime;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param float $progressInHours
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int|null $callerId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$estimatedWorkTime += $childEstimatedWorkTime;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach (static::getChildren($id) as $child) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$progressInHours += ($childEstimatedWorkTime * $child['projectmilestone_progress'] / 100);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $cacheEstimatedWorkTime = [];
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
->select(['id' => 'vtiger_projectmilestone.projectmilestoneid', 'vtiger_projectmilestone.projectmilestone_progress'])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->from('vtiger_projecttask')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$estimatedWorkTime += (float) $row['estimated_work_time'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function updateProgress(int $id, float $estimatedWorkTime = 0, float $progressInHours = 0, ?int $callerId = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$estimatedWorkTime += $tmpEstimatedWorkTime;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($callerId !== $child['id']) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function calculateEstimatedWorkTime(int $id, float $estimatedWorkTime = 0): float
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset(static::$cacheEstimatedWorkTime[$id])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Update progress milestone.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static function calculateProgressOfTasks(int $id, float &$estimatedWorkTime, float &$progressInHours)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->andWhere(['vtiger_projecttask.projectmilestoneid' => $id])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$estimatedWorkTime += static::$cacheEstimatedWorkTime[$id];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$tmpEstimatedWorkTime = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param float $estimatedWorkTime
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->where(['vtiger_crmentity.deleted' => [0, 2]])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'estimated_work_time' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time)'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$tmpEstimatedWorkTime += static::calculateEstimatedWorkTime($child['id']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Cache for estimated work time.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param float $estimatedWorkTime
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
'progress_in_hours' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time * vtiger_projecttask.projecttaskprogress / 100)')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel = Vtiger_Record_Model::getInstanceById($id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getQueryByRelatedField(Vtiger_ListView_Model $listviewModel, App\QueryGenerator $queryGenerator)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->from('vtiger_projectmilestone')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @throws \App\Exceptions\AppException
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->where(['vtiger_crmentity.deleted' => [0, 2]])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$progressInHours = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$projectProgress = $estimatedWorkTime ? round((100 * $progressInHours) / $estimatedWorkTime) : 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->select([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false !== $row && null !== $row['estimated_work_time']) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @throws \App\Exceptions\AppException
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::updateProgress(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static function getChildren(int $id): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->one();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'progress_in_hours' => new \yii\db\Expression('SUM(vtiger_projecttask.estimated_work_time * vtiger_projecttask.projecttaskprogress / 100)')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return float
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach (static::getChildren($id) as $child) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('estimated_work_time', $estimatedWorkTime);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$estimatedWorkTime,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return int[]
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->innerJoin('vtiger_crmentity', 'vtiger_projectmilestone.projectmilestoneid = vtiger_crmentity.crmid')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Calculate estimated work time.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $estimatedWorkTime;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get list view query for popup window.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\QueryGenerator $queryGenerator
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return (new \App\Db\Query())
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$progressInHours += (float) $row['progress_in_hours'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param float $estimatedWorkTime
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($filterFields['projectid'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Project_Module_Model::updateProgress($recordModel->get('projectid'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var float[]
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get children by parent ID.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->select(['id' => 'vtiger_projectmilestone.projectmilestoneid', 'vtiger_projectmilestone.projectmilestone_progress'])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->andWhere(['vtiger_projectmilestone.parentid' => $id])->all();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Calculate the progress of tasks.
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
public static function updateProgress(int $id, float $estimatedWorkTime = 0, float $progressInHours = 0, ?int $callerId = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$childEstimatedWorkTime = static::calculateEstimatedWorkTime($child['id']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::calculateProgressOfTasks($id, $estimatedWorkTime, $progressInHours);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('projectmilestone_progress', $projectProgress);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($recordModel->isEmpty('parentid')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param Vtiger_ListView_Model $listviewModel
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->addNativeCondition(['projectid' => (int) $filterFields['projectid']]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$progressInHours,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('Project' === $listviewModel->get('src_module') && !$listviewModel->isEmpty('filterFields')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::$cacheEstimatedWorkTime[$id] = $estimatedWorkTime;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->get('parentid'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filterFields = $listviewModel->get('filterFields');
- Exclude checks
Class name "ProjectMilestone_Module_Model" is not in camel caps format Open
class ProjectMilestone_Module_Model extends Vtiger_Module_Model
- Exclude checks