Passed
Push — master ( 98db3e...ddec82 )
by Austin
01:30
created
src/Writer.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         if (!empty($this->encryption)) {
152 152
             if ($this->comments) {
153 153
                 $this->spacer()
154
-                     ->comment('Our PGP key');
154
+                        ->comment('Our PGP key');
155 155
             }
156 156
 
157 157
             $this->line('Encryption: ' . trim($this->encryption));
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         if (!empty($this->disclosure)) {
161 161
             if ($this->comments) {
162 162
                 $this->spacer()
163
-                     ->comment('Our disclosure policy');
163
+                        ->comment('Our disclosure policy');
164 164
             }
165 165
 
166 166
             $this->line('Disclosure: ' . trim(ucfirst($this->disclosure)));
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         if (!empty($this->acknowledgement)) {
170 170
             if ($this->comments) {
171 171
                 $this->spacer()
172
-                     ->comment('Our public acknowledgement');
172
+                        ->comment('Our public acknowledgement');
173 173
             }
174 174
 
175 175
             $this->line('Acknowledgement: ' . trim($this->acknowledgement));
@@ -177,19 +177,19 @@  discard block
 block discarded – undo
177 177
 
178 178
         if ($this->debug && isset($time)) {
179 179
             $this->spacer()
180
-                 ->comment()
181
-                 ->comment(
182
-                     'Generated by "' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt"' .
183
-                     (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : ''))) .
184
-                     ' (https://github.com/austinheap/' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : ''))) . ')');
180
+                    ->comment()
181
+                    ->comment(
182
+                        'Generated by "' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt"' .
183
+                        (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : ''))) .
184
+                        ' (https://github.com/austinheap/' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : ''))) . ')');
185 185
             if (defined('LARAVEL_SECURITY_TXT_VERSION') || defined('WORDPRESS_SECURITY_TXT_VERSION')) {
186 186
                 $this->comment(
187 187
                     'using "php-security-txt"' . (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : '') .
188 188
                     ' (https://github.com/austinheap/php-security-txt' . (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : '') . ')');
189 189
             }
190 190
             $this->comment('in ' . round((microtime(true) - $time) * 1000, 6) . ' seconds on ' . date('c') . '.')
191
-                 ->comment()
192
-                 ->spacer();
191
+                    ->comment()
192
+                    ->spacer();
193 193
         }
194 194
 
195 195
         $output = implode(PHP_EOL, $this->lines);
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
         $comment = trim($comment);
53 53
 
54 54
         if (!empty($comment)) {
55
-            $comment = ' ' . $comment;
55
+            $comment = ' '.$comment;
56 56
         }
57 57
 
58
-        return $this->line(trim('#' . $comment));
58
+        return $this->line(trim('#'.$comment));
59 59
     }
60 60
 
61 61
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         }
146 146
 
147 147
         foreach (array_keys($this->contacts) as $contact) {
148
-            $this->line('Contact: ' . trim($contact));
148
+            $this->line('Contact: '.trim($contact));
149 149
         }
150 150
 
151 151
         if (!empty($this->encryption)) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                      ->comment('Our PGP key');
155 155
             }
156 156
 
157
-            $this->line('Encryption: ' . trim($this->encryption));
157
+            $this->line('Encryption: '.trim($this->encryption));
158 158
         }
159 159
 
160 160
         if (!empty($this->disclosure)) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                      ->comment('Our disclosure policy');
164 164
             }
165 165
 
166
-            $this->line('Disclosure: ' . trim(ucfirst($this->disclosure)));
166
+            $this->line('Disclosure: '.trim(ucfirst($this->disclosure)));
167 167
         }
168 168
 
169 169
         if (!empty($this->acknowledgement)) {
@@ -172,22 +172,22 @@  discard block
 block discarded – undo
172 172
                      ->comment('Our public acknowledgement');
173 173
             }
174 174
 
175
-            $this->line('Acknowledgement: ' . trim($this->acknowledgement));
175
+            $this->line('Acknowledgement: '.trim($this->acknowledgement));
176 176
         }
177 177
 
178 178
         if ($this->debug && isset($time)) {
179 179
             $this->spacer()
180 180
                  ->comment()
181 181
                  ->comment(
182
-                     'Generated by "' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt"' .
183
-                     (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : ''))) .
184
-                     ' (https://github.com/austinheap/' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : ''))) . ')');
182
+                     'Generated by "'.(defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')).'-security-txt"'.
183
+                     (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v'.LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v'.WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v'.PHP_SECURITY_TXT_VERSION : ''))).
184
+                     ' (https://github.com/austinheap/'.(defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')).'-security-txt'.(defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v'.LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v'.WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v'.PHP_SECURITY_TXT_VERSION : ''))).')');
185 185
             if (defined('LARAVEL_SECURITY_TXT_VERSION') || defined('WORDPRESS_SECURITY_TXT_VERSION')) {
186 186
                 $this->comment(
187
-                    'using "php-security-txt"' . (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : '') .
188
-                    ' (https://github.com/austinheap/php-security-txt' . (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : '') . ')');
187
+                    'using "php-security-txt"'.(defined('PHP_SECURITY_TXT_VERSION') ? ' v'.PHP_SECURITY_TXT_VERSION : '').
188
+                    ' (https://github.com/austinheap/php-security-txt'.(defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v'.PHP_SECURITY_TXT_VERSION : '').')');
189 189
             }
190
-            $this->comment('in ' . round((microtime(true) - $time) * 1000, 6) . ' seconds on ' . date('c') . '.')
190
+            $this->comment('in '.round((microtime(true) - $time) * 1000, 6).' seconds on '.date('c').'.')
191 191
                  ->comment()
192 192
                  ->spacer();
193 193
         }
Please login to merge, or discard this patch.
src/Reader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * @version     v0.3.2
8 8
  */
9 9
 
10
-declare(strict_types=1);
10
+declare(strict_types = 1);
11 11
 
12 12
 namespace AustinHeap\Security\Txt;
13 13
 
Please login to merge, or discard this patch.
src/SecurityTxt.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @version     v0.3.2
8 8
  */
9 9
 
10
-declare(strict_types=1);
10
+declare(strict_types = 1);
11 11
 
12 12
 namespace AustinHeap\Security\Txt;
13 13
 
@@ -28,77 +28,77 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @var string
30 30
      */
31
-    const VERSION               = '0.3.2';
31
+    const VERSION = '0.3.2';
32 32
 
33 33
     /**
34 34
      * Internal parent object.
35 35
      *
36 36
      * @var \AustinHeap\Security\Txt\Writer|\AustinHeap\Security\Txt\Reader
37 37
      */
38
-    private $parent             = null;
38
+    private $parent = null;
39 39
 
40 40
     /**
41 41
      * Internal Writer object.
42 42
      *
43 43
      * @var \AustinHeap\Security\Txt\Writer
44 44
      */
45
-    protected $writer           = null;
45
+    protected $writer = null;
46 46
 
47 47
     /**
48 48
      * Internal Reader object.
49 49
      *
50 50
      * @var \AustinHeap\Security\Txt\Reader
51 51
      */
52
-    protected $reader           = null;
52
+    protected $reader = null;
53 53
 
54 54
     /**
55 55
      * Internal text cache.
56 56
      *
57 57
      * @var string
58 58
      */
59
-    protected $text             = null;
59
+    protected $text = null;
60 60
 
61 61
     /**
62 62
      * Enable debug output.
63 63
      *
64 64
      * @var bool
65 65
      */
66
-    protected $debug            = false;
66
+    protected $debug = false;
67 67
 
68 68
     /**
69 69
      * Enable built-in comments.
70 70
      *
71 71
      * @var bool
72 72
      */
73
-    protected $comments         = true;
73
+    protected $comments = true;
74 74
 
75 75
     /**
76 76
      * The security contact(s).
77 77
      *
78 78
      * @var array
79 79
      */
80
-    protected $contacts         = [];
80
+    protected $contacts = [];
81 81
 
82 82
     /**
83 83
      * The PGP key file URL.
84 84
      *
85 85
      * @var string
86 86
      */
87
-    protected $encryption       = null;
87
+    protected $encryption = null;
88 88
 
89 89
     /**
90 90
      * The disclosure policy.
91 91
      *
92 92
      * @var string
93 93
      */
94
-    protected $disclosure       = null;
94
+    protected $disclosure = null;
95 95
 
96 96
     /**
97 97
      * The acknowledgement URL.
98 98
      *
99 99
      * @var string
100 100
      */
101
-    protected $acknowledgement  = null;
101
+    protected $acknowledgement = null;
102 102
 
103 103
     /**
104 104
      * Create a new SecurityTxt instance.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
         if (!$this->parent instanceof Reader &&
118 118
             !$this->parent instanceof Writer) {
119
-            throw new Exception('Cannot create ' . __CLASS__ . ' with $parent class: ' . get_class($this->parent));
119
+            throw new Exception('Cannot create '.__CLASS__.' with $parent class: '.get_class($this->parent));
120 120
         }
121 121
 
122 122
         return $this;
Please login to merge, or discard this patch.