Completed
Pull Request — master (#6)
by
unknown
01:50
created
src/Fetcher.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,6 +100,9 @@  discard block
 block discarded – undo
100 100
             $this->getOrDefault($item['volumeInfo'], 'categories', []));
101 101
     }
102 102
 
103
+    /**
104
+     * @param string $key
105
+     */
103 106
     private function getOrDefault($array, $key, $default)
104 107
     {
105 108
         if (array_key_exists($key, $array)) {
@@ -114,7 +117,7 @@  discard block
 block discarded – undo
114 117
      *
115 118
      * @param string $isbn
116 119
      *
117
-     * @return bool
120
+     * @return integer
118 121
      */
119 122
     private function isValidISBN($isbn)
120 123
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,18 +70,18 @@
 block discarded – undo
70 70
             $publishedDateFormat = 'Y-m-d';
71 71
             $publishedDate = DateTime::createFromFormat('Y-m-d|', $item['volumeInfo']['publishedDate']);
72 72
 
73
-            if($publishedDate == false){
73
+            if ($publishedDate == false) {
74 74
                 $publishedDateFormat = 'Y-m';
75 75
                 $publishedDate = DateTime::createFromFormat('Y-m|', $item['volumeInfo']['publishedDate']);
76 76
             }
77 77
 
78
-            if($publishedDate == false){
78
+            if ($publishedDate == false) {
79 79
                 $publishedDateFormat = 'Y';
80 80
                 $publishedDate = DateTime::createFromFormat('Y|', $item['volumeInfo']['publishedDate']);
81 81
             }
82 82
 
83 83
             if ($publishedDate == false) {
84
-                throw new \Exception('Was not hable to parse publishedDate: ' . $item['volumeInfo']['publishedDate']);
84
+                throw new \Exception('Was not hable to parse publishedDate: '.$item['volumeInfo']['publishedDate']);
85 85
             }
86 86
 
87 87
         }
Please login to merge, or discard this patch.