Skip to content

Commit

Permalink
Issue #47: automated test and phpcs errors (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela committed Sep 16, 2023
1 parent 5a11b3f commit 5435f79
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 65 deletions.
14 changes: 12 additions & 2 deletions core/modules/ckeditor5/ckeditor5.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,24 @@
*/
function ckeditor5_settings_form(&$form, $form_state, $format) {
$plugins = ckeditor5_plugins();
$toolbar_element = theme('ckeditor5_settings_toolbar', array('format' => $format, 'plugins' => $plugins));
$toolbar_element = theme('ckeditor5_settings_toolbar', array(
'format' => $format,
'plugins' => $plugins,
));
$elements = array(
'#attached' => array(
'library' => array(
array('ckeditor5', 'backdrop.ckeditor5.admin'),
),
'js' => array(
array('data' => array('ckeditor5' => array('toolbarAdmin' => $toolbar_element)), 'type' => 'setting')
array(
'data' => array(
'ckeditor5' => array(
'toolbarAdmin' => $toolbar_element,
),
),
'type' => 'setting',
),
),
),
'#attributes' => array('class' => array('ckeditor5-toolbar-configuration')),
Expand Down
12 changes: 6 additions & 6 deletions core/modules/ckeditor5/ckeditor5.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function hook_ckeditor5_plugins() {
* This hook may be used to modify plugin properties after they have been
* specified by other modules.
*
* @param $plugins
* @param array $plugins
* An array of all the existing plugin definitions, passed by reference.
*
* @see hook_ckeditor5_plugins()
Expand All @@ -124,10 +124,10 @@ function hook_ckeditor5_plugins_alter(array &$plugins) {
* ckeditor5_stylesheets[] = css/ckeditor5-iframe.css
* @endcode
*
* @param $css
* @param array $css
* An array of CSS files, passed by reference. This is a flat list of file
* paths relative to the Backdrop root.
* @param $format
* @param object $format
* The corresponding text format object as returned by filter_format_load()
* for which the current text editor is being displayed.
*
Expand All @@ -148,7 +148,7 @@ function hook_ckeditor5_css_alter(array &$css, $format) {
*
* @param array $settings
* The array of settings that will be passed to CKEditor.
* @param $format
* @param object $format
* The filter format object containing this editor's settings.
*/
function hook_ckeditor5_settings_alter(array &$settings, $format) {
Expand All @@ -173,8 +173,8 @@ function hook_ckeditor5_settings_alter(array &$settings, $format) {
* Enabled callback for hook_ckeditor5_plugins().
*
* Note: This is not really a hook. The function name is manually specified via
* 'enabled callback' in hook_ckeditor5_plugins(), with this recommended callback
* name pattern. It is called from ckeditor5_add_settings().
* 'enabled callback' in hook_ckeditor5_plugins(), with this recommended
* callback name pattern. It is called from ckeditor5_add_settings().
*
* This callback should determine if a plugin should be enabled for a CKEditor
* instance. Plugins may be enabled based off an explicit setting, or enable
Expand Down
2 changes: 1 addition & 1 deletion core/modules/ckeditor5/ckeditor5.install
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function ckeditor5_requirements($phase) {
$requirements['ckeditor5_not_enabled'] = array(
'title' => $t('CKEditor'),
'value' => $t('CKEditor is installed but not enabled on any formats. Visit the <a href="!url">text editors and formats configuration</a> to enable CKEditor on one or more formats.', array('!url' => url('admin/config/content/formats'))),
'severity' => REQUIREMENT_WARNING
'severity' => REQUIREMENT_WARNING,
);
}
}
Expand Down
Loading

0 comments on commit 5435f79

Please sign in to comment.