Star a gist

@link https://developer.github.com/v3/gists/#star-a-gist

@param string $id

@return bool
176608
public function starGist(string $id): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/gists/:id/star', $id), Request::METHOD_PUT);

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
1174378
public function actionDelete($id)
    {
        $this->trigger(self::EVENT_BEFORE_DELETE_CATEGORY);

        $category = Category::findOne($id);
        if (($category->delete())) {
            Yii::$app->getSession()->setFlash('success', 'The category has been successfully removed');
            if (\Yii::$app->request->isAjax) {
                return true;
            }
            $this->trigger(self::EVENT_AFTER_DELETE_CATEGORY, new CategoryEvent(['id' => $id]));
        } else {
            Yii::$app->getSession()->setFlash('error', 'Error deleting category');
        }

        if (\Yii::$app->request->isAjax) {
            return false;
        }
        return $this->redirect(\Yii::$app->request->referrer);
    }
1218316
public function gist($id, $file = null)
    {
        if ($this->cache()->exists($id)) {
            $gist = $this->cache()->get($id);
        } else {
            $gist = $this->transport()->fetchGist($id);
            $this->cache()->set($id, $gist);
        }
        $files = array();
        foreach ($gist['files'] as $name => $fileInfo) {
            if ($file === null) {
                $files[$name] = $fileInfo;
            } else {
                if ($file == $name) {
                    $files[$name] = $fileInfo;
                    break;
                }
            }
        }

        if (!count($files)) {
            return '';
        }

        $urlExtra = $file ? '?file='.$file : '';
        $output = '';
        $output .= '<script src="https://gist.github.com/'.$id.'.js'.$urlExtra.'"></script>';
        $output .= '<noscript>';
        foreach ($files as $name => $fileInfo) {
            $language = strtolower($fileInfo['language']);
            $output .= '<pre><code class="language-'.$language.' '.$language.'">';
            $output .= htmlentities($fileInfo['content']);
            $output .= '</code></pre>';
        }
        $output .= '</noscript>';

        return $output;
    }
1230407
protected function doHave($id)
    {
        return (bool)$this->redis->hexists($this->namespace, $this->key($id));
    }
740114
public function match($id)
    {
        return $id == $this->id || (strlen($this->getAlias()) && @preg_match($this->getAlias(), $id));
    }
32728
public function open($id)
    {
        return $this->api->request('PUT', '/notifications/'.$id, [
            'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(),
        ], json_encode([
            'app_id' => $this->api->getConfig()->getApplicationId(),
            'opened' => true,
        ]));
    }
516059
public function escapeCheck($id){
		$checks = $this->getEscapedChecks();
		array_push($checks, $id);
		$checks = array_unique($checks);
		$this->setEscapedChecks($checks);
	}
771391
def star(self, **args):
		'''
		
		'''
		if 'name' in args:
			self.gist_name = args['name']
			self.gist_id = self.getMyID(self.gist_name)
		elif 'id' in args:
			self.gist_id = args['id']
		else:
			raise Exception('Either provide authenticated user\'s Unambigious Gistname or any unique Gistid to be starred')

		r = requests.put(
			'%s'%BASE_URL+'/gists/%s/star' % self.gist_id,
			headers=self.gist.header
			)
		if (r.status_code == 204):
			response = {
				'id': self.gist_id
			}
			return response

		raise Exception('Gist can\'t be starred')
454881
public function has($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        return isset($this->keys[$id]);
    }
899430
public function param($id)
    {
        if (isset($this->params[$id])) {
            return html_entity_decode(rawurldecode($this->params[$id]));
        }

        return false;
    }
132021
public function contain(string $id): bool
    {
        if ($this->properties()->containSection($id)) {
            return true;
        }

        return $this->hasFallback();
    }
16561
public function moveToTrash($id)
    {
        $user = AppUser::find($id);

        if (!$user) {
            return response()->json(null, 404);
        }

        if (!$user->delete()) {
            return response()->json(null, 500); // @codeCoverageIgnore
        }

        return response()->json(null, 204);
    }
1368620
protected function exists(int $id = 0): bool
    {
        return (bool)@shmop_open($id ? $id : $this->id, 'a', 0, 0);
    }
155451
public function activate($id)
    {
        $user = $this->findById($id);

        try
        {
            if ( $user->attemptActivation($user->getActivationCode()) )
            {
                $this->event->fire('users.activate',array($user));
                return true;
            }
        }
        catch (UserAlreadyActivatedException $e){}


        return false;
    }
920490
public function providerHas(/*# string */ $id)/*# : bool */
    {
        foreach ($this->providers as $provider) {
            if ($provider->has($id)) {
                return true;
            }
        }
        return false;
    }
947199
public function has($id) {
		foreach($this->values as $container) {
			if($container->has($id)) {
				return true;
			}
		}
		return false;
	}
1256191
public function hasDirectory(string $id): bool
    {
        if (isset($this->directories[$id])) {
            return true;
        }

        $path = $this->getDirectoryPath($id);

        if ($this->filesystem->has($path)) {
            $info = $this->filesystem->getMetadata($path);

            return $info['type'] === 'dir';
        }

        return false;
    }