Completed
Push — feature/0.7.0 ( ad3584...17fb54 )
by Ryuichi
02:59
created
WebStream/Annotation/Header.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     /**
80 80
      * {@inheritdoc}
81 81
      */
82
-    public function onMethodInject(IAnnotatable &$instance, Container $container, \ReflectionMethod $method)
82
+    public function onMethodInject(IAnnotatable&$instance, Container $container, \ReflectionMethod $method)
83 83
     {
84 84
         $this->injectedLog($this);
85 85
 
@@ -94,22 +94,22 @@  discard block
 block discarded – undo
94 94
 
95 95
             for ($i = 0; $i < count($allowMethods); $i++) {
96 96
                 if (!preg_match("/^(?:(?:P(?:OS|U)|GE)T|(?:p(?:os|u)|ge)t|DELETE|delete)$/", $allowMethods[$i])) {
97
-                    $errorMsg = "Invalid value '" . $allowMethods[$i] . "' in 'allowMethod' attribute of @Header.";
97
+                    $errorMsg = "Invalid value '".$allowMethods[$i]."' in 'allowMethod' attribute of @Header.";
98 98
                     throw new AnnotationException($errorMsg);
99 99
                 }
100 100
                 $allowMethods[$i] = strtoupper($allowMethods[$i]);
101 101
             }
102 102
 
103 103
             $action = $this->camel2snake($container->router->action);
104
-            $classpathWithAction = $method->class . "#" . $action;
104
+            $classpathWithAction = $method->class."#".$action;
105 105
 
106 106
             // 複数指定した場合、一つでも許可されていればOK
107 107
             if (!$this->inArray($container->request->requestMethod, $allowMethods)) {
108
-                $errorMsg = "Not allowed request method '" . $container->request->requestMethod . "' in " . $classpathWithAction;
108
+                $errorMsg = "Not allowed request method '".$container->request->requestMethod."' in ".$classpathWithAction;
109 109
                 throw new InvalidRequestException($errorMsg);
110 110
             }
111 111
 
112
-            $this->logger->debug("Accepted request method '" . $container->request->requestMethod . "' in " . $classpathWithAction);
112
+            $this->logger->debug("Accepted request method '".$container->request->requestMethod."' in ".$classpathWithAction);
113 113
 
114 114
             if ($ext !== null) {
115 115
                 $contentType = $this->contentTypeList[$ext];
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                     $errorMsg = "Invalid value '$ext' in 'contentType' attribute of @Header.";
118 118
                     throw new AnnotationException($errorMsg);
119 119
                 }
120
-                $this->logger->debug("Accepted contentType '$ext' in " . $classpathWithAction);
120
+                $this->logger->debug("Accepted contentType '$ext' in ".$classpathWithAction);
121 121
             }
122 122
         }
123 123
     }
Please login to merge, or discard this patch.
WebStream/Annotation/ExceptionHandler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     /**
51 51
      * {@inheritdoc}
52 52
      */
53
-    public function onMethodInject(IAnnotatable &$instance, Container $container, \ReflectionMethod $method)
53
+    public function onMethodInject(IAnnotatable&$instance, Container $container, \ReflectionMethod $method)
54 54
     {
55 55
         $this->injectedLog($this);
56 56
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace WebStream\Annotation;
3 3
 
4
-use WebStream\Core\CoreInterface;
5 4
 use WebStream\Annotation\Base\Annotation;
6 5
 use WebStream\Annotation\Base\IAnnotatable;
7 6
 use WebStream\Annotation\Base\IMethod;
Please login to merge, or discard this patch.
WebStream/Annotation/Reader/AnnotationReader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param IAnnotatable アノテーション使用可能インスタンス
58 58
      * @param Container 依存コンテナ
59 59
      */
60
-    public function __construct(IAnnotatable &$instance, Container $container)
60
+    public function __construct(IAnnotatable&$instance, Container $container)
61 61
     {
62 62
         $this->instance = $instance;
63 63
         $this->container = $container;
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                         $annotation->onPropertyInject($this->instance, $this->container, $property);
253 253
                     } catch (\Exception $e) {
254 254
                         if ($this->exception === null) {
255
-                            $this->exception = function () use ($e) {
255
+                            $this->exception = function() use ($e) {
256 256
                                 throw $e;
257 257
                             };
258 258
                         }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
     /**
41 41
      * Constructor
42
-     * @param Container 依存コンテナ
42
+     * @param Container Container
43 43
      */
44 44
     public function __construct(Container $container)
45 45
     {
Please login to merge, or discard this patch.
WebStream/Annotation/Autowired.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * {@inheritdoc}
37 37
      */
38
-    public function onPropertyInject(IAnnotatable &$instance, Container $container, \ReflectionProperty $property)
38
+    public function onPropertyInject(IAnnotatable&$instance, Container $container, \ReflectionProperty $property)
39 39
     {
40 40
         $this->injectedLog($this);
41 41
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             }
79 79
         } else {
80 80
             // 不明な属性が指定された場合、警告を出す
81
-            $key = $property->class . "." . $property->name;
81
+            $key = $property->class.".".$property->name;
82 82
             $this->logger->warn("An unknown attribute is specified in $key.");
83 83
         }
84 84
     }
Please login to merge, or discard this patch.
WebStream/Annotation/Query.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
     /**
53 53
      * {@inheritdoc}
54 54
      */
55
-    public function onMethodInject(IAnnotatable &$instance, Container $container, \ReflectionMethod $method)
55
+    public function onMethodInject(IAnnotatable&$instance, Container $container, \ReflectionMethod $method)
56 56
     {
57 57
         $this->injectedLog($this);
58 58
 
59
-        $key = $method->class . "#" . $method->name;
59
+        $key = $method->class."#".$method->name;
60 60
         if ($this->injectedContainer->{$key} === null) {
61 61
             $this->injectedContainer->{$key} = new AnnotationListContainer();
62 62
         }
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
             $files = [$files];
66 66
         }
67 67
 
68
-        $this->injectedContainer->{$key}->pushAsLazy(function () use ($files) {
68
+        $this->injectedContainer->{$key}->pushAsLazy(function() use ($files) {
69 69
             $xmlObjectList = [];
70 70
             foreach ($files as $file) {
71 71
                 if (file_exists($file)) {
72 72
                     $xmlObject = simplexml_load_file($file);
73 73
                     if ($xmlObject === false) {
74
-                        throw new DatabaseException("Failded to parse query file: " . $file);
74
+                        throw new DatabaseException("Failded to parse query file: ".$file);
75 75
                     }
76 76
                     $xmlObjectList[] = $xmlObject;
77 77
                 }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace WebStream\Annotation;
3 3
 
4
-use WebStream\Core\CoreInterface;
5 4
 use WebStream\Annotation\Base\Annotation;
6 5
 use WebStream\Annotation\Base\IAnnotatable;
7 6
 use WebStream\Annotation\Base\IMethod;
Please login to merge, or discard this patch.
WebStream/Annotation/Alias.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,13 +50,13 @@
 block discarded – undo
50 50
     /**
51 51
      * {@inheritdoc}
52 52
      */
53
-    public function onMethodInject(IAnnotatable &$instance, Container $container, \ReflectionMethod $method)
53
+    public function onMethodInject(IAnnotatable&$instance, Container $container, \ReflectionMethod $method)
54 54
     {
55 55
         $this->injectedLog($this);
56 56
 
57 57
         $aliasMethodName = $this->annotation->name;
58 58
         if (!preg_match('/^[a-zA-Z_][a-zA-Z0-9_]{0,}$/', $aliasMethodName)) {
59
-            throw new AnnotationException("Alias method is invalid: " . $aliasMethodName);
59
+            throw new AnnotationException("Alias method is invalid: ".$aliasMethodName);
60 60
         }
61 61
 
62 62
         $this->injectedContainer->{$aliasMethodName} = $method->name;
Please login to merge, or discard this patch.
WebStream/Annotation/Base/IClass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
      * @param Container 依存コンテナ
19 19
      * @param ReflectionClass リフレクションクラスオブジェクト
20 20
      */
21
-    public function onClassInject(IAnnotatable &$instance, Container $container, \ReflectionClass $class);
21
+    public function onClassInject(IAnnotatable&$instance, Container $container, \ReflectionClass $class);
22 22
 }
Please login to merge, or discard this patch.
WebStream/Annotation/Base/IProperty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
      * @param Container 依存コンテナ
19 19
      * @param ReflectionProperty リフレクションプロパティオブジェクト
20 20
      */
21
-    public function onPropertyInject(IAnnotatable &$instance, Container $container, \ReflectionProperty $property);
21
+    public function onPropertyInject(IAnnotatable&$instance, Container $container, \ReflectionProperty $property);
22 22
 }
Please login to merge, or discard this patch.
WebStream/Annotation/Base/IMethod.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
      * @param Container 依存コンテナ
19 19
      * @param ReflectionMethod リフレクションメソッドオブジェクト
20 20
      */
21
-    public function onMethodInject(IAnnotatable &$instance, Container $container, \ReflectionMethod $method);
21
+    public function onMethodInject(IAnnotatable&$instance, Container $container, \ReflectionMethod $method);
22 22
 }
Please login to merge, or discard this patch.