@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | $matches = []; |
24 | 24 | preg_match('/^get([A-Z][a-z]+)((Full)?[A-Z][a-z]+)$/', $name, $matches); |
25 | 25 | if (empty($matches)) { |
26 | - throw new \Exception('Unsupported method: ' . $name); |
|
26 | + throw new \Exception('Unsupported method: '.$name); |
|
27 | 27 | } |
28 | 28 | $category = $matches[1]; |
29 | 29 | $type = $matches[2]; |
30 | 30 | |
31 | - $method = 'get' . $type; |
|
31 | + $method = 'get'.$type; |
|
32 | 32 | if (!method_exists($this, $method)) { |
33 | - throw new \Exception('Unsupported method: ' . $name); |
|
33 | + throw new \Exception('Unsupported method: '.$name); |
|
34 | 34 | } |
35 | 35 | return $this->$method($category, $args); |
36 | 36 | } |
@@ -42,33 +42,33 @@ discard block |
||
42 | 42 | |
43 | 43 | protected function getFullClass($category, $args) |
44 | 44 | { |
45 | - return $this->getNamespace($category, $args) . '\\' . $this->entityClass . $this->getClassSuffix($category); |
|
45 | + return $this->getNamespace($category, $args).'\\'.$this->entityClass.$this->getClassSuffix($category); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | protected function getClass($category) |
49 | 49 | { |
50 | - return basename($this->entityClass . $this->getClassSuffix($category)); |
|
50 | + return basename($this->entityClass.$this->getClassSuffix($category)); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | protected function getNamespace($category) |
54 | 54 | { |
55 | - return $this->bundleNamespace . '\\' . $category; |
|
55 | + return $this->bundleNamespace.'\\'.$category; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | protected function getFullFilename($category, $args) |
59 | 59 | { |
60 | - $filename = isset($args[0]) ? $args[0] : (str_replace('\\', '/', $this->entityClass) . $this->getClassSuffix($category) . '.php'); |
|
61 | - return $this->getDirname($category, $args) . '/' . $filename; |
|
60 | + $filename = isset($args[0]) ? $args[0] : (str_replace('\\', '/', $this->entityClass).$this->getClassSuffix($category).'.php'); |
|
61 | + return $this->getDirname($category, $args).'/'.$filename; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | protected function getFilename($category, $args) |
65 | 65 | { |
66 | - return basename(isset($args[0]) ? $args[0] : (str_replace('\\', '/', $this->entityClass) . $this->getClassSuffix($category) . '.php')); |
|
66 | + return basename(isset($args[0]) ? $args[0] : (str_replace('\\', '/', $this->entityClass).$this->getClassSuffix($category).'.php')); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | protected function getDirname($category) |
70 | 70 | { |
71 | - return $this->bundleRoot . '/' . $category; |
|
71 | + return $this->bundleRoot.'/'.$category; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function camelToUnderscore($string) |