[TASK] Use fully qualified name resolution in PHP 5.5
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Classes / Controller / Action / Step / DatabaseConnect.php
index d58633a..9037eae 100644 (file)
@@ -36,7 +36,7 @@ class DatabaseConnect extends AbstractStepAction {
                $result = array();
 
                /** @var $configurationManager \TYPO3\CMS\Core\Configuration\ConfigurationManager */
-               $configurationManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+               $configurationManager = $this->objectManager->get(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
 
                $postValues = $this->postValues['values'];
                if (isset($postValues['loadDbal'])) {
@@ -91,7 +91,7 @@ class DatabaseConnect extends AbstractStepAction {
                                        $localConfigurationPathValuePairs['DB/username'] = $value;
                                } else {
                                        /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
-                                       $errorStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                                       $errorStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                        $errorStatus->setTitle('Database username not valid');
                                        $errorStatus->setMessage('Given username must be shorter than fifty characters.');
                                        $result[] = $errorStatus;
@@ -104,7 +104,7 @@ class DatabaseConnect extends AbstractStepAction {
                                        $localConfigurationPathValuePairs['DB/password'] = $value;
                                } else {
                                        /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
-                                       $errorStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                                       $errorStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                        $errorStatus->setTitle('Database password not valid');
                                        $errorStatus->setMessage('Given password must be shorter than fifty characters.');
                                        $result[] = $errorStatus;
@@ -117,7 +117,7 @@ class DatabaseConnect extends AbstractStepAction {
                                        $localConfigurationPathValuePairs['DB/host'] = $value;
                                } else {
                                        /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
-                                       $errorStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                                       $errorStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                        $errorStatus->setTitle('Database host not valid');
                                        $errorStatus->setMessage('Given host is not alphanumeric (a-z, A-Z, 0-9 or _-.:) or longer than fifty characters.');
                                        $result[] = $errorStatus;
@@ -130,7 +130,7 @@ class DatabaseConnect extends AbstractStepAction {
                                        $localConfigurationPathValuePairs['DB/port'] = (int)$value;
                                } else {
                                        /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
-                                       $errorStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                                       $errorStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                        $errorStatus->setTitle('Database port not valid');
                                        $errorStatus->setMessage('Given port is not numeric or within range 1 to 65535.');
                                        $result[] = $errorStatus;
@@ -142,7 +142,7 @@ class DatabaseConnect extends AbstractStepAction {
                                        $localConfigurationPathValuePairs['DB/socket'] = $postValues['socket'];
                                } else {
                                        /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
-                                       $errorStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                                       $errorStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                        $errorStatus->setTitle('Socket does not exist');
                                        $errorStatus->setMessage('Given socket location does not exist on server.');
                                        $result[] = $errorStatus;
@@ -155,7 +155,7 @@ class DatabaseConnect extends AbstractStepAction {
                                        $localConfigurationPathValuePairs['DB/database'] = $value;
                                } else {
                                        /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
-                                       $errorStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                                       $errorStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                        $errorStatus->setTitle('Database name not valid');
                                        $errorStatus->setMessage('Given database name must be shorter than fifty characters.');
                                        $result[] = $errorStatus;
@@ -173,11 +173,11 @@ class DatabaseConnect extends AbstractStepAction {
                                        ->disableCoreAndClassesCache();
                                if ($this->isDbalEnabled()) {
                                        require(ExtensionManagementUtility::extPath('dbal') . 'ext_localconf.php');
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']);
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']);
                                }
                                if (!$this->isConnectSuccessful()) {
                                        /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
-                                       $errorStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                                       $errorStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                        $errorStatus->setTitle('Database connect not successful');
                                        $errorStatus->setMessage('Connecting to the database with given settings failed. Please check.');
                                        $result[] = $errorStatus;
@@ -192,7 +192,7 @@ class DatabaseConnect extends AbstractStepAction {
         * Step needs to be executed if database connection is not successful.
         *
         * @throws \TYPO3\CMS\Install\Controller\Exception\RedirectException
-        * @return boolean
+        * @return bool
         */
        public function needsExecution() {
                if ($this->isConnectSuccessful() && $this->isConfigurationComplete()) {
@@ -244,7 +244,7 @@ class DatabaseConnect extends AbstractStepAction {
        /**
         * Render connect port and label
         *
-        * @return integer Configured or default port
+        * @return int Configured or default port
         */
        protected function getConfiguredOrDefaultPort() {
                $configuredPort = (int)$this->getConfiguredPort();
@@ -277,11 +277,11 @@ class DatabaseConnect extends AbstractStepAction {
        /**
         * Test connection with given credentials
         *
-        * @return boolean TRUE if connect was successful
+        * @return bool TRUE if connect was successful
         */
        protected function isConnectSuccessful() {
                /** @var $databaseConnection \TYPO3\CMS\Core\Database\DatabaseConnection */
-               $databaseConnection = $this->objectManager->get('TYPO3\\CMS\\Core\\Database\\DatabaseConnection');
+               $databaseConnection = $this->objectManager->get(\TYPO3\CMS\Core\Database\DatabaseConnection::class);
                $databaseConnection->initialize();
 
                if ($this->isDbalEnabled()) {
@@ -310,7 +310,7 @@ class DatabaseConnect extends AbstractStepAction {
         * - 'host' is mandatory and must not be empty
         * - 'port' OR 'socket' is mandatory, but may be empty
         *
-        * @return boolean TRUE if host is set
+        * @return bool TRUE if host is set
         */
        protected function isHostConfigured() {
                $hostConfigured = TRUE;
@@ -332,7 +332,7 @@ class DatabaseConnect extends AbstractStepAction {
         * - 'port' OR 'socket' is mandatory, but may be empty
         * - 'username' and 'password' are mandatory, but may be empty
         *
-        * @return boolean TRUE if required settings are present
+        * @return bool TRUE if required settings are present
         */
        protected function isConfigurationComplete() {
                $configurationComplete = $this->isHostConfigured();
@@ -394,7 +394,7 @@ class DatabaseConnect extends AbstractStepAction {
                }
 
                /** @var \TYPO3\CMS\Core\Configuration\ConfigurationManager $configurationManager */
-               $configurationManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+               $configurationManager = $this->objectManager->get(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
                $configurationManager->setLocalConfigurationValuesByPathValuePairs($localConfigurationPathValuePairs);
        }
 
@@ -402,7 +402,7 @@ class DatabaseConnect extends AbstractStepAction {
         * Test if a unix domain socket can be opened. This does not
         * authenticate but only tests if a connect is successful.
         *
-        * @return boolean TRUE on success
+        * @return bool TRUE on success
         */
        protected function isConnectionWithUnixDomainSocketPossible() {
                $result = FALSE;
@@ -561,7 +561,7 @@ class DatabaseConnect extends AbstractStepAction {
                        ExtensionManagementUtility::loadExtension('dbal');
                }
                /** @var $errorStatus \TYPO3\CMS\Install\Status\WarningStatus */
-               $warningStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\WarningStatus');
+               $warningStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\WarningStatus::class);
                $warningStatus->setTitle('Loaded database abstraction layer');
                return $warningStatus;
        }
@@ -580,7 +580,7 @@ class DatabaseConnect extends AbstractStepAction {
                }
                // @TODO: Remove configuration from TYPO3_CONF_VARS['EXTCONF']['dbal']
                /** @var $errorStatus \TYPO3\CMS\Install\Status\WarningStatus */
-               $warningStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\WarningStatus');
+               $warningStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\WarningStatus::class);
                $warningStatus->setTitle('Removed database abstraction layer');
                return $warningStatus;
        }
@@ -622,7 +622,7 @@ class DatabaseConnect extends AbstractStepAction {
        /**
         * Returns configured port. Gets port from host value if port is not yet set.
         *
-        * @return integer
+        * @return int
         */
        protected function getConfiguredPort() {
                $host = isset($GLOBALS['TYPO3_CONF_VARS']['DB']['host']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['host'] : '';