Skip to content

Commit 336dd3e

Browse files
committed
Spacings fixed
1 parent 291201c commit 336dd3e

File tree

7 files changed

+64
-64
lines changed

7 files changed

+64
-64
lines changed

src/IMAP/Attachment.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function __construct(Message $oMessage, $structure, $part_number = 1) {
9292
/**
9393
* Determine the structure type
9494
*/
95-
protected function findType(){
95+
protected function findType() {
9696
switch ($this->structure->type) {
9797
case self::TYPE_MESSAGE:
9898
$this->type = 'message';
@@ -124,7 +124,7 @@ protected function findType(){
124124
/**
125125
* Fetch the given attachment
126126
*/
127-
protected function fetch(){
127+
protected function fetch() {
128128

129129
$content = imap_fetchbody($this->oMessage->getClient()->getConnection(), $this->oMessage->getUid(), $this->part_number, $this->oMessage->getFetchOptions());
130130

@@ -145,8 +145,8 @@ protected function fetch(){
145145
}
146146
}
147147

148-
if(self::TYPE_MESSAGE == $this->structure->type) {
149-
if($this->structure->ifdescription) {
148+
if (self::TYPE_MESSAGE == $this->structure->type) {
149+
if ($this->structure->ifdescription) {
150150
$this->name = $this->structure->description;
151151
} else {
152152
$this->name = $this->structure->subtype;
@@ -176,7 +176,7 @@ protected function fetch(){
176176
*
177177
* @return boolean
178178
*/
179-
public function save($path = null, $filename = null){
179+
public function save($path = null, $filename = null) {
180180
$path = $path ?: storage_path();
181181
$filename = $filename ?: $this->getName();
182182

@@ -188,49 +188,49 @@ public function save($path = null, $filename = null){
188188
/**
189189
* @return null|string
190190
*/
191-
public function getContent(){
191+
public function getContent() {
192192
return $this->content;
193193
}
194194

195195
/**
196196
* @return null|string
197197
*/
198-
public function getType(){
198+
public function getType() {
199199
return $this->type;
200200
}
201201

202202
/**
203203
* @return null|string
204204
*/
205-
public function getContentType(){
205+
public function getContentType() {
206206
return $this->content_type;
207207
}
208208

209209
/**
210210
* @return null|string
211211
*/
212-
public function getId(){
212+
public function getId() {
213213
return $this->id;
214214
}
215215

216216
/**
217217
* @return null|string
218218
*/
219-
public function getName(){
219+
public function getName() {
220220
return $this->name;
221221
}
222222

223223
/**
224224
* @return null|string
225225
*/
226-
public function getDisposition(){
226+
public function getDisposition() {
227227
return $this->disposition;
228228
}
229229

230230
/**
231231
* @return null|string
232232
*/
233-
public function getImgSrc(){
233+
public function getImgSrc() {
234234
return $this->img_src;
235235
}
236236
}

src/IMAP/Client.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function setConfig(array $config) {
135135
$defaultAccount = config('imap.default');
136136
$defaultConfig = config("imap.accounts.$defaultAccount");
137137

138-
foreach($this->validConfigKeys as $key){
138+
foreach ($this->validConfigKeys as $key) {
139139
$this->$key = isset($config[$key]) ? $config[$key] : $defaultConfig[$key];
140140
}
141141

@@ -147,7 +147,7 @@ public function setConfig(array $config) {
147147
*
148148
* @return resource
149149
*/
150-
public function getConnection(){
150+
public function getConnection() {
151151
return $this->connection;
152152
}
153153

@@ -213,7 +213,7 @@ public function connect($attempts = 3) {
213213
$attempts,
214214
config('imap.options.open')
215215
);
216-
$this->connected = !! $this->connection;
216+
$this->connected = !!$this->connection;
217217
} catch (\ErrorException $e) {
218218
$errors = imap_errors();
219219
$message = $e->getMessage().'. '.implode("; ", (is_array($errors) ? $errors : array()));
@@ -232,7 +232,7 @@ public function connect($attempts = 3) {
232232
public function disconnect() {
233233
if ($this->isConnected()) {
234234
$this->errors = array_merge($this->errors, imap_errors() ?: []);
235-
$this->connected = ! imap_close($this->connection, CL_EXPUNGE);
235+
$this->connected = !imap_close($this->connection, CL_EXPUNGE);
236236
}
237237

238238
return $this;
@@ -249,11 +249,11 @@ public function disconnect() {
249249
*
250250
* @return Folder
251251
*/
252-
public function getFolder($folder_name, $attributes = 32, $delimiter = null){
252+
public function getFolder($folder_name, $attributes = 32, $delimiter = null) {
253253

254254
$delimiter = $delimiter == null ? config('imap.options.delimiter', '/') : $delimiter;
255255

256-
$oFolder = new Folder($this, (object)[
256+
$oFolder = new Folder($this, (object) [
257257
'name' => $this->getAddress().$folder_name,
258258
'attributes' => $attributes,
259259
'delimiter' => $delimiter
@@ -320,7 +320,7 @@ public function openFolder(Folder $folder, $attempts = 3) {
320320
*
321321
* @return bool
322322
*/
323-
public function createFolder($name){
323+
public function createFolder($name) {
324324
return imap_createmailbox($this->connection, imap_utf7_encode($name));
325325
}
326326

@@ -419,7 +419,7 @@ protected function getAddress() {
419419
*
420420
* @return array
421421
*/
422-
public function getQuota(){
422+
public function getQuota() {
423423
return imap_get_quota($this->connection, 'user.'.$this->username);
424424
}
425425

@@ -430,7 +430,7 @@ public function getQuota(){
430430
*
431431
* @return array
432432
*/
433-
public function getQuotaRoot($quota_root = 'INBOX'){
433+
public function getQuotaRoot($quota_root = 'INBOX') {
434434
return imap_get_quotaroot($this->connection, $quota_root);
435435
}
436436

@@ -439,7 +439,7 @@ public function getQuotaRoot($quota_root = 'INBOX'){
439439
*
440440
* @return int
441441
*/
442-
public function countMessages(){
442+
public function countMessages() {
443443
return imap_num_msg($this->connection);
444444
}
445445

@@ -448,7 +448,7 @@ public function countMessages(){
448448
*
449449
* @return int
450450
*/
451-
public function countRecentMessages(){
451+
public function countRecentMessages() {
452452
return imap_num_recent($this->connection);
453453
}
454454

@@ -457,7 +457,7 @@ public function countRecentMessages(){
457457
*
458458
* @return array
459459
*/
460-
public function getAlerts(){
460+
public function getAlerts() {
461461
return imap_alerts();
462462
}
463463

@@ -466,7 +466,7 @@ public function getAlerts(){
466466
*
467467
* @return array
468468
*/
469-
public function getErrors(){
469+
public function getErrors() {
470470
$this->errors = array_merge($this->errors, imap_errors() ?: []);
471471

472472
return $this->errors;
@@ -477,7 +477,7 @@ public function getErrors(){
477477
*
478478
* @return string
479479
*/
480-
public function getLastError(){
480+
public function getLastError() {
481481
return imap_last_error();
482482
}
483483

@@ -486,7 +486,7 @@ public function getLastError(){
486486
*
487487
* @return bool
488488
*/
489-
public function expunge(){
489+
public function expunge() {
490490
return imap_expunge($this->connection);
491491
}
492492

@@ -501,7 +501,7 @@ public function expunge(){
501501
* Recent [int(0)] number of recent messages in the mailbox
502502
* }
503503
*/
504-
public function checkCurrentMailbox(){
504+
public function checkCurrentMailbox() {
505505
return imap_check($this->connection);
506506
}
507507
}

src/IMAP/ClientManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function account($name = null) {
5353
// If the connection has not been resolved yet we will resolve it now as all
5454
// of the connections are resolved when they are actually needed so we do
5555
// not make any unnecessary connection to the various queue end-points.
56-
if (! isset($this->accounts[$name])) {
56+
if (!isset($this->accounts[$name])) {
5757
$this->accounts[$name] = $this->resolve($name);
5858
}
5959

src/IMAP/Folder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function searchMessages(array $where, $fetch_options = null, $parse_body
272272
foreach($where as $statement){
273273
if(count($statement) == 1){
274274
$query .= $statement[0];
275-
}else{
275+
} else{
276276
$query .= $statement[0].' "'.$statement[1].'"';
277277
}
278278
}

0 commit comments

Comments
 (0)