@@ -102,7 +102,7 @@ |
||
102 | 102 | $originalLoader = $loader[0]; |
103 | 103 | |
104 | 104 | // Configure library loader for doctrine annotation loader |
105 | - AnnotationRegistry::registerLoader(function ($class) use ($originalLoader) { |
|
105 | + AnnotationRegistry::registerLoader(function($class) use ($originalLoader) { |
|
106 | 106 | $originalLoader->loadClass($class); |
107 | 107 | |
108 | 108 | return class_exists($class, false); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2013, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2013, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Proxy; |
12 | 12 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // resolve path parts (single dot, double dot and double delimiters) |
55 | - $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path); |
|
55 | + $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path); |
|
56 | 56 | if (strpos($path, '.') !== false) { |
57 | 57 | $parts = explode(DIRECTORY_SEPARATOR, $path); |
58 | 58 | $absolutes = array(); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2014, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2014, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Instrument\Transformer; |
12 | 12 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function transform(StreamMetaData $metadata = null) |
79 | 79 | { |
80 | - if (strpos($metadata->source, 'new ')===false) { |
|
80 | + if (strpos($metadata->source, 'new ') === false) { |
|
81 | 81 | return; |
82 | 82 | } |
83 | 83 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $isWaitingEnd = true; |
96 | 96 | $isWaitingClass = false; |
97 | 97 | } |
98 | - if (in_array($tokenStream[$index+1], array('(', ';', ')', '.'))) { |
|
98 | + if (in_array($tokenStream[$index + 1], array('(', ';', ')', '.'))) { |
|
99 | 99 | $isWaitingEnd = true; |
100 | 100 | $isWaitingClass = false; |
101 | 101 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function transform(StreamMetaData $metadata) |
124 | 124 | { |
125 | - if ((strpos($metadata->source, 'include')===false) && (strpos($metadata->source, 'require')===false)) { |
|
125 | + if ((strpos($metadata->source, 'include') === false) && (strpos($metadata->source, 'require') === false)) { |
|
126 | 126 | return; |
127 | 127 | } |
128 | 128 | static $lookFor = array( |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | if (!$isWaitingEnd && isset($lookFor[$token])) { |
174 | 174 | $isWaitingEnd = true; |
175 | 175 | $isBracesFinished = $isTernaryOperator = false; |
176 | - $transformedSource .= ' \\' . __CLASS__ . '::rewrite('; |
|
176 | + $transformedSource .= ' \\' . __CLASS__ . '::rewrite('; |
|
177 | 177 | } |
178 | 178 | } |
179 | 179 | $metadata->source = $transformedSource; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Proxy; |
12 | 12 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | protected function indent($text) |
80 | 80 | { |
81 | 81 | $pad = str_pad('', $this->indent, ' '); |
82 | - $lines = array_map(function ($line) use ($pad) { |
|
82 | + $lines = array_map(function($line) use ($pad) { |
|
83 | 83 | return $pad . $line; |
84 | 84 | }, explode("\n", $text)); |
85 | 85 |
@@ -88,7 +88,7 @@ |
||
88 | 88 | /** |
89 | 89 | * Returns list of string representation of parameters |
90 | 90 | * |
91 | - * @param array|ReflectionParameter[] $parameters List of parameters |
|
91 | + * @param ReflectionParameter[] $parameters List of parameters |
|
92 | 92 | * |
93 | 93 | * @return array |
94 | 94 | */ |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Proxy; |
12 | 12 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $defaultValue = null; |
127 | 127 | $isDefaultValueAvailable = $parameter->isDefaultValueAvailable(); |
128 | 128 | if ($isDefaultValueAvailable) { |
129 | - $defaultValue = var_export($parameter->getDefaultValue(), true); |
|
129 | + $defaultValue = var_export($parameter->getDefaultValue(), true); |
|
130 | 130 | } elseif ($parameter->isOptional()) { |
131 | 131 | $defaultValue = 'null'; |
132 | 132 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Proxy; |
12 | 12 |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | $scope = $isStatic ? $this->staticLsbExpression : '$this'; |
417 | 417 | $prefix = $isStatic ? AspectContainer::STATIC_METHOD_PREFIX : AspectContainer::METHOD_PREFIX; |
418 | 418 | |
419 | - $args = join(', ', array_map(function (ReflectionParameter $param) { |
|
419 | + $args = join(', ', array_map(function(ReflectionParameter $param) { |
|
420 | 420 | $byReference = $param->isPassedByReference() ? '&' : ''; |
421 | 421 | |
422 | 422 | return $byReference . '$' . $param->name; |
@@ -468,11 +468,11 @@ discard block |
||
468 | 468 | ($prefix ? "$prefix " : '') . // List of class modifiers |
469 | 469 | 'class ' . // 'class' keyword with one space |
470 | 470 | $this->name . // Name of the class |
471 | - ' extends '. // 'extends' keyword with |
|
471 | + ' extends ' . // 'extends' keyword with |
|
472 | 472 | $this->parentClassName . // Name of the parent class |
473 | 473 | ($this->interfaces ? ' implements ' . join(', ', $this->interfaces) : '') . "\n" . // Interfaces list |
474 | 474 | "{\n" . // Start of class definition |
475 | - ($this->traits ? $this->indent('use ' . join(', ', $this->traits) .';'."\n") : '') . "\n" . // Traits list |
|
475 | + ($this->traits ? $this->indent('use ' . join(', ', $this->traits) . ';' . "\n") : '') . "\n" . // Traits list |
|
476 | 476 | $this->indent(join("\n", $this->propertiesCode)) . "\n" . // Property definitions |
477 | 477 | $this->indent(join("\n", $this->methodsCode)) . "\n" . // Method definitions |
478 | 478 | "}" // End of class definition |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2013, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2013, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Proxy; |
12 | 12 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | static $accessor = null; |
85 | 85 | |
86 | 86 | if (!$accessor) { |
87 | - $accessor = AspectKernel::getInstance()->getContainer()->get('aspect.advisor.accessor'); |
|
87 | + $accessor = AspectKernel::getInstance()->getContainer()->get('aspect.advisor.accessor'); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | $advices = self::$functionAdvices[$namespace][AspectContainer::FUNCTION_PREFIX][$joinPointName]; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | $code = ( |
170 | - preg_replace('/ {4}|\t/', '', $function->getDocComment()) ."\n" . // Original doc-comment |
|
170 | + preg_replace('/ {4}|\t/', '', $function->getDocComment()) . "\n" . // Original doc-comment |
|
171 | 171 | 'function ' . // 'function' keyword |
172 | 172 | ($function->returnsReference() ? '&' : '') . // By reference symbol |
173 | 173 | $functionName . // Function name |
@@ -193,13 +193,13 @@ discard block |
||
193 | 193 | */ |
194 | 194 | protected function getJoinpointInvocationBody(ReflectionFunction $function) |
195 | 195 | { |
196 | - $class = '\\' . __CLASS__; |
|
196 | + $class = '\\' . __CLASS__; |
|
197 | 197 | |
198 | 198 | $dynamicArgs = false; |
199 | 199 | $hasOptionals = false; |
200 | 200 | $hasReferences = false; |
201 | 201 | |
202 | - $argValues = array_map(function (ReflectionParameter $param) use (&$dynamicArgs, &$hasOptionals, &$hasReferences) { |
|
202 | + $argValues = array_map(function(ReflectionParameter $param) use (&$dynamicArgs, &$hasOptionals, &$hasReferences) { |
|
203 | 203 | $byReference = $param->isPassedByReference(); |
204 | 204 | $dynamicArg = $param->name == '...'; |
205 | 205 | $dynamicArgs = $dynamicArgs || $dynamicArg; |
@@ -16,7 +16,6 @@ |
||
16 | 16 | use Go\Aop\Pointcut\PointcutLexer; |
17 | 17 | use Go\Aop\Pointcut\PointcutGrammar; |
18 | 18 | use Go\Aop\Pointcut\PointcutParser; |
19 | -use Go\Instrument\RawAnnotationReader; |
|
20 | 19 | use Go\Instrument\ClassLoading\CachePathManager; |
21 | 20 | use Doctrine\Common\Annotations\AnnotationReader; |
22 | 21 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2012, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Proxy; |
12 | 12 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function __construct() |
46 | 46 | { |
47 | 47 | // Register all services in the container |
48 | - $this->share('aspect.loader', function (Container $container) { |
|
48 | + $this->share('aspect.loader', function(Container $container) { |
|
49 | 49 | $aspectLoader = new AspectLoader( |
50 | 50 | $container, |
51 | 51 | $container->get('aspect.annotation.reader') |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | return $aspectLoader; |
61 | 61 | }); |
62 | 62 | |
63 | - $this->share('aspect.cached.loader', function (Container $container) { |
|
63 | + $this->share('aspect.cached.loader', function(Container $container) { |
|
64 | 64 | $cachedAspectLoader = new CachedAspectLoader( |
65 | 65 | $container, |
66 | 66 | 'aspect.loader', |
@@ -70,25 +70,25 @@ discard block |
||
70 | 70 | return $cachedAspectLoader; |
71 | 71 | }); |
72 | 72 | |
73 | - $this->share('aspect.advisor.accessor', function (Container $container) { |
|
73 | + $this->share('aspect.advisor.accessor', function(Container $container) { |
|
74 | 74 | return new LazyAdvisorAccessor( |
75 | 75 | $container, |
76 | 76 | $container->get('aspect.cached.loader') |
77 | 77 | ); |
78 | 78 | }); |
79 | 79 | |
80 | - $this->share('aspect.advice_matcher', function (Container $container) { |
|
80 | + $this->share('aspect.advice_matcher', function(Container $container) { |
|
81 | 81 | return new AdviceMatcher( |
82 | 82 | $container->get('aspect.loader'), |
83 | 83 | $container->get('kernel.interceptFunctions') |
84 | 84 | ); |
85 | 85 | }); |
86 | 86 | |
87 | - $this->share('aspect.annotation.reader', function (Container $container) { |
|
87 | + $this->share('aspect.annotation.reader', function(Container $container) { |
|
88 | 88 | $options = $container->get('kernel.options'); |
89 | 89 | $reader = new AnnotationReader(); |
90 | 90 | if (!empty($options['cacheDir'])) { |
91 | - $reader = new FileCacheReader( |
|
91 | + $reader = new FileCacheReader( |
|
92 | 92 | $reader, |
93 | 93 | $options['cacheDir'] . DIRECTORY_SEPARATOR . '_annotations' . DIRECTORY_SEPARATOR, |
94 | 94 | $options['debug'] |
@@ -97,15 +97,15 @@ discard block |
||
97 | 97 | |
98 | 98 | return $reader; |
99 | 99 | }); |
100 | - $this->share('aspect.cache.path.manager', function (Container $container) { |
|
100 | + $this->share('aspect.cache.path.manager', function(Container $container) { |
|
101 | 101 | return new CachePathManager($container->get('kernel')); |
102 | 102 | }); |
103 | 103 | |
104 | 104 | // Pointcut services |
105 | - $this->share('aspect.pointcut.lexer', function () { |
|
105 | + $this->share('aspect.pointcut.lexer', function() { |
|
106 | 106 | return new PointcutLexer(); |
107 | 107 | }); |
108 | - $this->share('aspect.pointcut.parser', function (Container $container) { |
|
108 | + $this->share('aspect.pointcut.parser', function(Container $container) { |
|
109 | 109 | return new PointcutParser( |
110 | 110 | new PointcutGrammar( |
111 | 111 | $container, |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Go! AOP framework |
|
4 | - * |
|
5 | - * @copyright Copyright 2014, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Go! AOP framework |
|
4 | + * |
|
5 | + * @copyright Copyright 2014, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\Instrument\Transformer; |
12 | 12 |