| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function __construct($namespaceName = "Data", $containerName = "DefaultContainer") |
||
| 15 | { |
||
| 16 | $this->V3Edmx = new Edmx($namespaceName, $containerName); |
||
| 17 | if (!$this->V3Edmx->isOK($msg)) { |
||
| 18 | throw new \Exception($msg); |
||
| 19 | } |
||
| 20 | $ymlDir = dirname(__DIR__) . DIRECTORY_SEPARATOR . "MetadataV3" . DIRECTORY_SEPARATOR . "JMSmetadata"; |
||
| 21 | $this->serializer = |
||
| 22 | \JMS\Serializer\SerializerBuilder::create() |
||
| 23 | ->addMetadataDir($ymlDir) |
||
| 24 | ->build(); |
||
| 25 | } |
||
| 26 | |||
| 49 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: