@@ -12,7 +12,6 @@ |
||
12 | 12 | class Composition extends Schema |
13 | 13 | { |
14 | 14 | /** |
15 | - * @param Schema... $schema |
|
16 | 15 | */ |
17 | 16 | public function __construct() |
18 | 17 | { |
@@ -80,6 +80,9 @@ discard block |
||
80 | 80 | private $__propertyToData = array(); |
81 | 81 | |
82 | 82 | |
83 | + /** |
|
84 | + * @param string $dataName |
|
85 | + */ |
|
83 | 86 | public function addPropertyMapping($dataName, $propertyName, $mapping = self::DEFAULT_MAPPING) |
84 | 87 | { |
85 | 88 | $this->__dataToProperty[$mapping][$dataName] = $propertyName; |
@@ -653,6 +656,9 @@ discard block |
||
653 | 656 | return $this; |
654 | 657 | } |
655 | 658 | |
659 | + /** |
|
660 | + * @param string $path |
|
661 | + */ |
|
656 | 662 | private function fail(InvalidValue $exception, $path) |
657 | 663 | { |
658 | 664 | if ($path !== '#') { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Swaggest\JsonSchema\Constraint\Properties; |
6 | 6 | use Swaggest\JsonSchema\Context; |
7 | 7 | use Swaggest\JsonSchema\NameMirror; |
8 | -use Swaggest\JsonSchema\Schema; |
|
9 | 8 | |
10 | 9 | trait ClassStructureTrait |
11 | 10 | { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
107 | - * @return static |
|
107 | + * @return NameMirror|null |
|
108 | 108 | */ |
109 | 109 | public static function names() |
110 | 110 | { |
@@ -115,6 +115,10 @@ discard block |
||
115 | 115 | return $nameflector; |
116 | 116 | } |
117 | 117 | |
118 | + /** |
|
119 | + * @param string $name |
|
120 | + * @param Schema $column |
|
121 | + */ |
|
118 | 122 | public function __set($name, $column) // todo nested schemas |
119 | 123 | { |
120 | 124 | if ($this->__validateOnSet) { |
@@ -31,6 +31,9 @@ |
||
31 | 31 | return $this->__schema; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $name |
|
36 | + */ |
|
34 | 37 | public function __set($name, $column) |
35 | 38 | { |
36 | 39 | if ($column instanceof Nested) { |