for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Dashboard module
*
* @author Alexey Krupskiy <[email protected]>
* @link http://inji.ru/
* @copyright 2015 Alexey Krupskiy
* @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
*/
class Dashboard extends Module {
public function itemHref($item, $col, $colParam) {
$modelName = $item->model;
$relItem = $modelName::get($item->$col);
if ($relItem) {
return "<a href='/admin/" . $relItem->genViewLink() . "'>" . $relItem->name() . "</a>";
}
return 'Ресурс удален';
public function moduleHref($item, $col, $colParam) {
$colParam
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
if (!$item->$col) {
return 'Модуль не задан';
if (!Module::installed($item->$col, \App::$primary)) {
return 'Модуль ' . $item->$col . ' не установлен';
$moduleInfo = Module::getInfo($item->$col);
return !empty($moduleInfo['name']) ? $moduleInfo['name'] : $item->$col;
public function modelHref($item, $col, $colParam) {
return 'Модель не задана';
if (!class_exists($item->$col)) {
return 'Модель ' . $item->$col . ' несуществует';
$modelName = $item->$col;
return $modelName::$objectName ? $modelName::$objectName : $modelName;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.