@@ -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 !== '#') { |
@@ -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,9 @@ discard block |
||
| 115 | 115 | return $nameflector; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param Schema $column |
|
| 120 | + */ |
|
| 118 | 121 | public function __set($name, $column) // todo nested schemas |
| 119 | 122 | { |
| 120 | 123 | if ($this->__validateOnSet) { |
@@ -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 | { |