@@ -9,25 +9,25 @@ |
||
| 9 | 9 | /** |
| 10 | 10 | * @param null $data |
| 11 | 11 | */ |
| 12 | - public function exception($data=null) |
|
| 12 | + public function exception($data = null) |
|
| 13 | 13 | {
|
| 14 | 14 | //get app path for checking |
| 15 | - $appPath=StaticPathModel::appPath().'/'.$data['project']; |
|
| 15 | + $appPath = StaticPathModel::appPath().'/'.$data['project']; |
|
| 16 | 16 | |
| 17 | 17 | //If there is no project on the url |
| 18 | 18 | //we throw an exception |
| 19 | - if($data['project']===null OR !file_exists($appPath)){
|
|
| 19 | + if ($data['project']===null OR !file_exists($appPath)) {
|
|
| 20 | 20 | throw new \DomainException('No Project');
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | - if(!in_array($data['version'],UrlVersionIdentifier::supportedVersions())){
|
|
| 24 | + if (!in_array($data['version'], UrlVersionIdentifier::supportedVersions())) {
|
|
| 25 | 25 | throw new \DomainException('Version Number is not supported');
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | //If there is no endpoint on the url |
| 29 | 29 | //we throw an exception |
| 30 | - if($data['endpoint']===null){
|
|
| 30 | + if ($data['endpoint']===null) {
|
|
| 31 | 31 | throw new \DomainException('No Endpoint');
|
| 32 | 32 | } |
| 33 | 33 | } |