| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 10 |
| Ratio | 100 % |
| 1 | <?php |
||
| 13 | View Code Duplication | public function __construct($model, $resource) |
|
| 14 | { |
||
| 15 | if (!($model instanceof Model)) { |
||
| 16 | throw new Exception('Invalid constructor parameter given to DataObject.'); |
||
| 17 | } |
||
| 18 | |||
| 19 | $this->model = $model; |
||
| 20 | $this->resource = $resource; |
||
| 21 | $this->order = array(); |
||
| 22 | } |
||
| 23 | |||
| 48 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.