Skip to content

Commit

Permalink
Task: Minor PHP doc fixes/updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
muratpurc committed Mar 21, 2023
1 parent f2a7250 commit 2f905b2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

use CONTENIDO\Plugin\MpDevTools\Gui\FieldsetTable;
use CONTENIDO\Plugin\MpDevTools\Gui\Table;
use CONTENIDO\Plugin\MpDevTools\Module\AbstractBase;

/**
Expand Down Expand Up @@ -111,7 +112,7 @@ public function addCodeRow($table, string $codeLabel, $result): MpDevToolsExampl
*
* @return string
*/
public function renderModuleInputStyles()
public function renderModuleInputStyles(): string
{
static $stylesRendered;

Expand Down
3 changes: 3 additions & 0 deletions classes/Gui/AbstractBaseSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ protected function createSelect(): \cHTMLSelectElement
* Creates the first option element for the select box.
*
* @return \cHTMLOptionElement|null
* @throws \cException
*/
protected function createFirstOption()
{
Expand Down Expand Up @@ -245,6 +246,8 @@ protected function getSpacer(int $level): string
* defined one from the constant.
*
* @return bool|mixed|string|string[]
* @throws \cDbException
* @throws \cException
*/
protected function getFolderSymbol()
{
Expand Down
8 changes: 3 additions & 5 deletions classes/Gui/ArticleSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public function __construct(
* ]
* @return string
* @throws \cDbException
* @throws \cException
* @throws \cInvalidArgumentException
*/
public function render(
Expand All @@ -62,10 +61,7 @@ public function render(

$selCatArt = explode(self::VALUES_DELIMITER, $selCatArt);
array_map(function ($item) {
$idcatat = self::toCategoryArticleId($item);
if ($idcatat > 0) {
return $idcatat;
}
return self::toCategoryArticleId($item);
}, $selCatArt);

$categoryId = CategorySelect::toCategoryId($categoryId);
Expand Down Expand Up @@ -125,6 +121,8 @@ public static function getSelectedValues($value): array
* @param int $level
* @param \cDb|null $db
* @return void
* @throws \cDbException
* @throws \cInvalidArgumentException
*/
protected function addArticleOptions(int $categoryId, array $selCatArt, int $level, \cDb $db = null)
{
Expand Down
6 changes: 6 additions & 0 deletions classes/Gui/UploadSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ public static function getSelectedValues($value): array
* @param array $files
* @param array $selUpload
* @return void
* @throws \cDbException
* @throws \cException
*/
private function fillOptions(array $files, array $selUpload)
{
Expand Down Expand Up @@ -276,6 +278,8 @@ private function isFile(string $path, \stdClass $item): bool
*
* @param string $path The path to filter for.
* @return int Number of found records.
* @throws \cDbException
* @throws \cInvalidArgumentException
*/
private function fetchUploadFiles(string $path): int
{
Expand Down Expand Up @@ -381,6 +385,8 @@ private function fetchUploadFiles(string $path): int
*
* @param string $path The path to filter for.
* @return int Number of found records.
* @throws \cDbException
* @throws \cInvalidArgumentException
*/
private function fetchDbfsFiles(string $path): int
{
Expand Down
2 changes: 1 addition & 1 deletion classes/Module/CmsToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function __toString(): string
* Magic getter for properties index, var, and value.
*
* @param string $name
* @return mixed|null
* @return bool|int|string
* @throws \cException
*/
public function __get(string $name)
Expand Down
2 changes: 1 addition & 1 deletion classes/Plugin/AbstractBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public function templateExists(string $file): bool
* @throws \cDbException
* @throws \cInvalidArgumentException
*/
public function getPluginInfo()
public function getPluginInfo(): \stdClass
{
if (!isset($this->pluginInfo)) {
$this->pluginInfo = new \stdClass();
Expand Down

0 comments on commit 2f905b2

Please sign in to comment.