| Conditions | 1 |
| Paths | 1 |
| Total Lines | 51 |
| Code Lines | 38 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 43 | final protected function setUpSmarty() |
||
| 44 | { |
||
| 45 | $this->smarty = new Smarty\Smarty(); |
||
|
|
|||
| 46 | $this->smarty->addPluginsDir($this->getSiteConfiguration()->getFilePath() . '/smarty-plugins'); |
||
| 47 | $this->smarty->registerPlugin('modifier', 'implode', 'implode'); |
||
| 48 | |||
| 49 | $this->assign('currentUser', User::getCommunity()); |
||
| 50 | $this->assign('skin', 'auto'); |
||
| 51 | $this->assign('currentDomain', null); |
||
| 52 | $this->assign('loggedIn', false); |
||
| 53 | $this->assign('baseurl', $this->getSiteConfiguration()->getBaseUrl()); |
||
| 54 | $this->assign('resourceCacheEpoch', $this->getSiteConfiguration()->getResourceCacheEpoch()); |
||
| 55 | |||
| 56 | $this->assign('siteNoticeText', ''); |
||
| 57 | $this->assign('siteNoticeVersion', 0); |
||
| 58 | $this->assign('siteNoticeState', 'd-none'); |
||
| 59 | $this->assign('toolversion', Environment::getToolVersion()); |
||
| 60 | |||
| 61 | // default these |
||
| 62 | $this->assign('onlineusers', array()); |
||
| 63 | $this->assign('typeAheadBlock', ''); |
||
| 64 | $this->assign('extraJs', array()); |
||
| 65 | |||
| 66 | // nav menu access control |
||
| 67 | $this->assign('nav__canRequests', false); |
||
| 68 | $this->assign('nav__canLogs', false); |
||
| 69 | $this->assign('nav__canUsers', false); |
||
| 70 | $this->assign('nav__canSearch', false); |
||
| 71 | $this->assign('nav__canStats', false); |
||
| 72 | $this->assign('nav__canBan', false); |
||
| 73 | $this->assign('nav__canEmailMgmt', false); |
||
| 74 | $this->assign('nav__canWelcomeMgmt', false); |
||
| 75 | $this->assign('nav__canSiteNoticeMgmt', false); |
||
| 76 | $this->assign('nav__canUserMgmt', false); |
||
| 77 | $this->assign('nav__canViewRequest', false); |
||
| 78 | $this->assign('nav__canJobQueue', false); |
||
| 79 | $this->assign('nav__canFlaggedComments', false); |
||
| 80 | $this->assign('nav__canDomainMgmt', false); |
||
| 81 | $this->assign('nav__canQueueMgmt', false); |
||
| 82 | $this->assign('nav__canFormMgmt', false); |
||
| 83 | $this->assign('nav__canErrorLog', false); |
||
| 84 | |||
| 85 | // Navigation badges for concern areas. |
||
| 86 | $this->assign("nav__numAdmin", 0); |
||
| 87 | $this->assign("nav__numFlaggedComments", 0); |
||
| 88 | $this->assign("nav__numJobQueueFailed", 0); |
||
| 89 | |||
| 90 | // debug helpers |
||
| 91 | $this->assign('showDebugCssBreakpoints', $this->getSiteConfiguration()->getDebuggingCssBreakpointsEnabled()); |
||
| 92 | |||
| 93 | $this->assign('page', $this); |
||
| 94 | } |
||
| 108 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths