|
@@ 409-411 (lines=3) @@
|
| 406 |
|
$this->checkError($relation['0'] . ": undefined (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $this->nodes[$relation['2']]['filename'] . ")"); |
| 407 |
|
} else if (class_exists($this->getNamespace() . '\\' . ucwords(camel_case($relation['0'])))) { |
| 408 |
|
$this->checkInfo(studly_case(str_singular($relation['0'])) . ": already defined in Namespace " . $this->getNamespace() . " (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $this->nodes[$relation['2']]['filename'] . ")"); |
| 409 |
|
} else if (class_exists('App\\' . ucwords(camel_case($relation['0'])))) { |
| 410 |
|
$this->checkInfo(studly_case(str_singular($relation['0'])) . ": already defined in Namespace App\\ (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $this->nodes[$relation['2']]['filename'] . ")"); |
| 411 |
|
} |
| 412 |
|
|
| 413 |
|
if ($rType == "pivot" && empty($this->nodes[$relation['1']]) && !class_exists($this->getNamespace() . '\\' . ucwords(camel_case($relation['1']))) && !class_exists('App\\' . ucwords(camel_case($relation['1'])))) { |
| 414 |
|
$this->checkError($relation['1'] . ": undefined (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $this->nodes[$relation['2']]['filename'] . ")"); |
|
@@ 417-419 (lines=3) @@
|
| 414 |
|
$this->checkError($relation['1'] . ": undefined (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $this->nodes[$relation['2']]['filename'] . ")"); |
| 415 |
|
} else if ($rType == "pivot" && class_exists($this->getNamespace() . '\\' . ucwords(camel_case($relation['1'])))) { |
| 416 |
|
$this->checkInfo(studly_case(str_singular($relation['1'])) . ": already defined in Namespace " . $this->getNamespace() . " (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $this->nodes[$relation['2']]['filename'] . ")"); |
| 417 |
|
} else if ($rType == "pivot" && class_exists('App\\' . ucwords(camel_case($relation['1'])))) { |
| 418 |
|
$this->checkInfo(studly_case(str_singular($relation['1'])) . ": already defined in Namespace App\\ (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $this->nodes[$relation['2']]['filename'] . ")"); |
| 419 |
|
} |
| 420 |
|
} |
| 421 |
|
} |
| 422 |
|
} |