From 1ab993edaf70aa587518f4c842edc3dfee3d60dc Mon Sep 17 00:00:00 2001 From: Dmitri Vereshchagin Date: Fri, 27 Mar 2015 22:49:21 +0300 Subject: [PATCH] Whitespace police Remove unnecessary trailing whitespace --- .../Bundle/PointToolsBundle/Entity/User.php | 22 +++++++++---------- .../Resources/config/services.yml | 4 ++-- .../PointToolsBundle/Service/AbstractApi.php | 10 ++++----- .../PointToolsBundle/Service/UserApi.php | 20 ++++++++--------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php index df47217..038a1ab 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php @@ -30,7 +30,7 @@ class User * @ORM\Column(name="login", type="string", length=255) */ private $login; - + /** * @var string * @@ -51,14 +51,14 @@ class User * @ORM\OneToMany(targetEntity="Subscription", mappedBy="subscriber") */ private $subscriptions; - + /** * @var ArrayCollection - * + * * @ORM\OneToMany(targetEntity="SubscriptionEvent", mappedBy="subscriber") */ private $newSubscriptionEvents; - + /** * @var ArrayCollection * @ORM\OneToMany(targetEntity="SubscriptionEvent", mappedBy="author") @@ -83,20 +83,20 @@ class User { return $this->id; } - + /** * Set id of user (for API services only) - * + * * @param integer $id * @return User */ public function setId($id) { $this->id = $id; - + return $this; } - + /** * Set login * @@ -169,7 +169,7 @@ class User /** * Get subscribers * - * @return ArrayCollection + * @return ArrayCollection */ public function getSubscribers() { @@ -202,7 +202,7 @@ class User /** * Get subscriptions * - * @return ArrayCollection + * @return ArrayCollection */ public function getSubscriptions() { @@ -268,7 +268,7 @@ class User /** * Get newSubscriberEvents * - * @return ArrayCollection + * @return ArrayCollection */ public function getNewSubscriberEvents() { diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml index 8f9cc25..3295817 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml @@ -4,7 +4,7 @@ services: arguments: [ "http://point.im/" ] tags: - { name: guzzle.client } - + skobkin_point_tools.api_user: class: Skobkin\Bundle\PointToolsBundle\UserApi - arguments: [ @skobkin_point_tools.http_client ] \ No newline at end of file + arguments: [ @skobkin_point_tools.http_client ] diff --git a/src/Skobkin/Bundle/PointToolsBundle/Service/AbstractApi.php b/src/Skobkin/Bundle/PointToolsBundle/Service/AbstractApi.php index a92e243..cb79f4a 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Service/AbstractApi.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Service/AbstractApi.php @@ -13,15 +13,15 @@ class AbstractApi * @var Client HTTP-client from Guzzle */ protected $client; - + public function __construct($httpClient) { $this->client = $httpClient; } - + /** * Make GET request and return Response object - * + * * @param string $pathTemplate * @param array $parameters * @return GuzzleResponse @@ -29,9 +29,9 @@ class AbstractApi public function sendGetRequest($pathTemplate, array $parameters = []) { $path = vsprintf($pathTemplate, $parameters); - + $request = $this->client->get($path); - + return $request->send(); } } diff --git a/src/Skobkin/Bundle/PointToolsBundle/Service/UserApi.php b/src/Skobkin/Bundle/PointToolsBundle/Service/UserApi.php index d407a16..ea370d5 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Service/UserApi.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Service/UserApi.php @@ -12,45 +12,45 @@ class UserApi extends AbstractApi const PATH_USER_INFO = '/api/user/%s'; const PATH_USER_SUBSCRIPTIONS = '/api/user/%s/subscriptions'; const PATH_USER_SUBSCRIBERS = '/api/user/%s/subscribers'; - + /** * @var string Base URL for user avatars */ protected $avatarsBaseUrl = '//i.point.im/a/'; - + public function getName() { return 'skobkin_point_tools_api_user'; } - + /** * Get user subscribers by his/her name - * + * * @param string $login * @return User[] */ public function getUserSubscribersByLogin($login) { $response = $this->sendGetRequest(self::PATH_USER_SUBSCRIBERS, [$login]); - + $body = $response->getBody(true); - + // @todo use JMSSerializer $data = json_decode($body); - + $users = []; - + if (is_array($data)) { foreach ($data as $apiUser) { $user = new User(); $user->setId($apiUser->id); $user->setLogin($apiUser->login); $user->setName($apiUser->name); - + $users[] = $user; } } - + return $users; } }