Commit 0c9bf22e authored by Carsten  Rose's avatar Carsten Rose

PHPDoc: Run phpstorm 'inspect code' on whole project for PHPDoc.

parent 401c5c40
......@@ -18,6 +18,10 @@ require_once(__DIR__ . '/../qfq/Evaluate.php');
require_once(__DIR__ . '/../qfq/report/SendMail.php');
require_once(__DIR__ . '/../qfq/helper/Support.php');
/**
* Class AutoCron
* @package qfq
*/
class AutoCron {
/**
......@@ -45,6 +49,13 @@ class AutoCron {
private $verbose = '';
/**
* AutoCron constructor.
* @param bool $verbose
* @param bool $phpUnit
* @throws CodeException
* @throws UserFormException
*/
public function __construct($verbose = false, $phpUnit = false) {
$this->verbose = $verbose;
......@@ -129,6 +140,8 @@ class AutoCron {
* @param array $job
*
* @return array $job, updated with AUTOCRON_LAST_STATUS
* @throws CodeException
* @throws UserFormException
*/
private function doJobWebsite(array $job) {
......@@ -212,6 +225,10 @@ class AutoCron {
* @param array $job
*
* @return array $job, updated with AUTOCRON_LAST_STATUS
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
private function doJobMail(array $job) {
......@@ -260,6 +277,8 @@ class AutoCron {
*
* @throws CodeException
* @throws DbException
* @throws ShellException
* @throws UserFormException
*/
public function process() {
......
This diff is collapsed.
......@@ -13,6 +13,10 @@ const NESTING_TOKEN_CLOSE = '#&nesting-close&#';
const NESTING_TOKEN_LENGTH = 17;
/**
* Class BodytextParser
* @package qfq
*/
class BodytextParser {
/**
......@@ -50,6 +54,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return string
*/
......@@ -213,6 +219,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return mixed
*/
private function encryptNestingDelimeter($bodytext, $nestingOpen, $nestingClose) {
......@@ -247,6 +255,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return mixed|string
* @throws UserFormException
*/
......@@ -314,6 +324,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return mixed
*/
private function decryptNestingDelimeter($bodytext, $nestingOpen, $nestingClose) {
......
......@@ -28,6 +28,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param array $feSpecAction
* @param array $feSpecNative
* @param array $db Array of 'Database' instances
* @throws CodeException
* @throws UserFormException
*/
public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative, array $db) {
parent::__construct($formSpec, $feSpecAction, $feSpecNative, $db);
......@@ -67,6 +69,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $addClass
*
* @return string
* @throws CodeException
*/
public function getRowOpenTag($addClass = '') {
$class = Support::doAttribute('class', [$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_CLASS], $addClass]);
......@@ -105,7 +108,11 @@ class BuildFormBootstrap extends AbstractBuildForm {
}
/**
* @param string $mode
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function head($mode = FORM_LOAD) {
$html = '';
......@@ -151,6 +158,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Creates a button to open 'CopyForm' with the current form as source.
*
* @return string - the rendered button
* @throws CodeException
* @throws UserFormException
*/
private function buildButtonCopyForm() {
......@@ -181,6 +190,9 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Creates a link to open current form loaded in FormEditor
*
* @return string - the rendered Checkbox
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
private function buildViewForm() {
......@@ -227,6 +239,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Simulate Submit Button: http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
private function buildButtons() {
$buttonNew = '';
......@@ -312,6 +326,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $class
*
* @return string
* @throws CodeException
*/
private function buildButtonAnchor($url, $buttonHtmlId, $text, $toolTip, $icon, $disabled = '', $class = '') {
......@@ -338,7 +353,10 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $icon
* @param string $disabled
*
* @param string $buttonOnChangeClass
* @param string $class
* @return string
* @throws CodeException
*/
private function buildButtonCode($buttonHtmlId, $text, $tooltip, $icon, $disabled = '', $buttonOnChangeClass = '', $class = '') {
......@@ -492,6 +510,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Builds the complete HTML '<form ...>'-tag
*
* @return string
* @throws CodeException
* @throws DbException
*/
public function getFormTag() {
......@@ -511,6 +531,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
/**
* @return string
* @throws CodeException
* @throws UserFormException
*/
public function tail() {
......@@ -586,7 +608,11 @@ EOF;
* @param $htmlFormElementName
* @param $value
*
* @param array $json
* @return mixed
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function buildPill(array $formElement, $htmlFormElementName, $value, array &$json) {
$html = '';
......@@ -611,7 +637,8 @@ EOF;
* @param $htmlFormElementName
*
* @return string Wrapped $htmlElement
* @throws \qfq\UserFormException
* @throws CodeException
* @throws UserFormException
*/
public function buildRowNative(array $formElement, $htmlElement, $htmlFormElementName) {
$html = '';
......@@ -726,6 +753,7 @@ EOF;
*
* @param $formElement
* @param $elementHtml
* @return
*/
public function buildRowFieldset(array $formElement, $elementHtml) {
$html = $elementHtml;
......@@ -738,6 +766,7 @@ EOF;
*
* @param $formElement
* @param $elementHtml
* @return mixed
*/
public function buildRowTemplateGroup(array $formElement, $elementHtml) {
$html = $elementHtml;
......@@ -746,10 +775,11 @@ EOF;
}
/**
* @param $formElement
* @param array $formElement
* @param $elementHtml
*
* @return string
* @throws CodeException
*/
public function buildRowSubrecord(array $formElement, $elementHtml) {
......@@ -771,11 +801,13 @@ EOF;
*
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
*
* @param bool $htmlElementNameIdZero
* @param array $latestFeSpecNative
* @return string|array $mode=LOAD_FORM: The whole form as HTML, $mode=FORM_UPDATE /FORM_SAVE: array of all
* formElement.dynamicUpdate-yes values/states
* @throws CodeException
* @throws DbException
* @throws \qfq\UserFormException
* @throws UserFormException
*/
public function process($mode, $htmlElementNameIdZero = false, $latestFeSpecNative = array()) {
......
......@@ -45,6 +45,11 @@ class BuildFormPlain extends AbstractBuildForm {
}
/**
* @param $label
* @param $input
* @param $note
*/
public function fillWrapLabelInputNote($label, $input, $note) {
}
......@@ -58,6 +63,9 @@ class BuildFormPlain extends AbstractBuildForm {
/**
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function doSubrecords() {
$json = array();
......@@ -67,10 +75,9 @@ class BuildFormPlain extends AbstractBuildForm {
}
/**
* @param array $formElement
* @param $htmlElement
* @param $htmlFormElementName
* @param $formElement
* @param $value
*
* @return string
*/
public function buildRowNative(array $formElement, $htmlElement, $htmlFormElementName) {
......@@ -110,18 +117,38 @@ class BuildFormPlain extends AbstractBuildForm {
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowPill(array $formElement, $elementHtml) {
// TODO: Implement buildRowPill() method.
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowFieldset(array $formElement, $elementHtml) {
// TODO: Implement buildRowFieldset() method.
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowTemplateGroup(array $formElement, $elementHtml) {
// TODO: Implement buildRowTemplate() method.
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowSubrecord(array $formElement, $elementHtml) {
// TODO: Implement buildRowSubrecord() method.
}
......
......@@ -48,6 +48,11 @@ class BuildFormTable extends AbstractBuildForm {
}
/**
* @param $label
* @param $input
* @param $note
*/
public function fillWrapLabelInputNote($label, $input, $note) {
}
......@@ -61,6 +66,9 @@ class BuildFormTable extends AbstractBuildForm {
/**
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function doSubrecords() {
//TODO: $json is not returned - which is wrong. In this case, dynamic update won't work for subrecords
......@@ -70,7 +78,11 @@ class BuildFormTable extends AbstractBuildForm {
}
/**
* @param string $mode
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function head($mode = FORM_LOAD) {
$html = '';
......@@ -93,9 +105,10 @@ class BuildFormTable extends AbstractBuildForm {
}
/**
* @param $htmlFormElementName
* @param $formElement
* @param array $formElement
*
* @param $htmlElement
* @param $htmlFormElementName
* @return string
*/
public function buildRowNative(array $formElement, $htmlElement, $htmlFormElementName) {
......@@ -146,18 +159,38 @@ class BuildFormTable extends AbstractBuildForm {
return $html;
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowPill(array $formElement, $elementHtml) {
// TODO: Implement buildRowPill() method.
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowFieldset(array $formElement, $elementHtml) {
// TODO: Implement buildRowFieldset() method.
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowTemplateGroup(array $formElement, $elementHtml) {
// TODO: Implement buildRowTemplate() method.
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed|void
*/
public function buildRowSubrecord(array $formElement, $elementHtml) {
// TODO: Implement buildRowSubrecord() method.
}
......
......@@ -13,6 +13,10 @@ require_once(__DIR__ . '/database/Database.php');
require_once(__DIR__ . '/store/Store.php');
/**
* Class Delete
* @package qfq
*/
class Delete {
/**
* @var Database
......@@ -27,6 +31,8 @@ class Delete {
/**
* @param bool $dbIndexData
* @param bool $phpUnit
* @throws CodeException
* @throws UserFormException
*/
public function __construct($dbIndexData = false, $phpUnit = false) {
......
......@@ -54,6 +54,7 @@ class Evaluate {
* @param Database $db
* @param string $startDelimiter
* @param string $endDelimiter
* @throws CodeException
*/
public function __construct(Store $store, Database $db, $startDelimiter = '{{', $endDelimiter = '}}') {
$this->store = $store;
......@@ -110,8 +111,13 @@ class Evaluate {
* @param $line
* @param int $recursion
*
* @param array $debugStack
* @param string $foundInStore
* @return array|mixed|null|string
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
public function parse($line, $recursion = 0, &$debugStack = array(), &$foundInStore = '') {
$flagTokenReplaced = false;
......@@ -204,6 +210,7 @@ class Evaluate {
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
public function substitute($token, &$foundInStore = '') {
$sqlMode = ROW_IMPLODE_ALL;
......
......@@ -12,6 +12,10 @@ require_once(__DIR__ . '/store/Store.php');
require_once(__DIR__ . '/Constants.php');
require_once(__DIR__ . '/helper/HelperFile.php');
/**
* Class File
* @package qfq
*/
class File {
private $uploadErrMsg = array();
......@@ -28,6 +32,8 @@ class File {
/**
* @param bool|false $phpUnit
* @throws CodeException
* @throws UserFormException
*/
public function __construct($phpUnit = false) {
$this->session = Session::getInstance($phpUnit);
......@@ -46,6 +52,7 @@ class File {
}
/**
* @throws CodeException
* @throws UserFormException
*/
public function process() {
......
......@@ -190,6 +190,8 @@ class QuickFormQuery {
* Returns the defined forwardMode and set forwardPage
*
* @return array
* @throws CodeException
* @throws UserFormException
*/
public function getForwardMode() {
......@@ -213,6 +215,9 @@ class QuickFormQuery {
* Main entrypoint for display content: a) form and/or b) report
*
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function process() {
$html = '';
......@@ -269,6 +274,7 @@ class QuickFormQuery {
*
* @return array|string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
private function doForm($formMode) {
......@@ -776,8 +782,10 @@ class QuickFormQuery {
* @param array $formSpec Main FormSpec to copy generic parameter to FormElements
*
* @return array|int
* @throws \qfq\CodeException
* @throws \qfq\DbException
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
public function getNativeFormElements($sql, array $param, $formSpec) {
......@@ -814,6 +822,10 @@ class QuickFormQuery {
* @param array $elements
*
* @return array
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
private function explodeTemplateGroupElements(array $elements) {
$new = array();
......@@ -904,6 +916,8 @@ class QuickFormQuery {
* @param array $form
*
* @return array
* @throws CodeException
* @throws UserFormException
*/
private function modeCleanFormConfig($mode, array $form) {
......@@ -933,6 +947,8 @@ class QuickFormQuery {
* @param array $formSpec
*
* @return array
* @throws CodeException
* @throws UserFormException
*/
private function syncSystemFormConfig(array $formSpec) {
......@@ -1001,6 +1017,8 @@ class QuickFormQuery {
* @param array $formSpec
*
* @return array
* @throws CodeException
* @throws UserFormException
*/
private function initForm(array $formSpec) {
......@@ -1193,6 +1211,7 @@ class QuickFormQuery {
*
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function saveForm() {
......@@ -1207,6 +1226,8 @@ class QuickFormQuery {
*
* @return array
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function updateForm() {
......@@ -1220,6 +1241,8 @@ class QuickFormQuery {
*
* @return array
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function delete() {
......@@ -1232,6 +1255,8 @@ class QuickFormQuery {
*
* @param array $sipArray
* @param int $recordId
* @throws CodeException
* @throws UserFormException
*/
private function newRecordCreateSip(array $sipArray, $recordId) {
......
......@@ -19,6 +19,10 @@ require_once(__DIR__ . '/helper/HelperFile.php');
//require_once(__DIR__ . '/../qfq/Evaluate.php');
/**
* Class Save
* @package qfq
*/
class Save {
private $formSpec = array(); // copy of the loaded form
......@@ -38,6 +42,8 @@ class Save {
* @param array $feSpecAction
* @param array $feSpecNative
* @param array $feSpecNativeRaw
* @throws CodeException
* @throws UserFormException
*/
public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative, array $feSpecNativeRaw) {
$this->formSpec = $formSpec;
......@@ -81,6 +87,7 @@ class Save {
* @param array $formValues
*
* @return array
* @throws UserFormException
*/
private function createEmptyTemplateGroupElements(array $formValues) {
......@@ -233,6 +240,10 @@ class Save {
* @param $feName
* @return bool
*/
/**
* @param $feName
* @return bool
*/
private function isColumnUploadField($feName) {
foreach ($this->feSpecNative AS $formElement) {
......@@ -246,10 +257,13 @@ class Save {
/**
* Insert new record in table $this->formSpec['tableName'].
*
* @param $tableName
* @param array $values
*
* @return int last insert id
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function insertRecord($tableName, array $values) {
......@@ -303,7 +317,11 @@ class Save {
/**
* Process all Upload Formelements for the given $recordId. After processing &$formValues will be updated with the
* final filenames.
*
* @param $recordId
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
public function processAllUploads($recordId) {
......@@ -592,6 +610,8 @@ class Save {
*
* @param array $formElement
* @param $pathFileName
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
private function splitUpload(array $formElement, $pathFileName) {
......@@ -624,6 +644,7 @@ class Save {
*
* @param $pathFileNameSrc
* @param $fileDestinationSplit
* @param $fileSplitTableName
* @throws CodeException
* @throws DbException
* @throws UserFormException
......
......@@ -62,7 +62,7 @@ class Database {
* Returns current data base handle from Store[System][SYSTEM_DBH].
* If not exists: open database and store the new dbh in Store[System][SYSTEM_DBH]
*
* @param int $dbIndex Typically '1' for Data, optional 2 for external Form/FormElement
* @param string $dbIndex Typically '1' for Data, optional 2 for external Form/FormElement
*
* @throws CodeException
* @throws DbException
......@@ -92,6 +92,9 @@ class Database {
}
}
/**
* @return mixed|string
*/
public function getDbName() {
return $this->dbName;
}
......@@ -102,8 +105,8 @@ class Database {
*
* @param $dbIndex 1,2,...
*
* @param array $config
* @return array
* @throws CodeException
* @throws UserFormException
*/
private function getConnectionDetails($dbIndex, array $config) {
......@@ -124,6 +127,7 @@ class Database {
/**
* Open mysqli database connection if not already done.
*
* @param $config
* @return \mysqli
* @throws UserFormException
*/
......@@ -168,8 +172,9 @@ class Database {
* SELECT | SHOW | DESCRIBE | EXPLAIN: see $mode
* INSERT: last_insert_id
* UPDATE | DELETE | REPLACE: affected rows
* @throws \qfq\CodeException
* @throws \qfq\DbException
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public function sql($sql, $mode = ROW_REGULAR, array $parameterArray = array(), $specificMessage = '', array &$keys = array(), array &$stat = array()) {
$queryType = '';
......@@ -282,10 +287,11 @@ class Database {
* the query.
* @param array $stat DB_NUM_ROWS | DB_INSERT_ID | DB_AFFECTED_ROWS
*