@@ -31,7 +31,7 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * Supply a custom instantiation function for the destination type |
| 33 | 33 | * |
| 34 | - * @param ObjectCreatorInterface|\Closure $objectCreator Callback to create the destination type given the source object |
|
| 34 | + * @param \Closure $objectCreator Callback to create the destination type given the source object |
|
| 35 | 35 | * @throws PapperConfigurationException |
| 36 | 36 | * @return MappingFluentSyntax |
| 37 | 37 | */ |
@@ -11,6 +11,9 @@ |
||
| 11 | 11 | private $propertyPathAsString; |
| 12 | 12 | private $propertyPath; |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param string $propertyPathAsString |
|
| 16 | + */ |
|
| 14 | 17 | public function __construct($propertyPathAsString) |
| 15 | 18 | { |
| 16 | 19 | $this->propertyPathAsString = $propertyPathAsString; |
@@ -11,6 +11,9 @@ |
||
| 11 | 11 | private $propertyPathAsString; |
| 12 | 12 | private $propertyPath; |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param string $propertyPathAsString |
|
| 16 | + */ |
|
| 14 | 17 | public function __construct($propertyPathAsString) |
| 15 | 18 | { |
| 16 | 19 | $this->propertyPathAsString = $propertyPathAsString; |
@@ -6,6 +6,9 @@ |
||
| 6 | 6 | |
| 7 | 7 | class StdClassPropertySetter implements MemberSetterInterface |
| 8 | 8 | { |
| 9 | + /** |
|
| 10 | + * @param string $propertyName |
|
| 11 | + */ |
|
| 9 | 12 | public function __construct($propertyName) |
| 10 | 13 | { |
| 11 | 14 | $this->propertyName = $propertyName; |
@@ -91,6 +91,9 @@ discard block |
||
| 91 | 91 | return null; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $classDefinition |
|
| 96 | + */ |
|
| 94 | 97 | private function parseClass($classDefinition) |
| 95 | 98 | { |
| 96 | 99 | return (false !== $pos = strpos($classDefinition, "\\")) |
@@ -98,6 +101,9 @@ discard block |
||
| 98 | 101 | : array('', $classDefinition); |
| 99 | 102 | } |
| 100 | 103 | |
| 104 | + /** |
|
| 105 | + * @param string $type |
|
| 106 | + */ |
|
| 101 | 107 | private function isIgnoredType($type) |
| 102 | 108 | { |
| 103 | 109 | return in_array($type, self::$ignoredTypes); |
@@ -11,5 +11,8 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function getName(); |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @return void |
|
| 16 | + */ |
|
| 14 | 17 | public function setValue($object, $value); |
| 15 | 18 | } |
@@ -28,6 +28,10 @@ discard block |
||
| 28 | 28 | $this->annotationTypeReader = new AnnotationTypeReader(); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param string $sourceType |
|
| 33 | + * @param string $destinationType |
|
| 34 | + */ |
|
| 31 | 35 | public function createTypeMap($sourceType, $destinationType, MappingOptionsInterface $mappingOptions) |
| 32 | 36 | { |
| 33 | 37 | $sourceReflector = $this->findReflector($sourceType); |
@@ -106,6 +110,9 @@ discard block |
||
| 106 | 110 | return $foundMatch; |
| 107 | 111 | } |
| 108 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string $nameToSearch |
|
| 115 | + */ |
|
| 109 | 116 | private function findTypeMember(array $properties, array $getMethods, $nameToSearch, MappingOptionsInterface $mappingOptions) |
| 110 | 117 | { |
| 111 | 118 | /** @var $member \ReflectionProperty|\ReflectionMethod */ |
@@ -127,12 +134,18 @@ discard block |
||
| 127 | 134 | })) > 0; |
| 128 | 135 | } |
| 129 | 136 | |
| 137 | + /** |
|
| 138 | + * @param string $nameToSearch |
|
| 139 | + */ |
|
| 130 | 140 | private function splitDestinationMemberName($nameToSearch, MappingOptionsInterface $mappingOptions) |
| 131 | 141 | { |
| 132 | 142 | preg_match_all($mappingOptions->getDestinationMemberNamingConvention()->getSplittingExpression(), $nameToSearch, $matches); |
| 133 | 143 | return isset($matches[0]) ? $matches[0] : array(); |
| 134 | 144 | } |
| 135 | 145 | |
| 146 | + /** |
|
| 147 | + * @param integer $i |
|
| 148 | + */ |
|
| 136 | 149 | private function createNameSnippet(array $matches, $i, MappingOptionsInterface $mappingOptions) |
| 137 | 150 | { |
| 138 | 151 | return array( |
@@ -4,5 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface MappingConfigurationInterface |
| 6 | 6 | { |
| 7 | + /** |
|
| 8 | + * @return void |
|
| 9 | + */ |
|
| 7 | 10 | public function configure(MappingConfigurationContext $context); |
| 8 | 11 | } |
@@ -49,6 +49,9 @@ |
||
| 49 | 49 | $this->sourceType = $sourceType; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string|null $destinationType |
|
| 54 | + */ |
|
| 52 | 55 | public function setDestination($destination, $destinationType) |
| 53 | 56 | { |
| 54 | 57 | if ($destination !== null && is_array($this->source)) { |