Completed
Pull Request — master (#240)
by Alexander
03:13
created
src/Instrument/ClassLoading/AopComposerLoader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Instrument/PathResolver.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Instrument/Transformer/ConstructorExecutionTransformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
src/Instrument/Transformer/FilterInjectorTransformer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Proxy/AbstractProxy.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Proxy/ClassProxy.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Proxy/FunctionProxy.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Core/GoAspectContainer.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
demos/Demo/Annotation/Deprecated.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.