first commit

This commit is contained in:
jhartworks committed 2026-10-22 12:58:21 +02:00
commit 403a19ac85
158 files changed
+25101

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
name: Check Style
on: [push, pull_request]
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Only fetch Style PHP submodule
run: git submodule update --init -- .style
- name: Install latest PHP-CS-Fixer
run: wget https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
- name: Run Checks
run: php php-cs-fixer fix --config=.style/.php-cs-fixer.php -v --dry-run --allow-risky=yes .
+3
View File
@@ -0,0 +1,3 @@
[submodule ".style"]
path = .style
url = https://github.com/demel42/StylePHP.git
+121
View File
@@ -0,0 +1,121 @@
<?php
$config = new PhpCsFixer\Config();
return $config->setRules([
'align_multiline_comment' => [
'comment_type' => 'all_multiline'
],
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short'
],
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align',
]
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => false,
'braces' => [
'position_after_anonymous_constructs' => 'next',
'position_after_control_structures' => 'same',
'position_after_functions_and_oop_constructs' => 'next'
],
'cast_spaces' => true,
'class_attributes_separation' => false,
'class_definition' => true,
'concat_space' => [
'spacing' => 'one'
],
'declare_strict_types' => true,
'declare_equal_normalize' => true,
'declare_strict_types' => true,
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'function_declaration' => true,
'function_typehint_space' => true,
'implode_call' => true,
'include' => true,
'indentation_type' => true,
'line_ending' => true,
'linebreak_after_opening_tag' => true,
'logical_operators' => true,
'lowercase_cast' => true,
'constant_case' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'magic_method_casing' => true,
'method_argument_space' => true,
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => true,
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'new_with_braces' => true,
'no_alias_functions' => true,
'no_alternative_syntax' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_blank_lines_before_namespace' => false,
'no_break_comment' => [
'comment_text' => 'FIXME: No break. Please add proper comment if intentional'
],
'no_closing_tag' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'echo_tag_syntax' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => false,
'no_useless_else' => false,
'no_useless_return' => false,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'object_operator_without_whitespace' => true,
'ordered_class_elements' => false,
'ordered_imports' => false,
'ordered_interfaces' => false,
'pow_to_exponentiation' => false,
'protected_to_private' => false,
'return_type_declaration' => true,
'self_accessor' => true,
'semicolon_after_instruction' => true,
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_quote' => true,
'single_trait_insert_per_statement' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => false,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
])
->setIndent(' ')
->setLineEnding("\n")
->setRiskyAllowed(true)
->setUsingCache(false);
+1
View File
@@ -0,0 +1 @@
This project is licensed under the terms of the CreaticeCommen License [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0)
+163
View File
@@ -0,0 +1,163 @@
# CommonStubs
## trait StubsCommonLib
`bool SetValue(string $ident, mixed $value)`<br>
`bool SaveValue(string $ident, mixed $value, bool &$isChanged)`<br>
`mixed GetValue(string $ident)`<br>
`mixed GetValueFormatted(string $ident)`<br>
<br>
`void CreateVarProfile(string $ident, int $varType, string $suffix, float $min, float $max, float $stepSize, int $digits, string $icon, $associations = null, bool $doReinstall)`<br>
`string CheckVarProfile4Value(string $ident, mixed $value)`<br>
<br>
inspired by Nall-chan (https://github.com/Nall-chan/IPSSqueezeBox/blob/6bbdccc23a0de51bb3fbc114cefc3acf23c27a14/libs/SqueezeBoxTraits.php)`<br>
`string __get(string $name)`<br>
`void __set(string $name, string $value)`<br>
<br>
`void SetMultiBuffer(string $name, string $value)`<br>
`string GetMultiBuffer(string $name)`<br>
<br>
`void MaintainMedia(string $ident, string $name, int $mediatyp, string $extension, bool $cached, int $position, bool $keep)`<br>
`void SetMediaContent(string $ident, string $content)`<br>
`string GetMediaContent(string $ident)`<br>
<br>
`bool HookIsUsed(string $ident)`<br>
`void RegisterHook(string $ident)`<br>
<br>
`string GetMimeType(string $extension)`<br>
<br>
`string GetUserDir(bool $absolute_path)`<br>
`string GetSkinsDir(bool $absolute_path)`<br>
<br>
`bool OAuthIsUsed(string $ident)`<br>
`void RegisterOAuth(string $ident)`<br>
<br>
`mixed GetArrayElem(array $data, string $var, mixed $dflt, bool &$fnd = null)`<br>
`string LimitOutput(string $str, int $maxLength = null)`<br>
`string bool2str(bool $bval)`<br>
`string format_float(float $number, int $dec_points)`<br>
`string seconds2duration(float $sec)`<br>
`string size2str(int $size)`<br>
`string bitmap2str(int $val, int $len)`<br>
`int bit_set(int $val, int $bit)`<br>
`int bit_clear(int $val, int $bit)`<br>
`int bit_test(int $val, int $bit)`<br>
`string HttpCode2Text(int $code)`<br>
<br>
`array GetSystemLocation()`<br>
<br>
`array GetConfiguratorLocation(int $catID)`<br>
`string GetConfigurationForm()`<br>
<br>
`string MaintainStatus(int $status)`<br>
`string GetStatusText()`<br>
<br>
`array GetTranslations()`<br>
`string GetTranslationInfo()`<br>
`string Translate(string $text)`<br>
`string TranslateFormat(string $text, array $vars = null)`<br>
<br>
`array GetTimerByName(string $name)`<br>
`string PrintTimer(string $name)`<br>
`string MaintainTimer(string $name, int $msec)`<br>
<br>
`bool AdjustAction(string $Ident, bool $Mode)`<br>
<br>
`string GetConnectUrl()`<br>
`int GetConnectStatus()`<br>
`string GetConnectStatusText()`<br>
`int GetConnectionID()`<br>
`void PopupMessage(string $text)`<br>
`array GetInstallVarProfilesFormItem()`<br>
`array GetModuleInfo(int $instID)`<br>
`string InstanceInfo(int $instID)`<br>
`array GetInformationFormAction()`<br>
`string ScriptType2Name(int $scriptType)`<br>
`string EventType2Name(int $eventType)`<br>
`string ObjectType2Name(int $objectType)`<br>
`bool CommonRequestAction(string $ident, variant $params)`<br>
`string GetModulePrefix()`<br>
`bool IsValidID(int $id)`<br>
`void MaintainReferences(array $propertyNames)`<br>
`void MaintainReferences4Script(string $text)`<br>
`void MaintainReferences4Action(mixed $action)`<br>
`void UnregisterMessages(array $messagesIds)`<br>
`void RegisterObjectMessages(array $objIDs, array $messagesIds)`<br>
`array ExplodeReferences(int $instID)`<br>
`array GetReferencesFormAction()`<br>
`void PushCallChain(string $func)`<br>
`void PopCallChain(string $func)`<br>
`string PrintCallChain(bool $complete)`<br>
`string CheckPrerequisites()`<br>
dazu bei Bedarf in module.php: `array CheckModulePrerequisites()`<br>
`string CheckConfiguration()`<br>
dazu bei Bedarf in module.php: `array CheckModuleConfiguration()`<br>
`array GetCommonFormElements(string $title)`<br>
`int version2num(string $version)`<br>
`string version2str(array $info)`<br>
`array GetModuleVersion()`<br>
`string CheckUpdate()`<br>
dazu bei Bedarf in module.php: `string CheckModuleUpdate(array $oldInfo, array $newInfo)`<br>
`bool CompleteUpdate()`<br>
dazu bei Bedarf in module.php: `string CompleteModuleUpdate(array $oldInfo, array $newInfo)`<br>
`array GetCompleteUpdateFormAction()`<br>
`void AddModuleActivity(string $log, int $maxLen = 20)`<br>
`array GetModuleActivityFormAction()`<br>
`void SetVariableLogging(string $ident, int $aggregationType)`<br>
`void UnsetVariableLogging(string $ident)`<br>
`void ApiCallSetInfo(array $limits, string $notes)`<br>
`void ApiCallCollect(string $url, string $err, int $statuscode)`<br>
`array GetApiCallStatsFormItem()`<br>
`void ShowApiCallStats()`<br>
`void ClearApiCallStats()`<br>
`void SetupDataCache(int $expires_in)`<br>
`void RefreshDataCache()`<br>
`array ReadDataCache()`<br>
`void WriteDataCache(array $dataCache, int $dataTstamp)`<br>
`array GetRefreshDataCacheFormAction()`<br>
`void CommonConstruct(string $dir)`<br>
`void CommonDestruct()`<br>
Definierte Konstanten
```
IS_INVALIDPREREQUISITES
IS_UPDATEUNCOMPLETED
IS_INVALIDCONFIG
IS_NOSYMCONCONNECT
```
File diff suppressed because it is too large. Load diff
+130
View File
@@ -0,0 +1,130 @@
{
"translations": {
"de": {
"__function__": "CheckPrerequisites",
"The following system prerequisites are missing": "Folgende Systemvoraussetzungen fehlen",
"__function__": "CheckConfiguration",
"The following points of the configuration are incorrect": "Die folgenden Punkte der Konfiguration sind fehlerhaft",
"__function__": "CheckUpdate",
"Still something to do to complete the update": "Es ist noch etwas zu tun, um das Update abzuschließen",
"old version": "alte Version",
"new version": "neue Version",
"unknwon": "unbekannt",
"The use of possible affected status variables can be checked in the expansion panel \"References\"":
"Die Verwendung möglicherweise betroffener Statusvariablen kann im Erweiterungspanel \"Referenzen\" überprüft werden",
"Press button 'Complete update' to carry out the required work":
"Taste 'Update abschliessen' betätigen um die erforderlichen Arbeiten auszuführen",
"Complete update": "Update abschliessen",
"Unable to complete the update": "Das Update kann nicht abgeschlossen werden",
"please contact the author": "Bitte kontaktieren Sie den Autor",
"__function__": "GetConnectStatusText",
"Status: Symcon Connect is OK!": "Status: Symcon Connect ist OK!",
"Error: Symcon Connect is not active!": "Fehler: Symcon Connect ist nicht aktiv!",
"__function__": "HasActiveParent",
"Instance has no active parent instance": "Instanz hat keine aktive übergeordnete Instanz",
"__actions__": "ExpertPanel",
"Expert area": "Experten-Bereich",
"Re-install variable-profiles": "Variablenprofile erneut einrichten",
"__actions__": "TestPanel",
"Test area": "Test-Bereich",
"__actions__": "InformationPanel",
"Information": "Information",
"__actions__": "ReferencesPanel",
"Category": "Kategorie",
"Instance": "Instanz",
"Variable": "Variable",
"Script": "Skript",
"Event": "Ereignis",
"Medium": "Medium",
"Link": "Verknüpfung",
"PHP script": "PHP-Skript",
"Flow plan": "Ablaufplan",
"Logic plan": "Logikplan",
"Triggered event": "Ausgelöstes Ereignis",
"Cyclic event": "Zyklisches Ereignis",
"Scheduled event": "Geplantes Ereignis",
"References": "Referenzen",
"by instance used objects": "durch die Instanz verwendete Objekte",
"Objects using the instance": "Objekte, die die Instanz verwenden",
"Referenced statusvariables": "referenzierte Statusvariablen",
"Ident": "Ident",
"Object": "Objekt",
"Area": "Bereich",
"Name": "Bezeichnung",
"Open object": "Objekt öffnen",
"Timer": "Timer",
"Interval": "Intervall",
"Next run": "nächste Ausführung",
"Last run": "letzte Ausführung",
"Timer information": "Timer-Information",
"Refresh panel": "Panel aktualisieren",
"__actions__": "ModuleActivityPanel",
"Module activity": "Modul-Aktivitäten",
"Timestamp": "Zeitpunkt",
"Activity": "Aktivität",
"Refresh panel": "Panel aktualisieren",
"__actions__": "ShowApiCallStats",
"Show API call statistics": "API-Aufrufstatistik anzeigen",
"no collected data": "keine gesammelten Daten",
"Statistics of API calls": "Statistik der API-Aufrufe",
"since": "seit",
"all instances": "alle Instanzen",
"Unknown object #": "Unbekanntes Objekt #",
"total.........": "gesamt...",
"current.....": "aktuell.....",
"previous...": "zuvor.......",
"known limitations": "bekannte Limitierungen",
"per": "pro",
"additional informations": "zusätzliche Informationen",
"month": "Monat",
"week": "Woche",
"day": "Tag",
"hour": "Stunde",
"minute": "Minute",
"second": "Sekunde",
"Resource usage": "Resourcenverbrauch",
"Date": "Datum",
"today": "heute",
"Call count": "Anzahl Aufrufe",
"Memory:": "Speicher:",
"Duration:": "Laufzeit:",
"Average": "Mittelwert",
"Min": "Minimum",
"Max": "Maximum",
"__actions__": "ClearApiCallStats",
"Clear API call statistics": "API-Aufrufstatistik löschen",
"__actions__": "GetRefreshDataCacheFormAction",
"To avoid API limitations, configurator data is requested only every ${expires_in} (last: ${tstamp})":
"Zur Vermeidung von API-Limitierungen werden Konfigurator-Daten nur alle ${expires_in} (zuletzt: ${tstamp}) abgefragt",
"Refresh cache": "Cache aktualisieren",
"__status__": "Status",
"Instance getting created": "Instanz wird erstellt",
"Instance is active": "Instanz ist aktiv",
"Instance is deleted": "Instanz wird gelöscht",
"Instance is inactive": "Instanz ist inaktiv",
"Instance is not created": "Instanz wurde nicht erzeugt",
"Instance is inactive (invalid preconditions)": "Instanz ist inaktiv (ungültige Voraussetzungen)",
"Instance is inactive (update not completed)": "Instanz ist inaktiv (Update nicht abgeschlossen)",
"Instance is inactive (invalid configuration)": "Instanz ist inaktiv (ungültige Konfiguration)",
"Instance is inactive (no Symcon-Connect)": "Instanz ist inaktiv (kein Symcon-Connect)",
"__end__": ""
}
}
}