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
Pull Request — master (#6)
by
unknown
01:35
created
src/Facade/Responses/GenericMultiCalDAVResponse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
     protected function parse()
27 27
     {
28
-        if(isset($this->content['response'])){
28
+        if (isset($this->content['response'])) {
29 29
 
30
-            if(isset($this->content['response']['propstat'])) {
30
+            if (isset($this->content['response']['propstat'])) {
31 31
                 // its a collection with one single element
32 32
                 $single_resource = $this->buildSingleResponse();
33 33
                 $single_resource->setContent(['response' => $this->content['response']]);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * @return GenericSinglePROPFINDCalDAVResponse[]
50 50
      */
51
-    public function getResponses(){
51
+    public function getResponses() {
52 52
         return $this->responses;
53 53
     }
54 54
 
Please login to merge, or discard this patch.
src/Facade/Responses/VCardEntityResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     /**
22 22
      * @return string
23 23
      */
24
-    public function getVCard(){
24
+    public function getVCard() {
25 25
         return isset($this->found_props['calendar-data']) ? $this->found_props['calendar-data'] : null;
26 26
     }
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
src/Facade/Responses/CalendarDeletedResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     /**
22 22
      * @return bool
23 23
      */
24
-    public function isSuccessFull(){
24
+    public function isSuccessFull() {
25 25
         return $this->code == HttpResponse::HttpCodeNoContent;
26 26
     }
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
src/Facade/Requests/MakeCalendarRequestVO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $this->timezone      = $timezone;
61 61
         $this->uid           = md5(uniqid(mt_rand(), true));
62 62
 
63
-        if(is_null($this->timezone)){
63
+        if (is_null($this->timezone)) {
64 64
             $this->timezone = new DateTimeZone('UTC');
65 65
         }
66 66
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     /**
69 69
      * @param string $uid
70 70
      */
71
-    public function setUID($uid){
71
+    public function setUID($uid) {
72 72
         $this->uid = $uid;
73 73
     }
74 74
 
Please login to merge, or discard this patch.
src/Facade/Utils/RequestFactory.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -50,21 +50,21 @@  discard block
 block discarded – undo
50 50
                 ];
51 51
             case HttpMethods::Put:
52 52
                $etag = $params[0];
53
-               if(!empty($etag)){
54
-                   return [
55
-                       Headers::ContentType  => ContentTypes::Calendar,
56
-                       Headers::IfMatch      => $etag
57
-                   ];
58
-               }
53
+                if(!empty($etag)){
54
+                    return [
55
+                        Headers::ContentType  => ContentTypes::Calendar,
56
+                        Headers::IfMatch      => $etag
57
+                    ];
58
+                }
59 59
         }
60 60
         return [];
61 61
     }
62 62
     /**
63
-    * @param string $url
64
-    * @param string $body
65
-    * @param int $depth
66
-    * @return Request
67
-    */
63
+     * @param string $url
64
+     * @param string $body
65
+     * @param int $depth
66
+     * @return Request
67
+     */
68 68
     public static function createPropFindRequest($url , $body, $depth = 1){
69 69
         return new Request
70 70
         (
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      * @param string $etag
154 154
      * @return Request
155 155
      */
156
-     public static function createPutRequest($url, $body, $etag = null){
156
+        public static function createPutRequest($url, $body, $etag = null){
157 157
         return new Request
158 158
         (
159 159
             HttpMethods::Put,
Please login to merge, or discard this patch.
Spacing   +19 added lines, -26 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
      * @param array $params
27 27
      * @return array
28 28
      */
29
-    private static function createHeadersFor($http_method, array $params = []){
30
-        switch ($http_method){
29
+    private static function createHeadersFor($http_method, array $params = []) {
30
+        switch ($http_method) {
31 31
             case HttpMethods::PropFind:
32 32
             case HttpMethods::Options:
33 33
             case HttpMethods::Report:
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 ];
39 39
             case HttpMethods::Delete:
40 40
                 $etag = $params[0];
41
-                if(!empty($etag)) {
41
+                if (!empty($etag)) {
42 42
                     return [
43 43
                         Headers::IfMatch => $etag,
44 44
                     ];
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 ];
51 51
             case HttpMethods::Put:
52 52
                $etag = $params[0];
53
-               if(!empty($etag)){
53
+               if (!empty($etag)) {
54 54
                    return [
55 55
                        Headers::ContentType  => ContentTypes::Calendar,
56 56
                        Headers::IfMatch      => $etag
@@ -65,11 +65,10 @@  discard block
 block discarded – undo
65 65
     * @param int $depth
66 66
     * @return Request
67 67
     */
68
-    public static function createPropFindRequest($url , $body, $depth = 1){
69
-        return new Request
70
-        (
68
+    public static function createPropFindRequest($url, $body, $depth = 1) {
69
+        return new Request(
71 70
             HttpMethods::PropFind,
72
-            $url ,
71
+            $url,
73 72
             self::createHeadersFor(HttpMethods::PropFind, [$depth]),
74 73
             $body
75 74
         );
@@ -80,9 +79,8 @@  discard block
 block discarded – undo
80 79
      * @param string $body
81 80
      * @return Request
82 81
      */
83
-    public static function createMakeCalendarRequest($url , $body){
84
-        return new Request
85
-        (
82
+    public static function createMakeCalendarRequest($url, $body) {
83
+        return new Request(
86 84
             HttpMethods::MakeCalendar,
87 85
             $url,
88 86
             self::createHeadersFor(HttpMethods::MakeCalendar),
@@ -95,9 +93,8 @@  discard block
 block discarded – undo
95 93
      * @param int $depth
96 94
      * @return Request
97 95
      */
98
-    public static function createOptionsRequest($url, $depth = 1){
99
-        return new Request
100
-        (
96
+    public static function createOptionsRequest($url, $depth = 1) {
97
+        return new Request(
101 98
             HttpMethods::Options,
102 99
             $url,
103 100
             self::createHeadersFor(HttpMethods::Options, [$depth])
@@ -110,9 +107,8 @@  discard block
 block discarded – undo
110 107
      * @param int $depth
111 108
      * @return Request
112 109
      */
113
-    public static function createReportRequest($url , $body, $depth = 1){
114
-        return new Request
115
-        (
110
+    public static function createReportRequest($url, $body, $depth = 1) {
111
+        return new Request(
116 112
             HttpMethods::Report,
117 113
             $url,
118 114
             self::createHeadersFor(HttpMethods::Report, [$depth]),
@@ -125,9 +121,8 @@  discard block
 block discarded – undo
125 121
      * @param string $etag
126 122
      * @return Request
127 123
      */
128
-    public static function createDeleteRequest($url , $etag){
129
-        return new Request
130
-        (
124
+    public static function createDeleteRequest($url, $etag) {
125
+        return new Request(
131 126
             HttpMethods::Delete,
132 127
             $url,
133 128
             self::createHeadersFor(HttpMethods::Delete, [$etag])
@@ -138,9 +133,8 @@  discard block
 block discarded – undo
138 133
      * @param string $url
139 134
      * @return Request
140 135
      */
141
-    public static function createGetRequest($url){
142
-        return new Request
143
-        (
136
+    public static function createGetRequest($url) {
137
+        return new Request(
144 138
             HttpMethods::Get,
145 139
             $url,
146 140
             self::createHeadersFor(HttpMethods::Get)
@@ -153,9 +147,8 @@  discard block
 block discarded – undo
153 147
      * @param string $etag
154 148
      * @return Request
155 149
      */
156
-     public static function createPutRequest($url, $body, $etag = null){
157
-        return new Request
158
-        (
150
+     public static function createPutRequest($url, $body, $etag = null) {
151
+        return new Request(
159 152
             HttpMethods::Put,
160 153
             $url,
161 154
             self::createHeadersFor(HttpMethods::Put, [$etag]),
Please login to merge, or discard this patch.
src/Facade/Responses/UserPrincipalSingleResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      * @return string
23 23
      */
24 24
     public function getPrincipalUrl() {
25
-        return isset($this->found_props['current-user-principal']) &&  isset($this->found_props['current-user-principal']['href']) ?
25
+        return isset($this->found_props['current-user-principal']) && isset($this->found_props['current-user-principal']['href']) ?
26 26
             $this->server_url.$this->found_props['current-user-principal']['href'] : null;
27 27
     }
28 28
 }
29 29
\ No newline at end of file
Please login to merge, or discard this patch.
src/Facade/Responses/AbstractCalDAVResponse.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
      * @param string|null $body
43 43
      * @param int $code
44 44
      */
45
-    public function __construct($server_url = null, $body = null, $code = HttpResponse::HttpCodeOk )
45
+    public function __construct($server_url = null, $body = null, $code = HttpResponse::HttpCodeOk)
46 46
     {
47 47
         parent::__construct($body, $code);
48 48
         $this->server_url = $server_url;
49
-        if(!empty($this->body)) {
49
+        if (!empty($this->body)) {
50 50
             $this->stripped = $this->stripNamespacesFromTags($this->body);
51
-            $this->xml     =  simplexml_load_string($this->stripped);
52
-            if($this->xml === FALSE)
51
+            $this->xml     = simplexml_load_string($this->stripped);
52
+            if ($this->xml === FALSE)
53 53
                 throw new XMLResponseParseException();
54 54
             $this->content = $this->toAssocArray($this->xml);
55 55
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
     }
63 63
 
64
-    protected function setContent($content){
64
+    protected function setContent($content) {
65 65
         $this->content = $content;
66 66
     }
67 67
 
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
         $nameSpaceDefRegEx = '(\S+)=["\']?((?:.(?!["\']?\s+(?:\S+)=|[>"\']))+.)["\']?';
95 95
 
96 96
         // Cycle through each namespace and remove it from the XML string
97
-        foreach( $toRemove as $remove ) {
97
+        foreach ($toRemove as $remove) {
98 98
             // First remove the namespace from the opening of the tag
99
-            $xml = str_replace('<' . $remove . ':', '<', $xml);
99
+            $xml = str_replace('<'.$remove.':', '<', $xml);
100 100
             // Now remove the namespace from the closing of the tag
101
-            $xml = str_replace('</' . $remove . ':', '</', $xml);
101
+            $xml = str_replace('</'.$remove.':', '</', $xml);
102 102
             // This XML uses the name space with CommentText, so remove that too
103
-            $xml = str_replace($remove . ':commentText', 'commentText', $xml);
103
+            $xml = str_replace($remove.':commentText', 'commentText', $xml);
104 104
             // Complete the pattern for RegEx to remove this namespace declaration
105 105
             $pattern = "/xmlns:{$remove}{$nameSpaceDefRegEx}/";
106 106
             // Remove the actual namespace declaration using the Pattern
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     /**
125 125
      * @return bool
126 126
      */
127
-    protected function isValid(){
127
+    protected function isValid() {
128 128
         return isset($this->content['response']);
129 129
     }
130 130
 }
131 131
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,9 @@
 block discarded – undo
49 49
         if(!empty($this->body)) {
50 50
             $this->stripped = $this->stripNamespacesFromTags($this->body);
51 51
             $this->xml     =  simplexml_load_string($this->stripped);
52
-            if($this->xml === FALSE)
53
-                throw new XMLResponseParseException();
52
+            if($this->xml === FALSE) {
53
+                            throw new XMLResponseParseException();
54
+            }
54 55
             $this->content = $this->toAssocArray($this->xml);
55 56
 
56 57
             $this->parse();
Please login to merge, or discard this patch.