Commit 39993e74 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Stefan Neufeind
Browse files

[CLEANUP] Adjust code to coding guidelines

* whitespaces, tabs and blank line issues
* bool -> boolean
* int -> integer
* remove @scope and @entity

Fixes: #43146
Releases: 6.0
Change-Id: I0ffdde3c918920272e8b1e4d1eab199b7b3e90f3
Reviewed-on: http://review.typo3.org/16600
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
parent 6133535e
......@@ -228,8 +228,6 @@ class HelpCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandCon
$this->commandsByExtensionsAndControllers[$extensionKey][$commandControllerClassName][$commandName] = $command;
}
}
}
?>
\ No newline at end of file
......@@ -35,6 +35,7 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
* Default backend storage PID
*/
const DEFAULT_BACKEND_STORAGE_PID = 0;
/**
* Storage of the raw TypoScript configuration
*
......@@ -259,7 +260,7 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
* @param string $pluginName in FE mode this is the specified plugin name, in BE mode this is the full module signature
* @return array
*/
abstract protected function getPluginConfiguration($extensionName, $pluginName);
abstract protected function getPluginConfiguration($extensionName, $pluginName = NULL);
/**
* Returns the configured controller/action pairs of the specified plugin/module in the format
......@@ -273,8 +274,6 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
* @return array
*/
abstract protected function getSwitchableControllerActions($extensionName, $pluginName);
}
?>
\ No newline at end of file
......@@ -114,7 +114,7 @@ class BackendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abstr
* @return integer current page id. If no page is selected current root page id is returned
*/
protected function getCurrentPageId() {
$pageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
$pageId = (integer) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
if ($pageId > 0) {
return $pageId;
}
......@@ -158,8 +158,6 @@ class BackendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abstr
}
return $frameworkConfiguration;
}
}
?>
\ No newline at end of file
......@@ -109,15 +109,15 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
*/
public function getConfiguration($configurationType, $extensionName = NULL, $pluginName = NULL) {
switch ($configurationType) {
case self::CONFIGURATION_TYPE_SETTINGS:
$configuration = $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
return $configuration['settings'];
case self::CONFIGURATION_TYPE_FRAMEWORK:
return $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
case self::CONFIGURATION_TYPE_FULL_TYPOSCRIPT:
return $this->concreteConfigurationManager->getTypoScriptSetup();
default:
throw new \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException('Invalid configuration type "' . $configurationType . '"', 1206031879);
case self::CONFIGURATION_TYPE_SETTINGS:
$configuration = $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
return $configuration['settings'];
case self::CONFIGURATION_TYPE_FRAMEWORK:
return $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
case self::CONFIGURATION_TYPE_FULL_TYPOSCRIPT:
return $this->concreteConfigurationManager->getTypoScriptSetup();
default:
throw new \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException('Invalid configuration type "' . $configurationType . '"', 1206031879);
}
}
......@@ -133,10 +133,8 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
*/
public function isFeatureEnabled($featureName) {
$configuration = $this->getConfiguration(self::CONFIGURATION_TYPE_FRAMEWORK);
return (bool) (isset($configuration['features'][$featureName]) && $configuration['features'][$featureName]);
return (boolean) (isset($configuration['features'][$featureName]) && $configuration['features'][$featureName]);
}
}
?>
\ No newline at end of file
......@@ -26,11 +26,12 @@ namespace TYPO3\CMS\Extbase\Configuration;
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
interface ConfigurationManagerInterface extends \TYPO3\CMS\Core\SingletonInterface
{
interface ConfigurationManagerInterface extends \TYPO3\CMS\Core\SingletonInterface {
const CONFIGURATION_TYPE_FRAMEWORK = 'Framework';
const CONFIGURATION_TYPE_SETTINGS = 'Settings';
const CONFIGURATION_TYPE_FULL_TYPOSCRIPT = 'FullTypoScript';
/**
* @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject
* @return void
......@@ -78,7 +79,6 @@ interface ConfigurationManagerInterface extends \TYPO3\CMS\Core\SingletonInterfa
* @return boolean
*/
public function isFeatureEnabled($featureName);
}
?>
\ No newline at end of file
......@@ -32,8 +32,6 @@ namespace TYPO3\CMS\Extbase\Configuration\Exception;
*/
class ContainerIsLockedException extends \TYPO3\CMS\Extbase\Configuration\Exception {
}
?>
\ No newline at end of file
......@@ -32,8 +32,6 @@ namespace TYPO3\CMS\Extbase\Configuration\Exception;
*/
class InvalidConfigurationTypeException extends \TYPO3\CMS\Extbase\Configuration\Exception {
}
?>
\ No newline at end of file
......@@ -32,8 +32,6 @@ namespace TYPO3\CMS\Extbase\Configuration\Exception;
*/
class NoSuchFileException extends \TYPO3\CMS\Extbase\Configuration\Exception {
}
?>
\ No newline at end of file
......@@ -32,8 +32,6 @@ namespace TYPO3\CMS\Extbase\Configuration\Exception;
*/
class NoSuchOptionException extends \TYPO3\CMS\Extbase\Configuration\Exception {
}
?>
\ No newline at end of file
......@@ -32,8 +32,6 @@ namespace TYPO3\CMS\Extbase\Configuration\Exception;
*/
class ParseErrorException extends \TYPO3\CMS\Extbase\Configuration\Exception {
}
?>
\ No newline at end of file
......@@ -221,8 +221,6 @@ class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abst
}
return $frameworkConfiguration;
}
}
?>
\ No newline at end of file
......@@ -270,7 +270,7 @@ class Bootstrap implements \TYPO3\CMS\Extbase\Core\BootstrapInterface {
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id')) {
// Check page access
$permClause = $GLOBALS['BE_USER']->getPagePermsClause(TRUE);
$access = is_array(\TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess((int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'), $permClause));
$access = is_array(\TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess((integer) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'), $permClause));
if (!$access) {
throw new \RuntimeException('You don\'t have access to this page', 1289917924);
}
......@@ -290,8 +290,6 @@ class Bootstrap implements \TYPO3\CMS\Extbase\Core\BootstrapInterface {
print $content;
return TRUE;
}
}
?>
\ No newline at end of file
......@@ -30,8 +30,8 @@ namespace TYPO3\CMS\Extbase\Core;
/**
* Bootstrap Interface
*/
interface BootstrapInterface
{
interface BootstrapInterface {
/**
* Runs the the Extbase Framework by resolving an appropriate Request Handler and passing control to it.
* If the Framework is not initialized yet, it will be initialized.
......@@ -52,7 +52,6 @@ interface BootstrapInterface
* @see run()
*/
public function callModule($moduleSignature);
}
?>
\ No newline at end of file
......@@ -26,8 +26,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
/**
* A file object (File Abstraction Layer)
*
* @scope prototype
* @entity
* @api experimental! This class is experimental and subject to change!
*/
abstract class AbstractFileCollection extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
......@@ -50,8 +48,6 @@ abstract class AbstractFileCollection extends \TYPO3\CMS\Extbase\DomainObject\Ab
public function getObject() {
return $this->object;
}
}
?>
\ No newline at end of file
......@@ -26,8 +26,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
/**
* A file object (File Abstraction Layer)
*
* @scope prototype
* @entity
* @api experimental! This class is experimental and subject to change!
*/
abstract class AbstractFileFolder extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
......@@ -50,8 +48,6 @@ abstract class AbstractFileFolder extends \TYPO3\CMS\Extbase\DomainObject\Abstra
public function getObject() {
return $this->object;
}
}
?>
\ No newline at end of file
......@@ -30,8 +30,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
*
* @author Felix Kopp <felix-source@phorax.com>
* @author Oliver Klee <typo3-coding@oliverklee.de>
* @scope prototype
* @entity
* @api
*/
class BackendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
......@@ -288,8 +286,6 @@ class BackendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
public function setLastLoginDateAndTime(\DateTime $dateAndTime = NULL) {
$this->lastLoginDateAndTime = $dateAndTime;
}
}
?>
\ No newline at end of file
......@@ -29,8 +29,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
* This model represents a backend usergroup.
*
* @author Markus Günther <mail@markus-guenther.de>
* @scope prototype
* @entity
* @api
*/
class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
......@@ -40,6 +38,7 @@ class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
const DIRECTORY_OPPERATIONS = 4;
const DIRECTORY_COPY = 8;
const DIRECTORY_REMOVE_RECURSIVELY = 16;
/**
* @var string
* @validate notEmpty
......@@ -581,8 +580,6 @@ class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
$this->fileOperationPermissions &= ~$permission;
}
}
}
?>
\ No newline at end of file
......@@ -27,8 +27,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
* This model represents a category (for anything).
*
* @author Fabien Udriot <fabien.udriot@typo3.org>
* @scope prototype
* @entity
* @api
*/
class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
......@@ -181,8 +179,6 @@ class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
public function removeItem(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity $item) {
$this->items->detach($item);
}
}
?>
\ No newline at end of file
......@@ -26,14 +26,10 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
/**
* A file object (File Abstraction Layer)
*
* @scope prototype
* @entity
* @api experimental! This class is experimental and subject to change!
*/
class File extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder {
}
?>
\ No newline at end of file
......@@ -29,8 +29,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
* This model represents a file mount.
*
* @author Markus Günther <mail@markus-guenther.de>
* @scope prototype
* @entity
* @api
*/
class FileMount extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
......@@ -118,8 +116,6 @@ class FileMount extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
public function setIsAbsolutePath($value) {
$this->isAbsolutePath = $value;
}
}
?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment