@@ -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\Core; |
| 12 | 12 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | if (!is_callable($value)) { |
| 59 | 59 | throw new \InvalidArgumentException("Only callable values can be shared in the container"); |
| 60 | 60 | } |
| 61 | - $value = function ($container) use ($value) { |
|
| 61 | + $value = function($container) use ($value) { |
|
| 62 | 62 | static $sharedValue; |
| 63 | 63 | |
| 64 | 64 | if (null === $sharedValue) { |
@@ -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\Core; |
| 12 | 12 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | { |
| 78 | 78 | $loadedItems = array(); |
| 79 | 79 | $pointcut = $this->parsePointcut($aspect, $reflection, $metaInformation); |
| 80 | - $methodId = get_class($aspect).'->'.$reflection->name; |
|
| 80 | + $methodId = get_class($aspect) . '->' . $reflection->name; |
|
| 81 | 81 | $adviceCallback = Framework\BaseAdvice::fromAspectReflection($aspect, $reflection); |
| 82 | 82 | |
| 83 | 83 | if (isset($metaInformation->scope) && $metaInformation->scope !== 'aspect') { |
@@ -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\Core; |
| 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,18 +97,18 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | return $reader; |
| 99 | 99 | }); |
| 100 | - $this->share('aspect.annotation.raw.reader', function () { |
|
| 100 | + $this->share('aspect.annotation.raw.reader', function() { |
|
| 101 | 101 | return new RawAnnotationReader(); |
| 102 | 102 | }); |
| 103 | - $this->share('aspect.cache.path.manager', function (Container $container) { |
|
| 103 | + $this->share('aspect.cache.path.manager', function(Container $container) { |
|
| 104 | 104 | return new CachePathManager($container->get('kernel')); |
| 105 | 105 | }); |
| 106 | 106 | |
| 107 | 107 | // Pointcut services |
| 108 | - $this->share('aspect.pointcut.lexer', function () { |
|
| 108 | + $this->share('aspect.pointcut.lexer', function() { |
|
| 109 | 109 | return new PointcutLexer(); |
| 110 | 110 | }); |
| 111 | - $this->share('aspect.pointcut.parser', function (Container $container) { |
|
| 111 | + $this->share('aspect.pointcut.parser', function(Container $container) { |
|
| 112 | 112 | return new PointcutParser( |
| 113 | 113 | new PointcutGrammar( |
| 114 | 114 | $container, |
@@ -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\Core; |
| 12 | 12 | |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | { |
| 77 | 77 | $loadedItems = array(); |
| 78 | 78 | $pointcut = $this->parsePointcut($aspect, $reflection, $metaInformation); |
| 79 | - $propertyId = $reflection->class.'->'.$reflection->name; |
|
| 79 | + $propertyId = $reflection->class . '->' . $reflection->name; |
|
| 80 | 80 | |
| 81 | 81 | switch (true) { |
| 82 | 82 | case ($metaInformation instanceof Annotation\DeclareParents): |
@@ -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\Core; |
| 12 | 12 | |
@@ -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\Instrument\ClassLoading; |
| 12 | 12 | |
@@ -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\Instrument; |
| 12 | 12 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public static function leaveProcessing() |
| 41 | 41 | { |
| 42 | - self::$level = self::$level > 0 ? self::$level-1 : 0; |
|
| 42 | + self::$level = self::$level > 0 ? self::$level - 1 : 0; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -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; |
| 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 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Go! AOP framework |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2011, 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 2011, 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; |
| 12 | 12 | |
@@ -82,13 +82,13 @@ discard block |
||
| 82 | 82 | return $this->parser->parse($class->getDocComment(), 'class '.$class->getName()); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * Gets the annotations applied to a method. |
|
| 87 | - * |
|
| 88 | - * @param ParsedReflectionMethod $method The ReflectionMethod of the method from which |
|
| 89 | - * the annotations should be read. |
|
| 90 | - * @return array An array of Annotations. |
|
| 91 | - */ |
|
| 85 | + /** |
|
| 86 | + * Gets the annotations applied to a method. |
|
| 87 | + * |
|
| 88 | + * @param ParsedReflectionMethod $method The ReflectionMethod of the method from which |
|
| 89 | + * the annotations should be read. |
|
| 90 | + * @return array An array of Annotations. |
|
| 91 | + */ |
|
| 92 | 92 | public function getMethodAnnotations(ParsedReflectionMethod $method) |
| 93 | 93 | { |
| 94 | 94 | $this->parser->setTarget(Target::TARGET_METHOD); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $this->parser->setTarget(Target::TARGET_CLASS); |
| 81 | 81 | |
| 82 | - return $this->parser->parse($class->getDocComment(), 'class '.$class->getName()); |
|
| 82 | + return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | $this->parser->setTarget(Target::TARGET_METHOD); |
| 95 | 95 | |
| 96 | - return $this->parser->parse($method->getDocComment(), 'method '.$method->getDeclaringClass()->name.'::'.$method->getName().'()'); |
|
| 96 | + return $this->parser->parse($method->getDocComment(), 'method ' . $method->getDeclaringClass()->name . '::' . $method->getName() . '()'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | $this->parser->setTarget(Target::TARGET_PROPERTY); |
| 109 | 109 | |
| 110 | - return $this->parser->parse($property->getDocComment(), 'property '.$property->getDeclaringClass()->name.'::$'.$property->getName()); |
|
| 110 | + return $this->parser->parse($property->getDocComment(), 'property ' . $property->getDeclaringClass()->name . '::$' . $property->getName()); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |