@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | * @version v0.3.0 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -declare(strict_types=1); |
|
| 10 | +declare(strict_types = 1); |
|
| 11 | 11 | |
| 12 | 12 | namespace AustinHeap\Security\Txt; |
| 13 | 13 | |
@@ -26,84 +26,84 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var array |
| 28 | 28 | */ |
| 29 | - protected $lines = []; |
|
| 29 | + protected $lines = []; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Internal text cache. |
| 33 | 33 | * |
| 34 | 34 | * @var string |
| 35 | 35 | */ |
| 36 | - protected $text = null; |
|
| 36 | + protected $text = null; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Enable SecurityTxt. |
| 40 | 40 | * |
| 41 | 41 | * @var bool |
| 42 | 42 | */ |
| 43 | - protected $enabled = false; |
|
| 43 | + protected $enabled = false; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Enable debug output. |
| 47 | 47 | * |
| 48 | 48 | * @var bool |
| 49 | 49 | */ |
| 50 | - protected $debug = false; |
|
| 50 | + protected $debug = false; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Enable built-in cache. |
| 54 | 54 | * |
| 55 | 55 | * @var bool |
| 56 | 56 | */ |
| 57 | - protected $cache = false; |
|
| 57 | + protected $cache = false; |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Minutes to cache output. |
| 61 | 61 | * |
| 62 | 62 | * @var int |
| 63 | 63 | */ |
| 64 | - protected $cacheTime = null; |
|
| 64 | + protected $cacheTime = null; |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Cache key to use. |
| 68 | 68 | * |
| 69 | 69 | * @var string |
| 70 | 70 | */ |
| 71 | - protected $cacheKey = 'cache:AustinHeap\Security\Txt\SecurityTxt'; |
|
| 71 | + protected $cacheKey = 'cache:AustinHeap\Security\Txt\SecurityTxt'; |
|
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * Enable built-in comments. |
| 75 | 75 | * |
| 76 | 76 | * @var bool |
| 77 | 77 | */ |
| 78 | - protected $comments = true; |
|
| 78 | + protected $comments = true; |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * The security contacts to list. |
| 82 | 82 | * |
| 83 | 83 | * @var array |
| 84 | 84 | */ |
| 85 | - protected $contacts = []; |
|
| 85 | + protected $contacts = []; |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * The PGP key file URL. |
| 89 | 89 | * |
| 90 | 90 | * @var string |
| 91 | 91 | */ |
| 92 | - protected $encryption = null; |
|
| 92 | + protected $encryption = null; |
|
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * The disclosure policy. |
| 96 | 96 | * |
| 97 | 97 | * @var string |
| 98 | 98 | */ |
| 99 | - protected $disclosure = null; |
|
| 99 | + protected $disclosure = null; |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * The acknowledgement URL. |
| 103 | 103 | * |
| 104 | 104 | * @var string |
| 105 | 105 | */ |
| 106 | - protected $acknowledgement = null; |
|
| 106 | + protected $acknowledgement = null; |
|
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Create a new SecurityTxt instance. |
@@ -113,16 +113,16 @@ discard block |
||
| 113 | 113 | public function __construct() |
| 114 | 114 | { |
| 115 | 115 | $keys = [ |
| 116 | - 'security-txt.enabled' => ['validator' => 'is_bool', 'setter' => 'setEnabled'], |
|
| 117 | - 'security-txt.debug' => ['validator' => 'is_bool', 'setter' => 'setDebug'], |
|
| 118 | - 'security-txt.cache' => ['validator' => 'is_bool', 'setter' => 'setCache'], |
|
| 119 | - 'security-txt.cache-time' => ['validator' => 'is_numeric', 'setter' => 'setCacheTime'], |
|
| 120 | - 'security-txt.cache-key' => ['validator' => 'is_string', 'setter' => 'setCacheKey'], |
|
| 121 | - 'security-txt.comments' => ['validator' => 'is_bool', 'setter' => 'setComments'], |
|
| 122 | - 'security-txt.contacts' => ['validator' => 'is_array', 'setter' => 'setContacts'], |
|
| 123 | - 'security-txt.encryption' => ['validator' => 'is_string', 'setter' => 'setEncryption'], |
|
| 124 | - 'security-txt.disclosure' => ['validator' => 'is_string', 'setter' => 'setDisclosure'], |
|
| 125 | - 'security-txt.acknowledgement' => ['validator' => 'is_string', 'setter' => 'setAcknowledgement'], |
|
| 116 | + 'security-txt.enabled' => ['validator' => 'is_bool', 'setter' => 'setEnabled'], |
|
| 117 | + 'security-txt.debug' => ['validator' => 'is_bool', 'setter' => 'setDebug'], |
|
| 118 | + 'security-txt.cache' => ['validator' => 'is_bool', 'setter' => 'setCache'], |
|
| 119 | + 'security-txt.cache-time' => ['validator' => 'is_numeric', 'setter' => 'setCacheTime'], |
|
| 120 | + 'security-txt.cache-key' => ['validator' => 'is_string', 'setter' => 'setCacheKey'], |
|
| 121 | + 'security-txt.comments' => ['validator' => 'is_bool', 'setter' => 'setComments'], |
|
| 122 | + 'security-txt.contacts' => ['validator' => 'is_array', 'setter' => 'setContacts'], |
|
| 123 | + 'security-txt.encryption' => ['validator' => 'is_string', 'setter' => 'setEncryption'], |
|
| 124 | + 'security-txt.disclosure' => ['validator' => 'is_string', 'setter' => 'setDisclosure'], |
|
| 125 | + 'security-txt.acknowledgement' => ['validator' => 'is_string', 'setter' => 'setAcknowledgement'], |
|
| 126 | 126 | ]; |
| 127 | 127 | |
| 128 | 128 | foreach ($keys as $key => $mapping) |
@@ -164,14 +164,14 @@ discard block |
||
| 164 | 164 | throw new \Exception('One (or more) contacts must be defined.'); |
| 165 | 165 | |
| 166 | 166 | foreach ($this->contacts as $contact) |
| 167 | - $this->addLine('Contact: ' . trim($contact)); |
|
| 167 | + $this->addLine('Contact: '.trim($contact)); |
|
| 168 | 168 | |
| 169 | 169 | if (!empty($this->encryption)) { |
| 170 | 170 | if ($this->comments) |
| 171 | 171 | $this->addSpacer() |
| 172 | 172 | ->addComment('Our PGP key'); |
| 173 | 173 | |
| 174 | - $this->addLine('Encryption: ' . trim($this->encryption)); |
|
| 174 | + $this->addLine('Encryption: '.trim($this->encryption)); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | if (!empty($this->disclosure)) { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $this->addSpacer() |
| 180 | 180 | ->addComment('Our disclosure policy'); |
| 181 | 181 | |
| 182 | - $this->addLine('Disclosure: ' . trim(ucfirst($this->disclosure))); |
|
| 182 | + $this->addLine('Disclosure: '.trim(ucfirst($this->disclosure))); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | if (!empty($this->acknowledgement)) { |
@@ -187,16 +187,16 @@ discard block |
||
| 187 | 187 | $this->addSpacer() |
| 188 | 188 | ->addComment('Our public acknowledgement'); |
| 189 | 189 | |
| 190 | - $this->addLine('Acknowledgement: ' . trim($this->acknowledgement)); |
|
| 190 | + $this->addLine('Acknowledgement: '.trim($this->acknowledgement)); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if ($this->debug) |
| 194 | 194 | $this->addSpacer() |
| 195 | 195 | ->addComment() |
| 196 | 196 | ->addComment('Generated by https://github.com/austinheap/laravel-security-txt') |
| 197 | - ->addComment('in ' . round((microtime(true) - $time) * 1000, 6) . ' seconds on ' . now() . '.') |
|
| 197 | + ->addComment('in '.round((microtime(true) - $time) * 1000, 6).' seconds on '.now().'.') |
|
| 198 | 198 | ->addComment() |
| 199 | - ->addComment('Cache is ' . ($this->cache ? 'enabled with key "' . $this->cacheKey . '"' : 'disabled') . '.') |
|
| 199 | + ->addComment('Cache is '.($this->cache ? 'enabled with key "'.$this->cacheKey.'"' : 'disabled').'.') |
|
| 200 | 200 | ->addComment() |
| 201 | 201 | ->addSpacer(); |
| 202 | 202 | |
@@ -619,9 +619,9 @@ discard block |
||
| 619 | 619 | $comment = trim($comment); |
| 620 | 620 | |
| 621 | 621 | if (!empty($comment)) |
| 622 | - $comment = ' ' . $comment; |
|
| 622 | + $comment = ' '.$comment; |
|
| 623 | 623 | |
| 624 | - return $this->addLine('#' . $comment); |
|
| 624 | + return $this->addLine('#'.$comment); |
|
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | /** |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | * @version v0.3.0 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -declare(strict_types=1); |
|
| 10 | +declare(strict_types = 1); |
|
| 11 | 11 | |
| 12 | 12 | namespace AustinHeap\Security\Txt; |
| 13 | 13 | |
@@ -26,84 +26,84 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var array |
| 28 | 28 | */ |
| 29 | - protected $lines = []; |
|
| 29 | + protected $lines = []; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Internal text cache. |
| 33 | 33 | * |
| 34 | 34 | * @var string |
| 35 | 35 | */ |
| 36 | - protected $text = null; |
|
| 36 | + protected $text = null; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Enable SecurityTxt. |
| 40 | 40 | * |
| 41 | 41 | * @var bool |
| 42 | 42 | */ |
| 43 | - protected $enabled = false; |
|
| 43 | + protected $enabled = false; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Enable debug output. |
| 47 | 47 | * |
| 48 | 48 | * @var bool |
| 49 | 49 | */ |
| 50 | - protected $debug = false; |
|
| 50 | + protected $debug = false; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Enable built-in cache. |
| 54 | 54 | * |
| 55 | 55 | * @var bool |
| 56 | 56 | */ |
| 57 | - protected $cache = false; |
|
| 57 | + protected $cache = false; |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Minutes to cache output. |
| 61 | 61 | * |
| 62 | 62 | * @var int |
| 63 | 63 | */ |
| 64 | - protected $cacheTime = null; |
|
| 64 | + protected $cacheTime = null; |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Cache key to use. |
| 68 | 68 | * |
| 69 | 69 | * @var string |
| 70 | 70 | */ |
| 71 | - protected $cacheKey = 'cache:AustinHeap\Security\Txt\SecurityTxt'; |
|
| 71 | + protected $cacheKey = 'cache:AustinHeap\Security\Txt\SecurityTxt'; |
|
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * Enable built-in comments. |
| 75 | 75 | * |
| 76 | 76 | * @var bool |
| 77 | 77 | */ |
| 78 | - protected $comments = true; |
|
| 78 | + protected $comments = true; |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * The security contacts to list. |
| 82 | 82 | * |
| 83 | 83 | * @var array |
| 84 | 84 | */ |
| 85 | - protected $contacts = []; |
|
| 85 | + protected $contacts = []; |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * The PGP key file URL. |
| 89 | 89 | * |
| 90 | 90 | * @var string |
| 91 | 91 | */ |
| 92 | - protected $encryption = null; |
|
| 92 | + protected $encryption = null; |
|
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * The disclosure policy. |
| 96 | 96 | * |
| 97 | 97 | * @var string |
| 98 | 98 | */ |
| 99 | - protected $disclosure = null; |
|
| 99 | + protected $disclosure = null; |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * The acknowledgement URL. |
| 103 | 103 | * |
| 104 | 104 | * @var string |
| 105 | 105 | */ |
| 106 | - protected $acknowledgement = null; |
|
| 106 | + protected $acknowledgement = null; |
|
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Create a new SecurityTxt instance. |
@@ -113,16 +113,16 @@ discard block |
||
| 113 | 113 | public function __construct() |
| 114 | 114 | { |
| 115 | 115 | $keys = [ |
| 116 | - 'security-txt.enabled' => ['validator' => 'is_bool', 'setter' => 'setEnabled'], |
|
| 117 | - 'security-txt.debug' => ['validator' => 'is_bool', 'setter' => 'setDebug'], |
|
| 118 | - 'security-txt.cache' => ['validator' => 'is_bool', 'setter' => 'setCache'], |
|
| 119 | - 'security-txt.cache-time' => ['validator' => 'is_numeric', 'setter' => 'setCacheTime'], |
|
| 120 | - 'security-txt.cache-key' => ['validator' => 'is_string', 'setter' => 'setCacheKey'], |
|
| 121 | - 'security-txt.comments' => ['validator' => 'is_bool', 'setter' => 'setComments'], |
|
| 122 | - 'security-txt.contacts' => ['validator' => 'is_array', 'setter' => 'setContacts'], |
|
| 123 | - 'security-txt.encryption' => ['validator' => 'is_string', 'setter' => 'setEncryption'], |
|
| 124 | - 'security-txt.disclosure' => ['validator' => 'is_string', 'setter' => 'setDisclosure'], |
|
| 125 | - 'security-txt.acknowledgement' => ['validator' => 'is_string', 'setter' => 'setAcknowledgement'], |
|
| 116 | + 'security-txt.enabled' => ['validator' => 'is_bool', 'setter' => 'setEnabled'], |
|
| 117 | + 'security-txt.debug' => ['validator' => 'is_bool', 'setter' => 'setDebug'], |
|
| 118 | + 'security-txt.cache' => ['validator' => 'is_bool', 'setter' => 'setCache'], |
|
| 119 | + 'security-txt.cache-time' => ['validator' => 'is_numeric', 'setter' => 'setCacheTime'], |
|
| 120 | + 'security-txt.cache-key' => ['validator' => 'is_string', 'setter' => 'setCacheKey'], |
|
| 121 | + 'security-txt.comments' => ['validator' => 'is_bool', 'setter' => 'setComments'], |
|
| 122 | + 'security-txt.contacts' => ['validator' => 'is_array', 'setter' => 'setContacts'], |
|
| 123 | + 'security-txt.encryption' => ['validator' => 'is_string', 'setter' => 'setEncryption'], |
|
| 124 | + 'security-txt.disclosure' => ['validator' => 'is_string', 'setter' => 'setDisclosure'], |
|
| 125 | + 'security-txt.acknowledgement' => ['validator' => 'is_string', 'setter' => 'setAcknowledgement'], |
|
| 126 | 126 | ]; |
| 127 | 127 | |
| 128 | 128 | foreach ($keys as $key => $mapping) |
@@ -164,14 +164,14 @@ discard block |
||
| 164 | 164 | throw new \Exception('One (or more) contacts must be defined.'); |
| 165 | 165 | |
| 166 | 166 | foreach ($this->contacts as $contact) |
| 167 | - $this->addLine('Contact: ' . trim($contact)); |
|
| 167 | + $this->addLine('Contact: '.trim($contact)); |
|
| 168 | 168 | |
| 169 | 169 | if (!empty($this->encryption)) { |
| 170 | 170 | if ($this->comments) |
| 171 | 171 | $this->addSpacer() |
| 172 | 172 | ->addComment('Our PGP key'); |
| 173 | 173 | |
| 174 | - $this->addLine('Encryption: ' . trim($this->encryption)); |
|
| 174 | + $this->addLine('Encryption: '.trim($this->encryption)); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | if (!empty($this->disclosure)) { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $this->addSpacer() |
| 180 | 180 | ->addComment('Our disclosure policy'); |
| 181 | 181 | |
| 182 | - $this->addLine('Disclosure: ' . trim(ucfirst($this->disclosure))); |
|
| 182 | + $this->addLine('Disclosure: '.trim(ucfirst($this->disclosure))); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | if (!empty($this->acknowledgement)) { |
@@ -187,16 +187,16 @@ discard block |
||
| 187 | 187 | $this->addSpacer() |
| 188 | 188 | ->addComment('Our public acknowledgement'); |
| 189 | 189 | |
| 190 | - $this->addLine('Acknowledgement: ' . trim($this->acknowledgement)); |
|
| 190 | + $this->addLine('Acknowledgement: '.trim($this->acknowledgement)); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if ($this->debug) |
| 194 | 194 | $this->addSpacer() |
| 195 | 195 | ->addComment() |
| 196 | 196 | ->addComment('Generated by https://github.com/austinheap/laravel-security-txt') |
| 197 | - ->addComment('in ' . round((microtime(true) - $time) * 1000, 6) . ' seconds on ' . now() . '.') |
|
| 197 | + ->addComment('in '.round((microtime(true) - $time) * 1000, 6).' seconds on '.now().'.') |
|
| 198 | 198 | ->addComment() |
| 199 | - ->addComment('Cache is ' . ($this->cache ? 'enabled with key "' . $this->cacheKey . '"' : 'disabled') . '.') |
|
| 199 | + ->addComment('Cache is '.($this->cache ? 'enabled with key "'.$this->cacheKey.'"' : 'disabled').'.') |
|
| 200 | 200 | ->addComment() |
| 201 | 201 | ->addSpacer(); |
| 202 | 202 | |
@@ -619,9 +619,9 @@ discard block |
||
| 619 | 619 | $comment = trim($comment); |
| 620 | 620 | |
| 621 | 621 | if (!empty($comment)) |
| 622 | - $comment = ' ' . $comment; |
|
| 622 | + $comment = ' '.$comment; |
|
| 623 | 623 | |
| 624 | - return $this->addLine('#' . $comment); |
|
| 624 | + return $this->addLine('#'.$comment); |
|
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | /** |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | * @version v0.3.0 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -declare(strict_types=1); |
|
| 10 | +declare(strict_types = 1); |
|
| 11 | 11 | |
| 12 | 12 | namespace AustinHeap\Security\Txt; |
| 13 | 13 | |
@@ -26,84 +26,84 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var array |
| 28 | 28 | */ |
| 29 | - protected $lines = []; |
|
| 29 | + protected $lines = []; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Internal text cache. |
| 33 | 33 | * |
| 34 | 34 | * @var string |
| 35 | 35 | */ |
| 36 | - protected $text = null; |
|
| 36 | + protected $text = null; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Enable SecurityTxt. |
| 40 | 40 | * |
| 41 | 41 | * @var bool |
| 42 | 42 | */ |
| 43 | - protected $enabled = false; |
|
| 43 | + protected $enabled = false; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Enable debug output. |
| 47 | 47 | * |
| 48 | 48 | * @var bool |
| 49 | 49 | */ |
| 50 | - protected $debug = false; |
|
| 50 | + protected $debug = false; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Enable built-in cache. |
| 54 | 54 | * |
| 55 | 55 | * @var bool |
| 56 | 56 | */ |
| 57 | - protected $cache = false; |
|
| 57 | + protected $cache = false; |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Minutes to cache output. |
| 61 | 61 | * |
| 62 | 62 | * @var int |
| 63 | 63 | */ |
| 64 | - protected $cacheTime = null; |
|
| 64 | + protected $cacheTime = null; |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Cache key to use. |
| 68 | 68 | * |
| 69 | 69 | * @var string |
| 70 | 70 | */ |
| 71 | - protected $cacheKey = 'cache:AustinHeap\Security\Txt\SecurityTxt'; |
|
| 71 | + protected $cacheKey = 'cache:AustinHeap\Security\Txt\SecurityTxt'; |
|
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * Enable built-in comments. |
| 75 | 75 | * |
| 76 | 76 | * @var bool |
| 77 | 77 | */ |
| 78 | - protected $comments = true; |
|
| 78 | + protected $comments = true; |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * The security contacts to list. |
| 82 | 82 | * |
| 83 | 83 | * @var array |
| 84 | 84 | */ |
| 85 | - protected $contacts = []; |
|
| 85 | + protected $contacts = []; |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * The PGP key file URL. |
| 89 | 89 | * |
| 90 | 90 | * @var string |
| 91 | 91 | */ |
| 92 | - protected $encryption = null; |
|
| 92 | + protected $encryption = null; |
|
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * The disclosure policy. |
| 96 | 96 | * |
| 97 | 97 | * @var string |
| 98 | 98 | */ |
| 99 | - protected $disclosure = null; |
|
| 99 | + protected $disclosure = null; |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * The acknowledgement URL. |
| 103 | 103 | * |
| 104 | 104 | * @var string |
| 105 | 105 | */ |
| 106 | - protected $acknowledgement = null; |
|
| 106 | + protected $acknowledgement = null; |
|
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Create a new SecurityTxt instance. |
@@ -113,16 +113,16 @@ discard block |
||
| 113 | 113 | public function __construct() |
| 114 | 114 | { |
| 115 | 115 | $keys = [ |
| 116 | - 'security-txt.enabled' => ['validator' => 'is_bool', 'setter' => 'setEnabled'], |
|
| 117 | - 'security-txt.debug' => ['validator' => 'is_bool', 'setter' => 'setDebug'], |
|
| 118 | - 'security-txt.cache' => ['validator' => 'is_bool', 'setter' => 'setCache'], |
|
| 119 | - 'security-txt.cache-time' => ['validator' => 'is_numeric', 'setter' => 'setCacheTime'], |
|
| 120 | - 'security-txt.cache-key' => ['validator' => 'is_string', 'setter' => 'setCacheKey'], |
|
| 121 | - 'security-txt.comments' => ['validator' => 'is_bool', 'setter' => 'setComments'], |
|
| 122 | - 'security-txt.contacts' => ['validator' => 'is_array', 'setter' => 'setContacts'], |
|
| 123 | - 'security-txt.encryption' => ['validator' => 'is_string', 'setter' => 'setEncryption'], |
|
| 124 | - 'security-txt.disclosure' => ['validator' => 'is_string', 'setter' => 'setDisclosure'], |
|
| 125 | - 'security-txt.acknowledgement' => ['validator' => 'is_string', 'setter' => 'setAcknowledgement'], |
|
| 116 | + 'security-txt.enabled' => ['validator' => 'is_bool', 'setter' => 'setEnabled'], |
|
| 117 | + 'security-txt.debug' => ['validator' => 'is_bool', 'setter' => 'setDebug'], |
|
| 118 | + 'security-txt.cache' => ['validator' => 'is_bool', 'setter' => 'setCache'], |
|
| 119 | + 'security-txt.cache-time' => ['validator' => 'is_numeric', 'setter' => 'setCacheTime'], |
|
| 120 | + 'security-txt.cache-key' => ['validator' => 'is_string', 'setter' => 'setCacheKey'], |
|
| 121 | + 'security-txt.comments' => ['validator' => 'is_bool', 'setter' => 'setComments'], |
|
| 122 | + 'security-txt.contacts' => ['validator' => 'is_array', 'setter' => 'setContacts'], |
|
| 123 | + 'security-txt.encryption' => ['validator' => 'is_string', 'setter' => 'setEncryption'], |
|
| 124 | + 'security-txt.disclosure' => ['validator' => 'is_string', 'setter' => 'setDisclosure'], |
|
| 125 | + 'security-txt.acknowledgement' => ['validator' => 'is_string', 'setter' => 'setAcknowledgement'], |
|
| 126 | 126 | ]; |
| 127 | 127 | |
| 128 | 128 | foreach ($keys as $key => $mapping) |
@@ -164,14 +164,14 @@ discard block |
||
| 164 | 164 | throw new \Exception('One (or more) contacts must be defined.'); |
| 165 | 165 | |
| 166 | 166 | foreach ($this->contacts as $contact) |
| 167 | - $this->addLine('Contact: ' . trim($contact)); |
|
| 167 | + $this->addLine('Contact: '.trim($contact)); |
|
| 168 | 168 | |
| 169 | 169 | if (!empty($this->encryption)) { |
| 170 | 170 | if ($this->comments) |
| 171 | 171 | $this->addSpacer() |
| 172 | 172 | ->addComment('Our PGP key'); |
| 173 | 173 | |
| 174 | - $this->addLine('Encryption: ' . trim($this->encryption)); |
|
| 174 | + $this->addLine('Encryption: '.trim($this->encryption)); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | if (!empty($this->disclosure)) { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $this->addSpacer() |
| 180 | 180 | ->addComment('Our disclosure policy'); |
| 181 | 181 | |
| 182 | - $this->addLine('Disclosure: ' . trim(ucfirst($this->disclosure))); |
|
| 182 | + $this->addLine('Disclosure: '.trim(ucfirst($this->disclosure))); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | if (!empty($this->acknowledgement)) { |
@@ -187,16 +187,16 @@ discard block |
||
| 187 | 187 | $this->addSpacer() |
| 188 | 188 | ->addComment('Our public acknowledgement'); |
| 189 | 189 | |
| 190 | - $this->addLine('Acknowledgement: ' . trim($this->acknowledgement)); |
|
| 190 | + $this->addLine('Acknowledgement: '.trim($this->acknowledgement)); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if ($this->debug) |
| 194 | 194 | $this->addSpacer() |
| 195 | 195 | ->addComment() |
| 196 | 196 | ->addComment('Generated by https://github.com/austinheap/laravel-security-txt') |
| 197 | - ->addComment('in ' . round((microtime(true) - $time) * 1000, 6) . ' seconds on ' . now() . '.') |
|
| 197 | + ->addComment('in '.round((microtime(true) - $time) * 1000, 6).' seconds on '.now().'.') |
|
| 198 | 198 | ->addComment() |
| 199 | - ->addComment('Cache is ' . ($this->cache ? 'enabled with key "' . $this->cacheKey . '"' : 'disabled') . '.') |
|
| 199 | + ->addComment('Cache is '.($this->cache ? 'enabled with key "'.$this->cacheKey.'"' : 'disabled').'.') |
|
| 200 | 200 | ->addComment() |
| 201 | 201 | ->addSpacer(); |
| 202 | 202 | |
@@ -619,9 +619,9 @@ discard block |
||
| 619 | 619 | $comment = trim($comment); |
| 620 | 620 | |
| 621 | 621 | if (!empty($comment)) |
| 622 | - $comment = ' ' . $comment; |
|
| 622 | + $comment = ' '.$comment; |
|
| 623 | 623 | |
| 624 | - return $this->addLine('#' . $comment); |
|
| 624 | + return $this->addLine('#'.$comment); |
|
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | /** |