GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( ff2d37...e3959e )
by cao
03:01
created
src/Entity/Annotations/PropertyAnnotationHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public function __invoke(EntityContainer $container, $ann)
17 17
     {
18 18
         $meta = $container->getProperty($ann->name);
19
-        if(!$meta){
19
+        if (!$meta) {
20 20
             $meta = new PropertyMeta($ann->name);
21 21
             $container->setProperty($ann->name, $meta);
22 22
         }
Please login to merge, or discard this patch.
src/Entity/Annotations/ValidateAnnotationHandler.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,25 +19,25 @@
 block discarded – undo
19 19
     public function __invoke(EntityContainer $container, $ann)
20 20
     {
21 21
         $params = new AnnotationParams($ann->description, 3);
22
-        if($params->count()){
22
+        if ($params->count()) {
23 23
 
24 24
             $target = $ann->parent->name;
25 25
             $property = $container->getProperty($target);
26 26
             $property or \PhpBoot\abort($container->getClassName()." property $target not exist ");
27
-            if($params->count()>1){
27
+            if ($params->count()>1) {
28 28
                 $property->validation = [$params->getParam(0), $params->getParam(1)];
29
-            }else{
29
+            }else {
30 30
                 $property->validation = $params->getParam(0);
31
-                if($property->validation){
31
+                if ($property->validation) {
32 32
                     $v = new Validator();
33 33
                     $v->rule($property->validation, $property->name);
34
-                    if($v->hasRule('optional', $property->name)){
34
+                    if ($v->hasRule('optional', $property->name)) {
35 35
                         $property->isOptional = true;
36 36
                     }
37 37
                 }
38 38
             }
39 39
 
40
-        }else{
40
+        }else {
41 41
             \PhpBoot\abort(new AnnotationSyntaxException(
42 42
                 "The annotation \"@{$ann->name} {$ann->description}\" of {$container->getClassName()}::{$ann->parent->name} require 1 param, 0 given"
43 43
             ));
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             $property or \PhpBoot\abort($container->getClassName()." property $target not exist ");
27 27
             if($params->count()>1){
28 28
                 $property->validation = [$params->getParam(0), $params->getParam(1)];
29
-            }else{
29
+            } else{
30 30
                 $property->validation = $params->getParam(0);
31 31
                 if($property->validation){
32 32
                     $v = new Validator();
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 }
38 38
             }
39 39
 
40
-        }else{
40
+        } else{
41 41
             \PhpBoot\abort(new AnnotationSyntaxException(
42 42
                 "The annotation \"@{$ann->name} {$ann->description}\" of {$container->getClassName()}::{$ann->parent->name} require 1 param, 0 given"
43 43
             ));
Please login to merge, or discard this patch.
src/Entity/Annotations/VarAnnotationHandler.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@
 block discarded – undo
23 23
     public function __invoke(EntityContainer $container, $ann, EntityContainerBuilder $builder)
24 24
     {
25 25
         $params = new AnnotationParams($ann->description, 3);
26
-        if($params->count()){
26
+        if ($params->count()) {
27 27
             $type = $params->getParam(0);
28 28
             //TODO 校验type类型
29 29
             $target = $ann->parent->name;
30 30
             $property = $container->getProperty($target);
31 31
             $property or \PhpBoot\abort($container->getClassName()." property $target not exist ");
32
-            if($type == null || $type == 'mixed'){
32
+            if ($type == null || $type == 'mixed') {
33 33
                 $property->container = new MixedTypeContainer();
34
-            } else{
34
+            }else {
35 35
                 // TODO 判断$type是否匹配
36 36
                 $property->type = TypeHint::normalize($type, $container->getClassName());
37 37
                 // TODO 防止递归死循环
38 38
                 $property->container = ContainerFactory::create($builder, $property->type);
39 39
             }
40
-        }else{
40
+        }else {
41 41
             \PhpBoot\abort(new AnnotationSyntaxException(
42 42
                 "The annotation \"@{$ann->name} {$ann->description}\" of {$container->getClassName()}::{$ann->parent->name} require 1 param, 0 given"
43 43
             ));
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                 // TODO 防止递归死循环
38 38
                 $property->container = ContainerFactory::create($builder, $property->type);
39 39
             }
40
-        }else{
40
+        } else{
41 41
             \PhpBoot\abort(new AnnotationSyntaxException(
42 42
                 "The annotation \"@{$ann->name} {$ann->description}\" of {$container->getClassName()}::{$ann->parent->name} require 1 param, 0 given"
43 43
             ));
Please login to merge, or discard this patch.
src/Entity/ArrayContainer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
         TypeHint::isArray($type) or \PhpBoot\abort(new \InvalidArgumentException("type $type is not array"));
18 18
         $elementType = $type;
19 19
         $loops = 0;
20
-        while(TypeHint::isArray($elementType)){
20
+        while (TypeHint::isArray($elementType)) {
21 21
             $elementType = TypeHint::getArrayType($elementType);
22 22
             $loops++;
23 23
         }
24 24
         $container = $getElementContainer($elementType);
25 25
 
26
-        while($loops--){
26
+        while ($loops--) {
27 27
             $container = new self($container);
28 28
         }
29 29
         return $container;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         is_array($data) or \PhpBoot\abort(new \InvalidArgumentException('the first param is required to be array'));
44 44
         $res = [];
45
-        foreach ($data as $k=>$v){
45
+        foreach ($data as $k=>$v) {
46 46
             $res[$k] = $this->container->make($v, $validate);
47 47
         }
48 48
         return $res;
Please login to merge, or discard this patch.
src/DI/DIMetaLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 class DIMetaLoader extends ContainerBuilder
12 12
 {
13
-    static $DEFAULT_ANNOTATIONS=[
13
+    static $DEFAULT_ANNOTATIONS = [
14 14
         [VarAnnotationHandler::class, "properties.*.children[?name=='var'][]"],
15 15
         [InjectAnnotationHandler::class, "properties.*.children[?name=='inject'][]"]
16 16
     ];
Please login to merge, or discard this patch.
src/DI/AnnotationReader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
         }
23 23
 
24 24
         $class = new \ReflectionClass($name);
25
-        if(isset($name::$__enableDIAnnotations__) && $name::$__enableDIAnnotations__){
25
+        if (isset($name::$__enableDIAnnotations__) && $name::$__enableDIAnnotations__) {
26 26
             $context = $this->loader->build($name);
27 27
             /**@var $context ObjectDefinitionContext */
28 28
             $definition = $context->definition;
29
-        }else{
29
+        }else {
30 30
             $definition = new ObjectDefinition($name);
31 31
         }
32 32
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             $context = $this->loader->build($name);
27 27
             /**@var $context ObjectDefinitionContext */
28 28
             $definition = $context->definition;
29
-        }else{
29
+        } else{
30 30
             $definition = new ObjectDefinition($name);
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/DI/Annotations/InjectAnnotationHandler.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,19 +20,19 @@
 block discarded – undo
20 20
     public function __invoke(ObjectDefinitionContext $context, $ann)
21 21
     {
22 22
         $className = $context->definition->getClassName();
23
-        if(!$ann->parent){
23
+        if (!$ann->parent) {
24 24
             Logger::debug("The annotation \"@{$ann->name} {$ann->description}\" of $className should be used with parent");
25 25
         }
26 26
         $target = $ann->parent->name;
27 27
         // @inject a.b.c
28 28
         $params = new AnnotationParams($ann->description, 3);
29
-        if(count($params) == 0){
29
+        if (count($params) == 0) {
30 30
             //查找@var 定义的变量
31
-            if(!isset($context->vars[$target])){
31
+            if (!isset($context->vars[$target])) {
32 32
                 Logger::debug("The annotation \"@{$ann->name} {$ann->description}\" of $className should be used with a param or @var");
33 33
             }
34 34
             $entryName = $context->vars[$target];
35
-        }else{
35
+        }else {
36 36
             $entryName = $params[0];
37 37
         }
38 38
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
                 Logger::debug("The annotation \"@{$ann->name} {$ann->description}\" of $className should be used with a param or @var");
33 33
             }
34 34
             $entryName = $context->vars[$target];
35
-        }else{
35
+        } else{
36 36
             $entryName = $params[0];
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/DI/Annotations/VarAnnotationHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function __invoke(ObjectDefinitionContext $context, $ann)
24 24
     {
25 25
         $className = $context->definition->getClassName();
26
-        if(!$ann->parent){
26
+        if (!$ann->parent) {
27 27
             Logger::debug("The annotation \"@{$ann->name} {$ann->description}\" of $className should be used with parent");
28 28
         }
29 29
         $target = $ann->parent->name;
Please login to merge, or discard this patch.
src/ORM/ModelWithObject.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             if(isset($this->object->$column)){
29 29
                 if(is_array($this->object->$column) || is_object($this->object->$column)){
30 30
                     $data[$column] = json_encode($this->object->$column);
31
-                }else{
31
+                } else{
32 32
                     $data[$column] = $this->object->$column;
33 33
                 }
34 34
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             if($pk != $column && isset($this->object->$column)){
50 50
                 if(is_array($this->object->$column) || is_object($this->object->$column)){
51 51
                     $data[$column] = json_encode($this->object->$column);
52
-                }else{
52
+                } else{
53 53
                     $data[$column] = $this->object->$column;
54 54
                 }
55 55
             }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
     public function create()
29 29
     {
30 30
         $data = [];
31
-        foreach ($this->getColumns() as $column){
32
-            if(isset($this->object->$column)){
33
-                if(is_array($this->object->$column) || is_object($this->object->$column)){
31
+        foreach ($this->getColumns() as $column) {
32
+            if (isset($this->object->$column)) {
33
+                if (is_array($this->object->$column) || is_object($this->object->$column)) {
34 34
                     $data[$column] = json_encode($this->object->$column);
35
-                }else{
35
+                }else {
36 36
                     $data[$column] = $this->object->$column;
37 37
                 }
38 38
 
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
      * @param array $columns columns to update. if columns is empty array, update all of the columns
49 49
      * @return int rows updated
50 50
      */
51
-    public function update(array $columns=[])
51
+    public function update(array $columns = [])
52 52
     {
53 53
         $data = [];
54 54
         $pk = $this->entity->getPK();
55
-        foreach ($this->getColumns() as $column){
56
-            if(count($columns) && !in_array($column, $columns)){
55
+        foreach ($this->getColumns() as $column) {
56
+            if (count($columns) && !in_array($column, $columns)) {
57 57
                 continue;
58 58
             }
59
-            if($pk != $column && isset($this->object->$column)){
60
-                if(is_array($this->object->$column) || is_object($this->object->$column)){
59
+            if ($pk != $column && isset($this->object->$column)) {
60
+                if (is_array($this->object->$column) || is_object($this->object->$column)) {
61 61
                     $data[$column] = json_encode($this->object->$column);
62
-                }else{
62
+                }else {
63 63
                     $data[$column] = $this->object->$column;
64 64
                 }
65 65
             }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     protected function getColumns()
86 86
     {
87 87
         $columns = [];
88
-        foreach ($this->entity->getProperties() as $p){
88
+        foreach ($this->entity->getProperties() as $p) {
89 89
             $columns[] = $p->name;
90 90
         }
91 91
         return $columns;
Please login to merge, or discard this patch.