[TASK] Add type hints and fix PHPDoc in extbase DataMapFactory 48/53048/2
authorStephan Großberndt <stephan@grossberndt.de>
Wed, 24 May 2017 13:56:34 +0000 (15:56 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 3 Jun 2017 08:14:15 +0000 (10:14 +0200)
While this is technically a breaking change it only affects internal API.

Releases: master, 8.7
Resolves: #81336
Change-Id: I700caafcfe7f889bba90c03ae7f7010d8228c64a
Reviewed-on: https://review.typo3.org/53048
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php

index 4a9d25a..4113824 100644 (file)
@@ -317,7 +317,7 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface
      * the $TCA column configuration
      *
      * @param ColumnMap $columnMap The column map
-     * @param string $columnConfiguration The column configuration from $TCA
+     * @param NULL|array $columnConfiguration The column configuration from $TCA
      * @param array $propertyMetaData The property metadata as delivered by the reflection service
      * @return ColumnMap
      */
@@ -367,10 +367,10 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface
      * the $TCA column configuration
      *
      * @param ColumnMap $columnMap The column map
-     * @param string $columnConfiguration The column configuration from $TCA
+     * @param NULL|array $columnConfiguration The column configuration from $TCA
      * @return ColumnMap
      */
-    protected function setOneToOneRelation(ColumnMap $columnMap, $columnConfiguration)
+    protected function setOneToOneRelation(ColumnMap $columnMap, array $columnConfiguration = null)
     {
         $columnMap->setTypeOfRelation(ColumnMap::RELATION_HAS_ONE);
         $columnMap->setChildTableName($columnConfiguration['foreign_table']);
@@ -389,10 +389,10 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface
      * the $TCA column configuration
      *
      * @param ColumnMap $columnMap The column map
-     * @param string $columnConfiguration The column configuration from $TCA
+     * @param NULL|array $columnConfiguration The column configuration from $TCA
      * @return ColumnMap
      */
-    protected function setOneToManyRelation(ColumnMap $columnMap, $columnConfiguration)
+    protected function setOneToManyRelation(ColumnMap $columnMap, array $columnConfiguration = null)
     {
         $columnMap->setTypeOfRelation(ColumnMap::RELATION_HAS_MANY);
         $columnMap->setChildTableName($columnConfiguration['foreign_table']);
@@ -411,11 +411,11 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface
      * the $TCA column configuration
      *
      * @param ColumnMap $columnMap The column map
-     * @param string $columnConfiguration The column configuration from $TCA
+     * @param NULL|array $columnConfiguration The column configuration from $TCA
      * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\UnsupportedRelationException
      * @return ColumnMap
      */
-    protected function setManyToManyRelation(ColumnMap $columnMap, $columnConfiguration)
+    protected function setManyToManyRelation(ColumnMap $columnMap, array $columnConfiguration = null)
     {
         if (isset($columnConfiguration['MM'])) {
             $columnMap->setTypeOfRelation(ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY);