Skip to content

Commit 3182943

Browse files
Merge pull request #4 from AntoninoBonanno/master
Bug fix
2 parents 1dd3532 + 3f07153 commit 3182943

5 files changed

Lines changed: 19 additions & 16 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
composer.phar
22
composer.lock
33
composer-test.lock
4-
vendor/
4+
vendor/
5+
.idea

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,17 @@
22

33
PHP SDK for [Scopus APIs](https://dev.elsevier.com/scopus.html)
44

5-
Currently supported APIs:
5+
Currently, supported APIs:
66
- Scopus Search API
77
- Abstract Retrieval API
88
- Author Retrieval API
99
- Affiliation Retrieval API
1010
- Search Author API
1111
- Citation Overview API
1212

13-
Original Project: [https://github.com/kasparsj/scopus-api-php](https://github.com/kasparsj/scopus-api-php)
14-
15-
Custom Project: [https://github.com/AntoninoBonanno/scopus-api-php](https://github.com/AntoninoBonanno/scopus-api-php)
16-
1713
## Installation
1814

19-
`composer require kasparsj/scopus-search-api` (Original project)
20-
21-
Overwrite this project to the original project if you want to use my updates
15+
`composer require kasparsj/scopus-search-api`
2216

2317
## Usage:
2418

@@ -63,10 +57,13 @@ foreach ($results->getEntries() as $entry) {
6357

6458
https://kasparsj.github.io/scopus-api-php/
6559

66-
## My contribution
67-
* Added Search Author API
68-
* Added Citation Overview API
69-
* Created a support function to retrieve Document of specific Author easly
70-
* Updated classes
60+
## Changelog
61+
- 14/11/2021 - v1.2
62+
* Bug fix
63+
- 19/05/2020 - v1.1
64+
* Added Search Author API
65+
* Added Citation Overview API
66+
* Created a support function to retrieve Document of specific Author easly
67+
* Updated classes
7168

7269
[Bonanno Antonino](https://github.com/AntoninoBonanno)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Scopus API for PHP (Unofficial)",
44
"minimum-stability": "stable",
55
"license": "MIT",
6-
"version": "1.1",
6+
"version": "1.2",
77
"authors": [
88
{
99
"name": "Kaspars Jaudzems",

src/Scopus/Response/AbstractCoredata.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,9 @@ public function getIssn()
124124
{
125125
return $this->data['prism:issn'];
126126
}
127+
128+
public function hasError()
129+
{
130+
return isset($this->data['error']) ? $this->data['error'] : false;
131+
}
127132
}

src/Scopus/Response/Entry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function getYear()
122122
} else if ($this->getCoverDisplayDate() != null) {
123123
$date = date_parse($this->getCoverDisplayDate());
124124
}
125-
return ($date) ? $date['year'] : null;
125+
return (isset($date)) ? $date['year'] : null;
126126
}
127127

128128
//Entry di SEARCH_AUTHOR_URI

0 commit comments

Comments
 (0)