Commit b5eb99ab authored by Oliver Klee's avatar Oliver Klee Committed by Christian Kuhn
Browse files

[CLEANUP] Improve the @param/@return/@var PHPDoc

* use "resource" or MySQL result instead of "pointer"
* use the specific class instead of "object"
* drop the @param of some removed parameters
* fix a few typos in comments
* add the missing parameter name in some @param

This changeset does not add any type hinting in order to
not break any existing code.

Resolves: #38270
Releases: master
Change-Id: Ied64439162d45fccafd15694f56ce675b5001a71
Reviewed-on: http://review.typo3.org/35885


Reviewed-by: Philipp Gampe's avatarPhilipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 378fa5ae
......@@ -392,7 +392,7 @@ class ColorpickerController extends AbstractWizardController {
* Gets the HTML (Hex) Color Code for the selected pixel of an image
* This method handles the correct imageResource no matter what format
*
* @param pointer $im Valid ImageResource returned by \TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageCreateFromFile
* @param resource $im Valid ImageResource returned by \TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageCreateFromFile
* @param int $x X-Coordinate of the pixel that should be checked
* @param int $y Y-Coordinate of the pixel that should be checked
* @return string HEX RGB value for color
......
......@@ -112,13 +112,13 @@ abstract class AbstractFunctionModule {
* Contains a reference to the parent (calling) object (which is probably an instance of
* an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass
*
* @var \TYPO3\CMS\Backend\Module\BaseScriptClass
* @var BaseScriptClass
* @see init()
*/
public $pObj;
/**
* @var object
* @var BaseScriptClass
*/
public $extObj = NULL;
......
......@@ -185,7 +185,7 @@ class BaseScriptClass {
* May contain an instance of a 'Function menu module' which connects to this backend module.
*
* @see checkExtObj()
* @var object
* @var AbstractFunctionModule
*/
public $extObj;
......
......@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Backend\Rte;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Form\Element\TextElement;
use TYPO3\CMS\Backend\Template\DocumentTemplate;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......@@ -60,7 +62,7 @@ class AbstractRte {
* Draws the RTE as a form field or whatever is needed (inserts JavaApplet, creates iframe, renders ....)
* Default is to output the transformed content in a plain textarea field. This mode is great for debugging transformations!
*
* @param object $pObj Reference to parent object, which is an instance of the TCEforms.
* @param object $pObj parent object
* @param string $table The table name
* @param string $field The field name
* @param array $row The current row from which field is being rendered
......
......@@ -507,7 +507,7 @@ class IconUtility {
/**
* Write the icon in $im pointer to $path
*
* @param pointer $im Pointer to GDlib image resource
* @param resource $im Pointer to GDlib image resource
* @param string $path Absolute path to the filename in which to write the icon.
* @return void
* @access private
......
......@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Compatibility6\Controller;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Module\BaseScriptClass;
/**
* The Wizard function in the Web>Info module
* Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
......@@ -31,7 +33,7 @@ class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\Abstrac
* Initialize.
* Calls parent init function and then the handleExternalFunctionValue() function from the parent class
*
* @param object $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass)
* @param BaseScriptClass $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass)
* @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
* @return void
*/
......
......@@ -92,7 +92,7 @@ class FlexFormTools {
* @param string $table The table name of the record
* @param string $field The field name of the flexform field to work on
* @param array $row The record data array
* @param object $callBackObj Object (passed by reference) in which the call back function is located
* @param object $callBackObj Object in which the call back function is located
* @param string $callBackMethod_value Method name of call back function in object for values
* @return bool|string If TRUE, error happened (error string returned)
*/
......@@ -307,7 +307,7 @@ class FlexFormTools {
* @param mixed $data Current value
* @param array $PA Additional configuration used in calling function
* @param string $path Path of value in DS structure
* @param object $pObj Object reference to caller
* @param FlexFormTools $pObj caller
* @return void
*/
public function cleanFlexFormXML_callBackFunction($dsArr, $data, $PA, $path, $pObj) {
......
......@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Core\DataHandling;
*/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Database\DatabaseConnection;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -649,7 +650,7 @@ class DataHandler {
*
* @param array $data Data to be modified or inserted in the database
* @param array $cmd Commands to copy, move, delete, localize, versionize records.
* @param object $altUserObject An alternative userobject you can set instead of the default, which is $GLOBALS['BE_USER']
* @param BackendUserAuthentication|string $altUserObject An alternative userobject you can set instead of the default, which is $GLOBALS['BE_USER']
* @return void
*/
public function start($data, $cmd, $altUserObject = '') {
......@@ -795,7 +796,7 @@ class DataHandler {
* Note: When using the hook after INSERT operations, you will only get the temporary NEW... id passed to your hook as $id,
* but you can easily translate it to the real uid of the inserted record using the $this->substNEWwithIDs array.
*
* @param object $hookObjectsArr (reference) Array with hook objects
* @param array $hookObjectsArr (reference) hook objects
* @param string $status (reference) Status of the current operation, 'new' or 'update
* @param string $table (reference) The table currently processing data for
* @param string $id (reference) The record uid currently processing data for, [integer] or [string] (like 'NEW...')
......
......@@ -111,10 +111,10 @@ class ExtDirectRouter {
* array "$GLOBALS['TYPO3_CONF_VARS']['BE']['ExtDirect']" is taken to find the class/method
* information.
*
* @param object $singleRequest request object from extJS
* @param \stdClass $singleRequest request object from extJS
* @param string $namespace namespace like TYPO3.Backend
* @return mixed return value of the called method
* @throws UnexpectedValueException if the remote method couldn't be found
* @throws \UnexpectedValueException if the remote method couldn't be found
*/
protected function processRpc($singleRequest, $namespace) {
$endpointName = $namespace . '.' . $singleRequest->action;
......
......@@ -390,7 +390,7 @@ class GraphicalFunctions {
* It reads the two images defined by $conf['file'] and $conf['mask'] and copies the $conf['file'] onto the input image pointer image using the $conf['mask'] as a grayscale mask
* The operation involves ImageMagick for combining.
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @return void
......@@ -476,7 +476,7 @@ class GraphicalFunctions {
/**
* Implements the "IMAGE" GIFBUILDER object, when the "mask" property is FALSE (using only $conf['file'])
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @return void
......@@ -497,8 +497,8 @@ class GraphicalFunctions {
/**
* Copies two GDlib image pointers onto each other, using TypoScript configuration from $conf and the input $workArea definition.
*
* @param pointer $im GDlib image pointer, destination (bottom image)
* @param pointer $cpImg GDlib image pointer, source (top image)
* @param resource $im GDlib image pointer, destination (bottom image)
* @param resource $cpImg GDlib image pointer, source (top image)
* @param array $conf TypoScript array with the properties for the IMAGE GIFBUILDER object. Only used for the "tile" property value.
* @param array $workArea Work area
* @return void Works on the $im image pointer
......@@ -607,7 +607,7 @@ class GraphicalFunctions {
/**
* Implements the "TEXT" GIFBUILDER object
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @return void
......@@ -882,7 +882,7 @@ class GraphicalFunctions {
* Spacing is done by printing one char at a time and this means that the spacing is rather uneven and probably not very nice.
* See
*
* @param pointer $im (See argument for PHP function imageTTFtext())
* @param resource $im (See argument for PHP function imageTTFtext())
* @param int $fontSize (See argument for PHP function imageTTFtext())
* @param int $angle (See argument for PHP function imageTTFtext())
* @param int $x (See argument for PHP function imageTTFtext())
......@@ -1010,7 +1010,7 @@ class GraphicalFunctions {
/**
* Wrapper for ImageTTFText
*
* @param pointer $im (See argument for PHP function imageTTFtext())
* @param resource $im (See argument for PHP function imageTTFtext())
* @param int $fontSize (See argument for PHP function imageTTFtext())
* @param int $angle (See argument for PHP function imageTTFtext())
* @param int $x (See argument for PHP function imageTTFtext())
......@@ -1231,7 +1231,7 @@ class GraphicalFunctions {
/**
* Renders a regular text and takes care of a possible line break automatically.
*
* @param pointer $im (See argument for PHP function imageTTFtext())
* @param resource $im (See argument for PHP function imageTTFtext())
* @param int $fontSize (See argument for PHP function imageTTFtext())
* @param int $angle (See argument for PHP function imageTTFtext())
* @param int $x (See argument for PHP function imageTTFtext())
......@@ -1339,7 +1339,7 @@ class GraphicalFunctions {
/**
* Implements the "OUTLINE" GIFBUILDER object / property for the TEXT object
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @param array $txtConf TypoScript array with configuration for the associated TEXT GIFBUILDER object.
......@@ -1396,7 +1396,7 @@ class GraphicalFunctions {
/**
* Implements the "EMBOSS" GIFBUILDER object / property for the TEXT object
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @param array $txtConf TypoScript array with configuration for the associated TEXT GIFBUILDER object.
......@@ -1418,11 +1418,11 @@ class GraphicalFunctions {
* Implements the "SHADOW" GIFBUILDER object / property for the TEXT object
* The operation involves ImageMagick for combining.
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @param array $txtConf TypoScript array with configuration for the associated TEXT GIFBUILDER object.
* @retur void
* @return void
* @see \TYPO3\CMS\Frontend\Imaging\GifBuilder::make(), makeText(), makeEmboss()
*/
public function makeShadow(&$im, $conf, $workArea, $txtConf) {
......@@ -1533,7 +1533,7 @@ class GraphicalFunctions {
/**
* Implements the "BOX" GIFBUILDER object
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @return void
......@@ -1572,7 +1572,7 @@ class GraphicalFunctions {
* $workArea = X,Y
* $conf['dimensions'] = offset x, offset y, width of ellipse, height of ellipse
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @param array $workArea The current working area coordinates.
* @return void
......@@ -1593,7 +1593,7 @@ class GraphicalFunctions {
* Implements the "EFFECT" GIFBUILDER object
* The operation involves ImageMagick for applying effects
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @return void
* @see \TYPO3\CMS\Frontend\Imaging\GifBuilder::make(), applyImageMagickToPHPGif()
......@@ -1693,7 +1693,7 @@ class GraphicalFunctions {
/**
* Implements the "ADJUST" GIFBUILDER object
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @return void
* @see \TYPO3\CMS\Frontend\Imaging\GifBuilder::make(), autoLevels(), outputLevels(), inputLevels()
......@@ -1728,7 +1728,7 @@ class GraphicalFunctions {
/**
* Implements the "CROP" GIFBUILDER object
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @return void
* @see \TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
......@@ -1766,7 +1766,7 @@ class GraphicalFunctions {
/**
* Implements the "SCALE" GIFBUILDER object
*
* @param pointer $im GDlib image pointer
* @param resource $im GDlib image pointer
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
* @return void
* @see \TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
......@@ -2673,7 +2673,7 @@ class GraphicalFunctions {
/**
* Applies an ImageMagick parameter to a GDlib image pointer resource by writing the resource to file, performing an IM operation upon it and reading back the result into the ImagePointer.
*
* @param pointer $im The image pointer (reference)
* @param resource $im The image pointer (reference)
* @param string $command The ImageMagick parameters. Like effects, scaling etc.
* @return void
*/
......@@ -2784,7 +2784,7 @@ class GraphicalFunctions {
/**
* Writes the input GDlib image pointer to file
*
* @param pointer $destImg The GDlib image resource pointer
* @param resource $destImg The GDlib image resource pointer
* @param string $theImage The filename to write to
* @param int $quality The image quality (for JPEGs)
* @return bool The output of either imageGif, imagePng or imageJpeg based on the filename to write
......@@ -2828,7 +2828,7 @@ class GraphicalFunctions {
* If it fails creating a image from the input file a blank gray image with the dimensions of the input image will be created instead.
*
* @param string $sourceImg Image filename
* @return pointer Image Resource pointer
* @return resource Image Resource pointer
*/
public function imageCreateFromFile($sourceImg) {
$imgInf = pathinfo($sourceImg);
......@@ -2889,7 +2889,7 @@ class GraphicalFunctions {
/**
* Unifies all colors given in the colArr color array to the first color in the array.
*
* @param pointer $img Image resource
* @param resource $img Image resource
* @param array $colArr Array containing RGB color arrays
* @param bool $closest
* @return int The index of the unified color
......
......@@ -250,7 +250,7 @@ abstract class AbstractRepository implements \TYPO3\CMS\Extbase\Persistence\Repo
* Finds an object matching the given identifier.
*
* @param mixed $identifier The identifier of the object to find
* @return object The matching object if found, otherwise NULL
* @return object|NULL The matching object if found, otherwise NULL
* @api
*/
public function findByIdentifier($identifier) {
......
......@@ -4618,7 +4618,7 @@ Connection: close
* @param string $serviceType Type of service (service key).
* @param string $serviceSubType Sub type like file extensions or similar. Defined by the service.
* @param mixed $excludeServiceKeys List of service keys which should be excluded in the search for a service. Array or comma list.
* @return object The service object or an array with error info's.
* @return object|string[] The service object or an array with error infos.
*/
static public function makeInstanceService($serviceType, $serviceSubType = '', $excludeServiceKeys = array()) {
$error = FALSE;
......
......@@ -240,7 +240,7 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase {
*
* @param object $target The instance which needs the dependency
* @param string $name Name of the property to be injected
* @param object $dependency The dependency to inject – usually an object but can also be any other type
* @param mixed $dependency The dependency to inject – usually an object but can also be any other type
* @return void
* @throws \RuntimeException
* @throws \InvalidArgumentException
......
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Core\Tests\Unit\Utility;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Package\PackageManager;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -112,7 +113,7 @@ class ExtensionManagementUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
/**
* @param string $packageKey
* @param array $packageMethods
* @return object
* @return PackageManager|\PHPUnit_Framework_MockObject_MockObject
*/
protected function createMockPackageManagerWithMockPackage($packageKey, $packageMethods = array('getPackagePath', 'getPackageKey')) {
$packagePath = PATH_site . 'typo3temp/' . $packageKey . '/';
......
......@@ -1257,7 +1257,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
* Returns an object reference to the hook object if any
*
* @param string $functionName Name of the function you want to call / hook key
* @return object Hook object, if any. Otherwise NULL.
* @return object|NULL Hook object, if any. Otherwise NULL.
*/
public function hookRequest($functionName) {
// Hook: menuConfig_preProcessModMenu
......
......@@ -66,7 +66,7 @@ class Argument {
/**
* Actual value of this argument
*
* @var object
* @var mixed
*/
protected $value = NULL;
......@@ -251,7 +251,7 @@ class Argument {
/**
* Returns the value of this argument
*
* @return object The value of this argument - if none was set, NULL is returned
* @return mixed The value of this argument - if none was set, NULL is returned
* @api
*/
public function getValue() {
......
......@@ -50,7 +50,7 @@ abstract class AbstractView implements \TYPO3\CMS\Extbase\Mvc\View\ViewInterface
* Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
*
* @param string $key Key of variable
* @param object $value Value of object
* @param mixed $value Value of object
* @return \TYPO3\CMS\Extbase\Mvc\View\AbstractView an instance of $this, to enable chaining
* @api
*/
......
......@@ -205,7 +205,7 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
* backend. Otherwise NULL is returned.
*
* @param object $object
* @return string The identifier for the object if it is known, or NULL
* @return string|NULL The identifier for the object if it is known, or NULL
*/
public function getIdentifierByObject($object) {
if ($object instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
......@@ -223,7 +223,7 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
*
* @param string $identifier
* @param string $className
* @return object The object for the identifier if it is known, or NULL
* @return object|NULL The object for the identifier if it is known, or NULL
*/
public function getObjectByIdentifier($identifier, $className) {
if ($this->session->hasIdentifier($identifier, $className)) {
......
......@@ -66,7 +66,7 @@ interface BackendInterface {
* backend. Otherwise NULL is returned.
*
* @param object $object
* @return string The identifier for the object if it is known, or NULL
* @return string|NULL The identifier for the object if it is known, or NULL
*/
public function getIdentifierByObject($object);
......@@ -76,7 +76,7 @@ interface BackendInterface {
*
* @param string $identifier
* @param string $className
* @return object The object for the identifier if it is known, or NULL
* @return object|NULL The object for the identifier if it is known, or NULL
*/
public function getObjectByIdentifier($identifier, $className);
......
......@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Extbase\Persistence\Generic;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface;
/**
* A proxy that can replace any object and replaces itself in it's parent on
* first access (call, get, set, isset, unset).
......@@ -29,7 +31,7 @@ class LazyLoadingProxy implements \Iterator, \TYPO3\CMS\Extbase\Persistence\Gene
/**
* The object this property is contained in.
*
* @var \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface
* @var DomainObjectInterface
*/
private $parentObject;
......@@ -50,7 +52,7 @@ class LazyLoadingProxy implements \Iterator, \TYPO3\CMS\Extbase\Persistence\Gene
/**
* Constructs this proxy instance.
*
* @param object $parentObject The object instance this proxy is part of
* @param DomainObjectInterface $parentObject The object instance this proxy is part of
* @param string $propertyName The name of the proxied property in it's parent
* @param mixed $fieldValue The raw field value.
*/
......@@ -68,7 +70,7 @@ class LazyLoadingProxy implements \Iterator, \TYPO3\CMS\Extbase\Persistence\Gene
public function _loadRealInstance() {
// this check safeguards against a proxy being activated multiple times
// usually that does not happen, but if the proxy is held from outside
// it's parent... the result would be weird.
// its parent ... the result would be weird.
if ($this->parentObject->_getProperty($this->propertyName) instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
$objects = $this->dataMapper->fetchRelated($this->parentObject, $this->propertyName, $this->fieldValue, FALSE, FALSE);
$propertyValue = $this->dataMapper->mapResultToPropertyValue($this->parentObject, $this->propertyName, $objects);
......
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