@@ -40,10 +40,10 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | protected function getEndpointUrl($path, $withTrailingSlash) |
| 42 | 42 | { |
| 43 | - $url = $this->endpoint . '/' . $path; |
|
| 43 | + $url = $this->endpoint.'/'.$path; |
|
| 44 | 44 | |
| 45 | 45 | if ($withTrailingSlash) { |
| 46 | - $url = $url . '/'; |
|
| 46 | + $url = $url.'/'; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | return $url; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | // which simply lets the developers tweak the attribute as it is set on |
| 62 | 62 | // the model, such as "json_encoding" an listing of data for storage. |
| 63 | 63 | if ($this->hasSetMutator($key)) { |
| 64 | - $method = 'set' . studly_case($key) . 'Attribute'; |
|
| 64 | + $method = 'set'.studly_case($key).'Attribute'; |
|
| 65 | 65 | |
| 66 | 66 | return $this->{$method}($value); |
| 67 | 67 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function hasSetMutator($key) |
| 80 | 80 | { |
| 81 | - return method_exists($this, 'set' . studly_case($key) . 'Attribute'); |
|
| 81 | + return method_exists($this, 'set'.studly_case($key).'Attribute'); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | // First we will check for the presence of a mutator for the set operation |
| 112 | 112 | // which simply lets the developers tweak the attribute as it is set. |
| 113 | 113 | if ($this->hasGetMutator($key)) { |
| 114 | - $method = 'get' . studly_case($key) . 'Attribute'; |
|
| 114 | + $method = 'get'.studly_case($key).'Attribute'; |
|
| 115 | 115 | |
| 116 | 116 | return $this->{$method}($value); |
| 117 | 117 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function hasGetMutator($key) |
| 142 | 142 | { |
| 143 | - return method_exists($this, 'get' . studly_case($key) . 'Attribute'); |
|
| 143 | + return method_exists($this, 'get'.studly_case($key).'Attribute'); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -84,10 +84,10 @@ |
||
| 84 | 84 | public function get($endpoint, $params = []) |
| 85 | 85 | { |
| 86 | 86 | // build url |
| 87 | - $url = $this->domain . '/' . $endpoint; |
|
| 87 | + $url = $this->domain.'/'.$endpoint; |
|
| 88 | 88 | |
| 89 | 89 | if (!empty($params)) { |
| 90 | - $url = $url . '?' . http_build_query($params); |
|
| 90 | + $url = $url.'?'.http_build_query($params); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | $request = new Request($url); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // set paths |
| 33 | 33 | $sep = DIRECTORY_SEPARATOR; |
| 34 | - $this->basePath = __DIR__ . "$sep..$sep..$sep"; |
|
| 34 | + $this->basePath = __DIR__."$sep..$sep..$sep"; |
|
| 35 | 35 | $this->dirs['endpoint'] = "src{$sep}Endpoints"; |
| 36 | 36 | $this->dirs['model'] = "src{$sep}Models"; |
| 37 | 37 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function endpointPath($path = "") |
| 48 | 48 | { |
| 49 | - return $this->basePath . $this->dirs['endpoint'] . DIRECTORY_SEPARATOR . $path; |
|
| 49 | + return $this->basePath.$this->dirs['endpoint'].DIRECTORY_SEPARATOR.$path; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -55,6 +55,6 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function modelPath($path = "") |
| 57 | 57 | { |
| 58 | - return $this->basePath . $this->dirs['model'] . DIRECTORY_SEPARATOR . $path; |
|
| 58 | + return $this->basePath.$this->dirs['model'].DIRECTORY_SEPARATOR.$path; |
|
| 59 | 59 | } |
| 60 | 60 | } |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | protected function configure() |
| 24 | 24 | { |
| 25 | 25 | $this |
| 26 | - ->setName('create:' . $this->type) |
|
| 27 | - ->setDescription('Create a new ' . ucfirst($this->type)) |
|
| 26 | + ->setName('create:'.$this->type) |
|
| 27 | + ->setDescription('Create a new '.ucfirst($this->type)) |
|
| 28 | 28 | ->addArgument( |
| 29 | 29 | 'namespace', |
| 30 | 30 | InputArgument::REQUIRED, |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | ->addArgument( |
| 34 | 34 | 'name', |
| 35 | 35 | InputArgument::REQUIRED, |
| 36 | - 'Name of the ' . ucfirst($this->type) |
|
| 36 | + 'Name of the '.ucfirst($this->type) |
|
| 37 | 37 | ) |
| 38 | 38 | ; |
| 39 | 39 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | // args |
| 49 | 49 | $namespace = str_replace('.', '\\', $input->getArgument('namespace')); |
| 50 | 50 | $name = $input->getArgument('name'); |
| 51 | - $filename = $path . str_plural($name) . '.php'; |
|
| 51 | + $filename = $path.str_plural($name).'.php'; |
|
| 52 | 52 | |
| 53 | 53 | // only write file if path exists and file does not exist yet |
| 54 | 54 | if (file_exists($path) && !file_exists($filename)) { |