diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-22 20:25:47 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-09 10:56:24 +0100 |
commit | 53054b2bf6a919fd4ff9b44b6ad1986f21f488b6 (patch) | |
tree | 39cad52645ce00fbf863ff8e482d10dfcbe7f26c /plugins/default_colors | |
parent | e09bb93e18a333eff8e6a4156f5b58ba9c7d25cd (diff) | |
download | Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.gz Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.zst Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.zip |
Apply PHP Code Beautifier on source code for linter automatic fixes
Diffstat (limited to 'plugins/default_colors')
-rw-r--r-- | plugins/default_colors/default_colors.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/default_colors/default_colors.php b/plugins/default_colors/default_colors.php index e1fd5cfb..574a0bd4 100644 --- a/plugins/default_colors/default_colors.php +++ b/plugins/default_colors/default_colors.php | |||
@@ -28,14 +28,14 @@ function default_colors_init($conf) | |||
28 | { | 28 | { |
29 | $params = []; | 29 | $params = []; |
30 | foreach (DEFAULT_COLORS_PLACEHOLDERS as $placeholder) { | 30 | foreach (DEFAULT_COLORS_PLACEHOLDERS as $placeholder) { |
31 | $value = trim($conf->get('plugins.'. $placeholder, '')); | 31 | $value = trim($conf->get('plugins.' . $placeholder, '')); |
32 | if (strlen($value) > 0) { | 32 | if (strlen($value) > 0) { |
33 | $params[$placeholder] = $value; | 33 | $params[$placeholder] = $value; |
34 | } | 34 | } |
35 | } | 35 | } |
36 | 36 | ||
37 | if (empty($params)) { | 37 | if (empty($params)) { |
38 | $error = t('Default colors plugin error: '. | 38 | $error = t('Default colors plugin error: ' . |
39 | 'This plugin is active and no custom color is configured.'); | 39 | 'This plugin is active and no custom color is configured.'); |
40 | return [$error]; | 40 | return [$error]; |
41 | } | 41 | } |
@@ -56,7 +56,7 @@ function default_colors_init($conf) | |||
56 | function hook_default_colors_render_includes($data) | 56 | function hook_default_colors_render_includes($data) |
57 | { | 57 | { |
58 | $file = PluginManager::$PLUGINS_PATH . '/default_colors/default_colors.css'; | 58 | $file = PluginManager::$PLUGINS_PATH . '/default_colors/default_colors.css'; |
59 | if (file_exists($file )) { | 59 | if (file_exists($file)) { |
60 | $data['css_files'][] = $file ; | 60 | $data['css_files'][] = $file ; |
61 | } | 61 | } |
62 | 62 | ||
@@ -75,7 +75,7 @@ function default_colors_generate_css_file($params): void | |||
75 | $content = ''; | 75 | $content = ''; |
76 | foreach (DEFAULT_COLORS_PLACEHOLDERS as $rule) { | 76 | foreach (DEFAULT_COLORS_PLACEHOLDERS as $rule) { |
77 | $content .= !empty($params[$rule]) | 77 | $content .= !empty($params[$rule]) |
78 | ? default_colors_format_css_rule($params, $rule) .';'. PHP_EOL | 78 | ? default_colors_format_css_rule($params, $rule) . ';' . PHP_EOL |
79 | : ''; | 79 | : ''; |
80 | } | 80 | } |
81 | 81 | ||
@@ -99,8 +99,8 @@ function default_colors_format_css_rule($data, $parameter) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | $key = str_replace('DEFAULT_COLORS_', '', $parameter); | 101 | $key = str_replace('DEFAULT_COLORS_', '', $parameter); |
102 | $key = str_replace('_', '-', strtolower($key)) .'-color'; | 102 | $key = str_replace('_', '-', strtolower($key)) . '-color'; |
103 | return ' --'. $key .': '. $data[$parameter]; | 103 | return ' --' . $key . ': ' . $data[$parameter]; |
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||