/**
  * @return \Continuous\Sdk\Client
  */
 protected function getClient()
 {
     if (is_null($this->client)) {
         $this->client = Service::factory(['token' => $this->token]);
     }
     return $this->client;
 }
Example #2
0
 /**
  * @Given I've instatiated the sdk with the following
  */
 public function iVeInstatiatedTheSdkWithTheFollowing(TableNode $table)
 {
     $config = [];
     foreach ($table->getTable() as $row) {
         $config[$row[0]] = $row[1];
     }
     $this->sdk = Service::factory($config);
 }
Example #3
0
 /**
  * Task entry point
  */
 public function main()
 {
     $config = [];
     if ($this->token) {
         $config['token'] = $this->token;
     }
     $this->setClient(Service::factory($config));
 }
 /**
  * @return Client
  */
 protected function getClient()
 {
     // If no client has been set previously, default to a client without an
     // access token. This is useful for accessing public repositories.
     if (is_null(self::$client)) {
         $this->setClient(Service::factory([]));
     }
     return self::$client;
 }
Example #5
0
 /**
  * @Given I've instatiated the sdk with the following
  */
 public function iVeInstatiatedTheSdkWithTheFollowing(TableNode $table)
 {
     $config = $table->getRowsHash();
     $this->sdk = Service::factory($config);
 }