Ignore:
Timestamp:
Nov 20, 2020, 12:08:12 AM (3 years ago)
Author:
chronos
Message:
  • Added: Static types added to almost all classes, methods and function. Supported by PHP 7.4.
  • Fixed: Various found code issues.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Subject/Subject.php

    r886 r887  
    33class ModuleSubject extends AppModule
    44{
    5   function __construct($System)
     5  function __construct(System $System)
    66  {
    77    parent::__construct($System);
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    1818    $this->System->FormManager->RegisterClass('Subject', array(
     
    127127      'Filter' => '1',
    128128    ));
    129     $this->System->ModuleManager->Modules['IS']->RegisterDashboardItem('Subject',
    130       array('ModuleSubject', 'ShowDashboardItem'));
     129    ModuleIS::Cast($this->System->GetModule('IS'))->RegisterDashboardItem('Subject',
     130      array($this, 'ShowDashboardItem'));
    131131  }
    132132
    133   function DoInstall()
     133  function DoInstall(): void
    134134  {
    135135    $this->Database->query("CREATE TABLE IF NOT EXISTS `Subject` (
     
    173173  }
    174174
    175   function DoUninstall()
     175  function DoUninstall(): void
    176176  {
    177177    $this->Database->query('DROP TABLE `Contact`');
     
    180180  }
    181181
    182   function ShowDashboardItem()
     182  function ShowDashboardItem(): string
    183183  {
    184184    $DbResult = $this->Database->select('Subject', 'COUNT(*)', '1');
Note: See TracChangeset for help on using the changeset viewer.