@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | public static function callMethod(\ReflectionMethod $method, array $params = null) { |
31 | 31 | if (null === $params) { |
32 | - $params = array_map(function ($p) { |
|
32 | + $params = array_map(function($p) { |
|
33 | 33 | return '$' . $p->name; |
34 | 34 | }, $method->getParameters()); |
35 | 35 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $filter |= \ReflectionMethod::IS_PROTECTED; |
33 | 33 | } |
34 | 34 | |
35 | - return array_filter($class->getMethods($filter), function ($method) { |
|
35 | + return array_filter($class->getMethods($filter), function($method) { |
|
36 | 36 | return !$method->isFinal() && !$method->isStatic(); |
37 | 37 | }); |
38 | 38 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | $tokenizer = new PhpTokenizer(); |
83 | 83 | $tokens = $tokenizer->tokenize($content); |
84 | - $tokens = $tokens->filter(function ($token) { |
|
84 | + $tokens = $tokens->filter(function($token) { |
|
85 | 85 | return $token->type !== T_WHITESPACE && $token->type !== T_COMMENT && $token->type !== T_DOC_COMMENT; |
86 | 86 | }); |
87 | 87 | $statements = []; |
@@ -92,7 +92,7 @@ |
||
92 | 92 | return $this->constants; |
93 | 93 | } |
94 | 94 | |
95 | - return array_map(function (PhpConstant $constant) { |
|
95 | + return array_map(function(PhpConstant $constant) { |
|
96 | 96 | return $constant->getValue(); |
97 | 97 | }, $this->constants); |
98 | 98 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | private function getConstantSortFunc() { |
146 | - return $this->constantSortFunc ? : 'strcasecmp'; |
|
146 | + return $this->constantSortFunc ?: 'strcasecmp'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | private function getMethodSortFunc() { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | if (empty(self::$defaultMethodSortFunc)) { |
155 | - self::$defaultMethodSortFunc = function ($a, $b) { |
|
155 | + self::$defaultMethodSortFunc = function($a, $b) { |
|
156 | 156 | if ($a->isStatic() !== $isStatic = $b->isStatic()) { |
157 | 157 | return $isStatic ? 1 : -1; |
158 | 158 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } |
178 | 178 | |
179 | 179 | if (empty(self::$defaultPropertySortFunc)) { |
180 | - self::$defaultPropertySortFunc = function ($a, $b) { |
|
180 | + self::$defaultPropertySortFunc = function($a, $b) { |
|
181 | 181 | if (($aV = $a->getVisibility()) !== $bV = $b->getVisibility()) { |
182 | 182 | $aV = 'public' === $aV ? 3 : ('protected' === $aV ? 2 : 1); |
183 | 183 | $bV = 'public' === $bV ? 3 : ('protected' === $bV ? 2 : 1); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | public function __construct(CodeGeneratorConfig $config = null) { |
62 | 62 | // Make sure we retain the old default behavior for this class |
63 | - $this->config = $config?: new CodeGeneratorConfig(['generateEmptyDocblock' => false]); |
|
63 | + $this->config = $config ?: new CodeGeneratorConfig(['generateEmptyDocblock' => false]); |
|
64 | 64 | $this->writer = new Writer(); |
65 | 65 | } |
66 | 66 |
@@ -187,7 +187,7 @@ |
||
187 | 187 | $p->setDefaultValue($this->getValue($default)); |
188 | 188 | } |
189 | 189 | |
190 | - $tag = $params->find($p, function (ParamTag $t, $p) { |
|
190 | + $tag = $params->find($p, function(ParamTag $t, $p) { |
|
191 | 191 | return $t->getVariable() == '$' . $p->getName(); |
192 | 192 | }); |
193 | 193 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $docblock = new Docblock($ref->getDeclaringFunction()); |
57 | 57 | |
58 | 58 | $params = $docblock->getTags('param'); |
59 | - $tag = $params->find($ref->name, function (ParamTag $t, $name) { |
|
59 | + $tag = $params->find($ref->name, function(ParamTag $t, $name) { |
|
60 | 60 | return $t->getVariable() == '$' . $name; |
61 | 61 | }); |
62 | 62 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @return ParamTag |
102 | 102 | */ |
103 | 103 | public function getDocblockTag() { |
104 | - return ParamTag::create()->setType($this->getType() ? : 'mixed')->setVariable($this->getName())->setDescription($this->getTypeDescription()); |
|
104 | + return ParamTag::create()->setType($this->getType() ?: 'mixed')->setVariable($this->getName())->setDescription($this->getTypeDescription()); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |