Skip to content

Commit

Permalink
Small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
pegro committed Sep 8, 2018
1 parent 11c18fa commit 02161ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/ImagickInfoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Core\Messaging\AbstractMessage;

use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

/**
Expand Down
2 changes: 0 additions & 2 deletions Classes/Controller/ImagickTestsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

/**
* Backend module controller
Expand Down
28 changes: 7 additions & 21 deletions Classes/Xclass/TestSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use TYPO3\CMS\Core\Utility\GeneralUtility;

class TestSetup extends \TYPO3\CMS\Install\Controller\Action\Tool\TestSetup {

/**
Expand All @@ -37,27 +35,15 @@ class TestSetup extends \TYPO3\CMS\Install\Controller\Action\Tool\TestSetup {
* @return string Version
*/
protected function determineImageMagickVersion() {
$version = 'Unknown';

try {
/** @var \ImagickImgTeam\Imagickimg\Xclass\GraphicalFunctions $imageProcessor */
$imageProcessor = $this->initializeImageProcessor();
/** @var \ImagickImgTeam\Imagickimg\Xclass\GraphicalFunctions $imageProcessor */
$imageProcessor = $this->initializeImageProcessor();

$verArr = $imageProcessor->getIMversion(FALSE);
$string = $verArr['versionString'];
$verArr = $imageProcessor->getIMversion(FALSE);
$string = $verArr['versionString'];

list(, $version) = explode('Magick', $string);
list($version) = explode(' ', trim($version));
$version = trim($version);
}
catch(\ImagickException $e) {

GeneralUtility::sysLog(
__METHOD__ . ' >> ' . $e->getMessage(),
$this->extKey,
GeneralUtility::SYSLOG_SEVERITY_ERROR);
}
list(, $version) = explode('Magick', $string);
list($version) = explode(' ', trim($version));

return $version;
return trim($version);
}
}

0 comments on commit 02161ad

Please sign in to comment.