Passed
Push — master ( 402c4e...5c8b3b )
by y
02:19
created
src/Api/LoggerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,5 +12,5 @@
 block discarded – undo
12 12
      * @param string $path
13 13
      * @param null|array $payload
14 14
      */
15
-    public function log (string $info, string $path, ?array $payload): void;
15
+    public function log(string $info, string $path, ?array $payload): void;
16 16
 }
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
src/Api/Laravel/AsanaServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 
12 12
     const NAME = 'asana';
13 13
 
14
-    public function boot () {
14
+    public function boot() {
15 15
         $this->mergeConfigFrom(App::configPath('asana.php'), self::NAME);
16 16
     }
17 17
 
18
-    public function register () {
18
+    public function register() {
19 19
         $this->app->singleton(self::NAME, function($app) {
20 20
             $config = $app->config->get(self::NAME);
21 21
             return new Api($config['token']);
Please login to merge, or discard this patch.
src/Api/Laravel/Facade/Asana.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@
 block discarded – undo
46 46
  */
47 47
 class Asana extends Facade {
48 48
 
49
-    public static function getFacadeAccessor () {
49
+    public static function getFacadeAccessor() {
50 50
         return AsanaServiceProvider::NAME;
51 51
     }
52 52
 
53 53
     /**
54 54
      * @return Api
55 55
      */
56
-    public static function getFacadeRoot () {
56
+    public static function getFacadeRoot() {
57 57
         return parent::getFacadeRoot();
58 58
     }
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
src/Api/SimpleCache.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param Api $api
37 37
      * @param PSR16 $cache
38 38
      */
39
-    public function __construct (Api $api, PSR16 $cache) {
39
+    public function __construct(Api $api, PSR16 $cache) {
40 40
         $this->api = $api;
41 41
         $this->cache = $cache;
42 42
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @inheritDoc
46 46
      * @throws InvalidArgumentException
47 47
      */
48
-    public function add (AbstractEntity $entity): void {
48
+    public function add(AbstractEntity $entity): void {
49 49
         if ($gid = $entity->getGid() and !$entity->isDiff()) {
50 50
             parent::add($entity);
51 51
             foreach ($this->getKeys($entity) as $key) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     /**
61 61
      * @inheritDoc
62 62
      */
63
-    public function get (string $key, $caller, Closure $factory) {
63
+    public function get(string $key, $caller, Closure $factory) {
64 64
         return parent::get($key, $caller, function($caller) use ($key, $factory) {
65 65
             /** @var null|string|AbstractEntity $entity */
66 66
             if ($entity = $this->cache->get($key)) { // hit?
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * @param Api|Data $caller
105 105
      * @return AbstractEntity
106 106
      */
107
-    protected function hydrate (AbstractEntity $proto, $caller) {
107
+    protected function hydrate(AbstractEntity $proto, $caller) {
108 108
         return $this->api->factory(get_class($proto), $caller, $proto->toArray());
109 109
     }
110 110
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      * @inheritDoc
113 113
      * @throws InvalidArgumentException
114 114
      */
115
-    public function remove (AbstractEntity $entity): void {
115
+    public function remove(AbstractEntity $entity): void {
116 116
         parent::remove($entity);
117 117
         $this->cache->deleteMultiple($this->getKeys($entity));
118 118
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
                     /** @var null|AbstractEntity $entity */
69 69
                     if ($entity = $this->get($entity, $caller, $factory)) {
70 70
                         $this->cache->set($key, $entity->getGid()); // renew potentially nonstandard key
71
-                    }
72
-                    else {
71
+                    } else {
73 72
                         $this->cache->delete($key); // remove invalid key
74 73
                     }
75 74
                     return $entity; // null or hydrated. parent calls add()
Please login to merge, or discard this patch.
src/Api/Logger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      *
13 13
      * @inheritDoc
14 14
      */
15
-    public function log (string $info, string $path, ?array $payload): void {
15
+    public function log(string $info, string $path, ?array $payload): void {
16 16
         // stub
17 17
     }
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
src/Error.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     protected $curlInfo;
22 22
 
23
-    public function __construct (int $code, string $message, array $curlInfo) {
23
+    public function __construct(int $code, string $message, array $curlInfo) {
24 24
         parent::__construct($message, $code);
25 25
         $this->curlInfo = $curlInfo;
26 26
     }
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     /**
29 29
      * @return array
30 30
      */
31
-    public function getCurlInfo (): array {
31
+    public function getCurlInfo(): array {
32 32
         return $this->curlInfo;
33 33
     }
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
src/Base/AbstractEntity/CreateTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
      *
16 16
      * @return string
17 17
      */
18
-    abstract protected function _getDir (): string;
18
+    abstract protected function _getDir(): string;
19 19
 
20 20
     /**
21 21
      * `POST`
22 22
      *
23 23
      * @return $this
24 24
      */
25
-    public function create () {
25
+    public function create() {
26 26
         /** @var Api $api */
27 27
         $api = $this->api;
28 28
         $remote = $api->post($this->_getDir(), $this->_getPatch(), ['expand' => 'this']);
Please login to merge, or discard this patch.
src/Base/AbstractEntity/DeleteTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     /**
14 14
      * `DELETE`
15 15
      */
16
-    public function delete (): void {
16
+    public function delete(): void {
17 17
         /** @var Api $api */
18 18
         $api = $this->api;
19 19
         $api->delete($this);
Please login to merge, or discard this patch.
src/Base/AbstractEntity/UpdateTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      *
16 16
      * @return $this
17 17
      */
18
-    public function update () {
18
+    public function update() {
19 19
         if ($this->isDiff()) {
20 20
             /** @var Api $api */
21 21
             $api = $this->api;
Please login to merge, or discard this patch.