Skip to content

Commit 21ab77a

Browse files
committed
Some docblocks improvements
and a few strings in messages.
1 parent 692b982 commit 21ab77a

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

src/administrator/components/com_ccm/src/Controller/DisplayController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ class DisplayController extends BaseController
2929
/**
3030
* Method to display a view.
3131
*
32-
* @param boolean $cachable If true, the view output will be cached
33-
* @param array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link \JFilterInput::clean()}.
32+
* @param boolean $cachable If true, the view output will be cached
33+
* @param array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link \JFilterInput::clean()}.
3434
*
3535
* @return static This object to support chaining.
3636
*
37+
* @throws \Exception
3738
* @since 1.0.0
3839
*/
3940
public function display($cachable = false, $urlparams = [])

src/administrator/components/com_ccm/src/Controller/MigrationController.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
class MigrationController extends BaseController
2020
{
21+
/**
22+
* Apply migration from source CMS to target CMS.
23+
*
24+
* @return void
25+
*
26+
* @since 1.0.0
27+
*/
2128
public function apply()
2229
{
2330
$data = $this->input->post->get('jform', [], 'array');
@@ -30,7 +37,7 @@ public function apply()
3037
$sourceCmsId = isset($data['source_cms']) ? (int) $data['source_cms'] : 0;
3138
$targetCmsId = isset($data['target_cms']) ? (int) $data['target_cms'] : 0;
3239

33-
/** @var MigrationModel $model */
40+
/** @var \Joomla\Component\CCM\Administrator\Model\MigrationModel $model */
3441
$model = $this->getModel();
3542

3643
try {
@@ -72,15 +79,15 @@ public function apply()
7279
$this->setMessage(Text::_('COM_CCM_MESSAGE_MIGRATION_COMPLETED_SUCCESSFULLY') . implode(', ', $successfulMigrations));
7380
} elseif (!empty($successfulMigrations) && !empty($failedMigrations)) {
7481
$message = Text::_('COM_CCM_MESSAGE_MIGRATION_COMPLETED_PARTIALLY');
75-
$message .= Text::_('Successful: ') . implode(', ', $successfulMigrations) . '. ';
76-
$message .= Text::_('Failed: ') . implode(', ', $failedMigrations);
82+
$message .= Text::_('COM_CCM_MESSAGE_MIGRATION_SUCCESSFUL') . implode(', ', $successfulMigrations) . '. ';
83+
$message .= Text::_('COM_CCM_MESSAGE_MIGRATION_FAILED') . implode(', ', $failedMigrations);
7784
$this->setMessage($message, 'warning');
7885
} else {
79-
$this->setMessage(Text::_('All migrations failed: ') . implode(', ', $failedMigrations), 'error');
86+
$this->setMessage(Text::_('COM_CCM_MESSAGE_MIGRATION_FAILED_ALL') . implode(', ', $failedMigrations), 'error');
8087
}
8188

8289
} catch (\Exception $e) {
83-
$this->setMessage(Text::_('Migration failed: ') . $e->getMessage(), 'error');
90+
$this->setMessage(Text::_('COM_CCM_MESSAGE_MIGRATION_FAILED_THIS') . $e->getMessage(), 'error');
8491
}
8592
$this->setRedirect('index.php?option=com_ccm&view=migration');
8693
}

src/administrator/components/com_ccm/src/Model/MigrationModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ protected function loadFormData()
8484
/**
8585
* Migrate from source CMS to target CMS.
8686
*
87-
* @return void
87+
* @return boolean
8888
*
89-
* @since 4.0.0
89+
* @since 1.0.0
9090
*/
9191
public function migrate($sourceCmsId, $targetCmsId, $sourceType, $targetType)
9292
{

src/administrator/components/com_ccm/src/View/Migration/HtmlView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Joomla\CMS\Language\Text;
1717
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
1818
use Joomla\CMS\Toolbar\ToolbarHelper;
19-
use Joomla\Component\CCM\Administrator\Migration\Migration;
19+
use Joomla\Component\CCM\Administrator\Model\MigrationModel;
2020

2121
class HtmlView extends BaseHtmlView
2222
{
@@ -26,7 +26,7 @@ class HtmlView extends BaseHtmlView
2626

2727
public function display($tpl = null): void
2828
{
29-
/** @var Migration $model */
29+
/** @var MigrationModel $model */
3030
$model = $this->getModel();
3131

3232
$this->item = $model->getItem();

0 commit comments

Comments
 (0)