| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | protected function get($isbns) |
||
| 19 | { |
||
| 20 | foreach ($isbns as $isbn) { |
||
| 21 | $volume = $this->books->volumes->byIsbn($isbn); |
||
| 22 | \Log::debug('[GoogleBooksService] - ' . $isbn . ': ' . (is_null($volume) ? 'not found' : 'found')); |
||
| 23 | if (!is_null($volume)) { |
||
| 24 | return $volume; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | return null; |
||
| 28 | } |
||
| 29 | |||
| 60 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.