Completed
Pull Request — develop (#86)
by Igor
03:56
created

AuthSavePermissionsException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setAuthObject() 0 5 1
1
<?php namespace Magestead\Exceptions;
2
3
/**
4
 * Class AuthSavePermissionsException
5
 * @package Magestead\Exceptions
6
 */
7
class AuthSavePermissionsException extends \RuntimeException
8
{
9
    const TPL = "\n\nFile auth.json is not writable. Please add the following content manually: \n%s\n";
10
11
    /**
12
     * @param array $auth
13
     * @return self
14
     */
15
    public function setAuthObject(array $auth)
16
    {
17
        $this->message = sprintf(static::TPL, json_encode($auth, JSON_PRETTY_PRINT));
18
        return $this;
19
    }
20
}
21