/** * @param Array $client * @return void * @throws \InvaildArgumentException */ public static function authenticateApp(array $client) { if (isset($client['id'], $client['secret'])) { self::$authApp = $client; self::$authenticatedApp = true; } else { throw new \InvaildArgumentException("The client array should contain `id` and `secret`"); } }