Skip to content

Commit

Permalink
Merge pull request #12 from core23/analysis-Xk5YBy
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
core23 committed Oct 11, 2017
2 parents c9fec18 + 1966efd commit d20c5f4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Connection/ConnectionInterface.php
Expand Up @@ -54,7 +54,7 @@ public function getPageBody(string $url): ? string;
*
* @return string
*/
public function getApiKey() : string;
public function getApiKey(): string;

/**
* Get the shared secret.
Expand Down
2 changes: 1 addition & 1 deletion src/Connection/HTTPlugConnection.php
Expand Up @@ -61,7 +61,7 @@ public function getPageBody(string $url): ? string
/**
* {@inheritdoc}
*/
protected function call(array $params, string $requestMethod = 'GET') : array
protected function call(array $params, string $requestMethod = 'GET'): array
{
$params = array_merge($params, array('format' => 'json'));
$data = $this->buildParameter($params);
Expand Down
6 changes: 3 additions & 3 deletions src/Crawler/AbstractCrawler.php
Expand Up @@ -77,7 +77,7 @@ final protected function parseUrl(Crawler $node, string $attr = 'href'): ? strin
*
* @return null|string
*/
final protected function parseImage(Crawler $node) : ? string
final protected function parseImage(Crawler $node): ? string
{
return $this->parseUrl($node, 'src');
}
Expand All @@ -90,7 +90,7 @@ final protected function parseImage(Crawler $node) : ? string
*
* @return null|string
*/
final protected function parseString(Crawler $node, bool $multiline = false) : ? string
final protected function parseString(Crawler $node, bool $multiline = false): ? string
{
if (null === $node || 0 === $node->count()) {
return null;
Expand Down Expand Up @@ -119,7 +119,7 @@ final protected function parseString(Crawler $node, bool $multiline = false) : ?
*
* @return \DateTime|null
*/
final protected function parseDate(Crawler $node) : ? \DateTime
final protected function parseDate(Crawler $node): ? \DateTime
{
$content = $this->parseString($node);

Expand Down
2 changes: 1 addition & 1 deletion src/Crawler/EventInfoCrawler.php
Expand Up @@ -50,7 +50,7 @@ public function getEventInfo(int $id): ? array
*
* @return array
*/
private function readBands(Crawler $node) : array
private function readBands(Crawler $node): array
{
$bandNode = $node->filter('.grid-items');

Expand Down
8 changes: 4 additions & 4 deletions src/Crawler/EventListCrawler.php
Expand Up @@ -46,15 +46,15 @@ public function getUserYears(string $username): ? array
*
* @return array|null
*/
public function getEvents(string $username, int $year, int $page = 1) : ? array
public function getEvents(string $username, int $year, int $page = 1): ? array
{
$node = $this->crawlEventList($username, $year, $page);

if (null === $node) {
return null;
}

return $node->filter('.events-list-item')->each(function (Crawler $node) : array {
return $node->filter('.events-list-item')->each(function (Crawler $node): array {
$eventNode = $node->filter('.events-list-item-event--title a');

$url = $this->parseUrl($eventNode);
Expand Down Expand Up @@ -97,7 +97,7 @@ public function getYearPages(string $username, int $year): ? int
*
* @return int|null
*/
public function getYearCount(string $username, int $year, int $page = 1) : ? int
public function getYearCount(string $username, int $year, int $page = 1): ? int
{
$node = $this->crawlEventList($username, $year, $page);

Expand All @@ -123,7 +123,7 @@ public function getYearCount(string $username, int $year, int $page = 1) : ? int
*
* @return int
*/
private function countListPages(Crawler $node) : int
private function countListPages(Crawler $node): int
{
$pagination = $this->parseString($node->filter('.pagination .pages'));

Expand Down
2 changes: 1 addition & 1 deletion src/Service/AbstractService.php
Expand Up @@ -60,7 +60,7 @@ final protected function toTimestamp(\DateTime $date = null): ? int
* @throws ApiException
* @throws NotFoundException
*/
final protected function signedCall($method, array $params = array(), SessionInterface $session = null, $requestMethod = 'GET') : array
final protected function signedCall($method, array $params = array(), SessionInterface $session = null, $requestMethod = 'GET'): array
{
try {
return $this->connection->signedCall($method, $params, $session, $requestMethod);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/AuthService.php
Expand Up @@ -91,7 +91,7 @@ public function createToken()
*
* @return string
*/
public function getAuthUrl(string $callbackUrl) : string
public function getAuthUrl(string $callbackUrl): string
{
return $this->authUrl.'?api_key='.$this->connection->getApiKey().'&cb='.$callbackUrl;
}
Expand Down

0 comments on commit d20c5f4

Please sign in to comment.