repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
dapphp/securimage
securimage.php
Securimage.saveAudioData
protected function saveAudioData($data) { if ($this->no_session != true) { $_SESSION['securimage_code_audio'][$this->namespace] = $data; } if ($this->use_database) { $this->saveAudioToDatabase($data); } }
php
protected function saveAudioData($data) { if ($this->no_session != true) { $_SESSION['securimage_code_audio'][$this->namespace] = $data; } if ($this->use_database) { $this->saveAudioToDatabase($data); } }
[ "protected", "function", "saveAudioData", "(", "$", "data", ")", "{", "if", "(", "$", "this", "->", "no_session", "!=", "true", ")", "{", "$", "_SESSION", "[", "'securimage_code_audio'", "]", "[", "$", "this", "->", "namespace", "]", "=", "$", "data", ...
Save audio data to session and/or the configured database @param string $data The CAPTCHA audio data
[ "Save", "audio", "data", "to", "session", "and", "/", "or", "the", "configured", "database" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2658-L2667
dapphp/securimage
securimage.php
Securimage.getAudioData
protected function getAudioData() { if ($this->no_session != true) { if (isset($_SESSION['securimage_code_audio'][$this->namespace])) { return $_SESSION['securimage_code_audio'][$this->namespace]; } } if ($this->use_database) { $this->open...
php
protected function getAudioData() { if ($this->no_session != true) { if (isset($_SESSION['securimage_code_audio'][$this->namespace])) { return $_SESSION['securimage_code_audio'][$this->namespace]; } } if ($this->use_database) { $this->open...
[ "protected", "function", "getAudioData", "(", ")", "{", "if", "(", "$", "this", "->", "no_session", "!=", "true", ")", "{", "if", "(", "isset", "(", "$", "_SESSION", "[", "'securimage_code_audio'", "]", "[", "$", "this", "->", "namespace", "]", ")", ")...
Gets audio file contents from the session or database @return string|boolean Audio contents on success, or false if no audio found in session or DB
[ "Gets", "audio", "file", "contents", "from", "the", "session", "or", "database" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2674-L2692
dapphp/securimage
securimage.php
Securimage.saveCodeToDatabase
protected function saveCodeToDatabase() { $success = false; $this->openDatabase(); if ($this->use_database && $this->pdo_conn) { $id = $this->getCaptchaId(false); $ip = $_SERVER['REMOTE_ADDR']; if (empty($id)) { $id = $ip; } ...
php
protected function saveCodeToDatabase() { $success = false; $this->openDatabase(); if ($this->use_database && $this->pdo_conn) { $id = $this->getCaptchaId(false); $ip = $_SERVER['REMOTE_ADDR']; if (empty($id)) { $id = $ip; } ...
[ "protected", "function", "saveCodeToDatabase", "(", ")", "{", "$", "success", "=", "false", ";", "$", "this", "->", "openDatabase", "(", ")", ";", "if", "(", "$", "this", "->", "use_database", "&&", "$", "this", "->", "pdo_conn", ")", "{", "$", "id", ...
Saves the CAPTCHA data to the configured database.
[ "Saves", "the", "CAPTCHA", "data", "to", "the", "configured", "database", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2697-L2741
dapphp/securimage
securimage.php
Securimage.saveAudioToDatabase
protected function saveAudioToDatabase($data) { $success = false; $this->openDatabase(); if ($this->use_database && $this->pdo_conn) { $id = $this->getCaptchaId(false); $ip = $_SERVER['REMOTE_ADDR']; $ns = $this->namespace; if (empty($id)) { ...
php
protected function saveAudioToDatabase($data) { $success = false; $this->openDatabase(); if ($this->use_database && $this->pdo_conn) { $id = $this->getCaptchaId(false); $ip = $_SERVER['REMOTE_ADDR']; $ns = $this->namespace; if (empty($id)) { ...
[ "protected", "function", "saveAudioToDatabase", "(", "$", "data", ")", "{", "$", "success", "=", "false", ";", "$", "this", "->", "openDatabase", "(", ")", ";", "if", "(", "$", "this", "->", "use_database", "&&", "$", "this", "->", "pdo_conn", ")", "{"...
Saves CAPTCHA audio to the configured database @param string $data Audio data @return boolean true on success, false on failure
[ "Saves", "CAPTCHA", "audio", "to", "the", "configured", "database" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2749-L2772
dapphp/securimage
securimage.php
Securimage.openDatabase
protected function openDatabase() { $this->pdo_conn = false; if ($this->use_database) { $pdo_extension = 'PDO_' . strtoupper($this->database_driver); if (!extension_loaded($pdo_extension)) { trigger_error("Database support is turned on in Securimage, but the...
php
protected function openDatabase() { $this->pdo_conn = false; if ($this->use_database) { $pdo_extension = 'PDO_' . strtoupper($this->database_driver); if (!extension_loaded($pdo_extension)) { trigger_error("Database support is turned on in Securimage, but the...
[ "protected", "function", "openDatabase", "(", ")", "{", "$", "this", "->", "pdo_conn", "=", "false", ";", "if", "(", "$", "this", "->", "use_database", ")", "{", "$", "pdo_extension", "=", "'PDO_'", ".", "strtoupper", "(", "$", "this", "->", "database_dr...
Opens a connection to the configured database. @see Securimage::$use_database Use database @see Securimage::$database_driver Database driver @see Securimage::$pdo_conn pdo_conn @return bool true if the database connection was successful, false if not
[ "Opens", "a", "connection", "to", "the", "configured", "database", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2782-L2840
dapphp/securimage
securimage.php
Securimage.getDsn
protected function getDsn() { $dsn = sprintf('%s:', $this->database_driver); switch($this->database_driver) { case self::SI_DRIVER_SQLITE3: $dsn .= $this->database_file; break; case self::SI_DRIVER_MYSQL: case self::SI_DRIVER_PGSQ...
php
protected function getDsn() { $dsn = sprintf('%s:', $this->database_driver); switch($this->database_driver) { case self::SI_DRIVER_SQLITE3: $dsn .= $this->database_file; break; case self::SI_DRIVER_MYSQL: case self::SI_DRIVER_PGSQ...
[ "protected", "function", "getDsn", "(", ")", "{", "$", "dsn", "=", "sprintf", "(", "'%s:'", ",", "$", "this", "->", "database_driver", ")", ";", "switch", "(", "$", "this", "->", "database_driver", ")", "{", "case", "self", "::", "SI_DRIVER_SQLITE3", ":"...
Get the PDO DSN string for connecting to the database @see Securimage::$database_driver Database driver @throws Exception If database specific options are not configured @return string The DSN for connecting to the database
[ "Get", "the", "PDO", "DSN", "string", "for", "connecting", "to", "the", "database" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2849-L2874
dapphp/securimage
securimage.php
Securimage.checkTablesExist
protected function checkTablesExist() { $table = $this->pdo_conn->quote($this->database_table); switch($this->database_driver) { case self::SI_DRIVER_SQLITE3: // query row count for sqlite, PRAGMA queries seem to return no // rowCount using PDO even if th...
php
protected function checkTablesExist() { $table = $this->pdo_conn->quote($this->database_table); switch($this->database_driver) { case self::SI_DRIVER_SQLITE3: // query row count for sqlite, PRAGMA queries seem to return no // rowCount using PDO even if th...
[ "protected", "function", "checkTablesExist", "(", ")", "{", "$", "table", "=", "$", "this", "->", "pdo_conn", "->", "quote", "(", "$", "this", "->", "database_table", ")", ";", "switch", "(", "$", "this", "->", "database_driver", ")", "{", "case", "self"...
Checks if the necessary database tables for storing captcha codes exist @throws Exception If the table check failed for some reason @return boolean true if the database do exist, false if not
[ "Checks", "if", "the", "necessary", "database", "tables", "for", "storing", "captcha", "codes", "exist" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2882-L2922
dapphp/securimage
securimage.php
Securimage.createDatabaseTables
protected function createDatabaseTables() { $queries = array(); switch($this->database_driver) { case self::SI_DRIVER_SQLITE3: $queries[] = "CREATE TABLE \"{$this->database_table}\" ( id VARCHAR(40), namespa...
php
protected function createDatabaseTables() { $queries = array(); switch($this->database_driver) { case self::SI_DRIVER_SQLITE3: $queries[] = "CREATE TABLE \"{$this->database_table}\" ( id VARCHAR(40), namespa...
[ "protected", "function", "createDatabaseTables", "(", ")", "{", "$", "queries", "=", "array", "(", ")", ";", "switch", "(", "$", "this", "->", "database_driver", ")", "{", "case", "self", "::", "SI_DRIVER_SQLITE3", ":", "$", "queries", "[", "]", "=", "\"...
Create the necessary databaes table for storing captcha codes. Based on the database adapter used, the tables will created in the existing connection. @see Securimage::$database_driver Database driver @return boolean true if the tables were created, false if not
[ "Create", "the", "necessary", "databaes", "table", "for", "storing", "captcha", "codes", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L2932-L2996
dapphp/securimage
securimage.php
Securimage.getCodeFromDatabase
protected function getCodeFromDatabase() { $code = ''; if ($this->use_database == true && $this->pdo_conn) { if (Securimage::$_captchaId !== null) { $query = "SELECT * FROM {$this->database_table} WHERE id = ?"; $stmt = $this->pdo_conn->prepare($query)...
php
protected function getCodeFromDatabase() { $code = ''; if ($this->use_database == true && $this->pdo_conn) { if (Securimage::$_captchaId !== null) { $query = "SELECT * FROM {$this->database_table} WHERE id = ?"; $stmt = $this->pdo_conn->prepare($query)...
[ "protected", "function", "getCodeFromDatabase", "(", ")", "{", "$", "code", "=", "''", ";", "if", "(", "$", "this", "->", "use_database", "==", "true", "&&", "$", "this", "->", "pdo_conn", ")", "{", "if", "(", "Securimage", "::", "$", "_captchaId", "!=...
Retrieves a stored code from the database for based on the captchaId or IP address if captcha ID not used. @return string|array Empty string if no code was found or has expired, otherwise returns array of code information.
[ "Retrieves", "a", "stored", "code", "from", "the", "database", "for", "based", "on", "the", "captchaId", "or", "IP", "address", "if", "captcha", "ID", "not", "used", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3005-L3050
dapphp/securimage
securimage.php
Securimage.clearCodeFromDatabase
protected function clearCodeFromDatabase() { if ($this->pdo_conn) { $ip = $_SERVER['REMOTE_ADDR']; $ns = $this->pdo_conn->quote($this->namespace); $id = Securimage::$_captchaId; if (empty($id)) { $id = $ip; // if no captchaId set, IP address i...
php
protected function clearCodeFromDatabase() { if ($this->pdo_conn) { $ip = $_SERVER['REMOTE_ADDR']; $ns = $this->pdo_conn->quote($this->namespace); $id = Securimage::$_captchaId; if (empty($id)) { $id = $ip; // if no captchaId set, IP address i...
[ "protected", "function", "clearCodeFromDatabase", "(", ")", "{", "if", "(", "$", "this", "->", "pdo_conn", ")", "{", "$", "ip", "=", "$", "_SERVER", "[", "'REMOTE_ADDR'", "]", ";", "$", "ns", "=", "$", "this", "->", "pdo_conn", "->", "quote", "(", "$...
Remove a stored code from the database based on captchaId or IP address.
[ "Remove", "a", "stored", "code", "from", "the", "database", "based", "on", "captchaId", "or", "IP", "address", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3055-L3076
dapphp/securimage
securimage.php
Securimage.purgeOldCodesFromDatabase
protected function purgeOldCodesFromDatabase() { if ($this->use_database && $this->pdo_conn) { $now = time(); $limit = (!is_numeric($this->expiry_time) || $this->expiry_time < 1) ? 86400 : $this->expiry_time; $query = sprintf("DELETE FROM %s WHERE %s - created > %s", ...
php
protected function purgeOldCodesFromDatabase() { if ($this->use_database && $this->pdo_conn) { $now = time(); $limit = (!is_numeric($this->expiry_time) || $this->expiry_time < 1) ? 86400 : $this->expiry_time; $query = sprintf("DELETE FROM %s WHERE %s - created > %s", ...
[ "protected", "function", "purgeOldCodesFromDatabase", "(", ")", "{", "if", "(", "$", "this", "->", "use_database", "&&", "$", "this", "->", "pdo_conn", ")", "{", "$", "now", "=", "time", "(", ")", ";", "$", "limit", "=", "(", "!", "is_numeric", "(", ...
Deletes old (expired) codes from the database
[ "Deletes", "old", "(", "expired", ")", "codes", "from", "the", "database" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3081-L3094
dapphp/securimage
securimage.php
Securimage.isCodeExpired
protected function isCodeExpired($creation_time) { $expired = true; if (!is_numeric($this->expiry_time) || $this->expiry_time < 1) { $expired = false; } else if (time() - $creation_time < $this->expiry_time) { $expired = false; } return $expired; ...
php
protected function isCodeExpired($creation_time) { $expired = true; if (!is_numeric($this->expiry_time) || $this->expiry_time < 1) { $expired = false; } else if (time() - $creation_time < $this->expiry_time) { $expired = false; } return $expired; ...
[ "protected", "function", "isCodeExpired", "(", "$", "creation_time", ")", "{", "$", "expired", "=", "true", ";", "if", "(", "!", "is_numeric", "(", "$", "this", "->", "expiry_time", ")", "||", "$", "this", "->", "expiry_time", "<", "1", ")", "{", "$", ...
Checks to see if the captcha code has expired and can no longer be used. @see Securimage::$expiry_time expiry_time @param int $creation_time The Unix timestamp of when the captcha code was created @return bool true if the code is expired, false if it is still valid
[ "Checks", "to", "see", "if", "the", "captcha", "code", "has", "expired", "and", "can", "no", "longer", "be", "used", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3103-L3114
dapphp/securimage
securimage.php
Securimage.generateWAV
protected function generateWAV($letters) { $wavCaptcha = new WavFile(); $first = true; // reading first wav file if ($this->audio_use_sox && !is_executable($this->sox_binary_path)) { throw new Exception("Path to SoX binary is incorrect or not executable"); } ...
php
protected function generateWAV($letters) { $wavCaptcha = new WavFile(); $first = true; // reading first wav file if ($this->audio_use_sox && !is_executable($this->sox_binary_path)) { throw new Exception("Path to SoX binary is incorrect or not executable"); } ...
[ "protected", "function", "generateWAV", "(", "$", "letters", ")", "{", "$", "wavCaptcha", "=", "new", "WavFile", "(", ")", ";", "$", "first", "=", "true", ";", "// reading first wav file", "if", "(", "$", "this", "->", "audio_use_sox", "&&", "!", "is_execu...
Generate a wav file given the $letters in the code @param array $letters The letters making up the captcha @return string The audio content in WAV format
[ "Generate", "a", "wav", "file", "given", "the", "$letters", "in", "the", "code" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3122-L3241
dapphp/securimage
securimage.php
Securimage.getRandomNoiseFile
public function getRandomNoiseFile() { $return = false; if ( ($dh = opendir($this->audio_noise_path)) !== false ) { $list = array(); while ( ($file = readdir($dh)) !== false ) { if ($file == '.' || $file == '..') continue; if (strtolower(subs...
php
public function getRandomNoiseFile() { $return = false; if ( ($dh = opendir($this->audio_noise_path)) !== false ) { $list = array(); while ( ($file = readdir($dh)) !== false ) { if ($file == '.' || $file == '..') continue; if (strtolower(subs...
[ "public", "function", "getRandomNoiseFile", "(", ")", "{", "$", "return", "=", "false", ";", "if", "(", "(", "$", "dh", "=", "opendir", "(", "$", "this", "->", "audio_noise_path", ")", ")", "!==", "false", ")", "{", "$", "list", "=", "array", "(", ...
Gets and returns the path to a random noise file from the audio noise directory. @return bool|string false if a file could not be found, or a string containing the path to the file.
[ "Gets", "and", "returns", "the", "path", "to", "a", "random", "noise", "file", "from", "the", "audio", "noise", "directory", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3248-L3273
dapphp/securimage
securimage.php
Securimage.getSoxEffectChain
protected function getSoxEffectChain($numEffects = 2) { $effectsList = array('bend', 'chorus', 'overdrive', 'pitch', 'reverb', 'tempo', 'tremolo'); $effects = array_rand($effectsList, $numEffects); $outEffects = array(); if (!is_array($effects)) $effects = array($effects); ...
php
protected function getSoxEffectChain($numEffects = 2) { $effectsList = array('bend', 'chorus', 'overdrive', 'pitch', 'reverb', 'tempo', 'tremolo'); $effects = array_rand($effectsList, $numEffects); $outEffects = array(); if (!is_array($effects)) $effects = array($effects); ...
[ "protected", "function", "getSoxEffectChain", "(", "$", "numEffects", "=", "2", ")", "{", "$", "effectsList", "=", "array", "(", "'bend'", ",", "'chorus'", ",", "'overdrive'", ",", "'pitch'", ",", "'reverb'", ",", "'tempo'", ",", "'tremolo'", ")", ";", "$"...
Get a random effect or chain of effects to apply to a segment of the audio file. These effects should increase the randomness of the audio for a particular letter/number by modulating the signal. The SoX effects used are *bend*, *chorus*, *overdrive*, *pitch*, *reverb*, *tempo*, and *tremolo*. For each effect select...
[ "Get", "a", "random", "effect", "or", "chain", "of", "effects", "to", "apply", "to", "a", "segment", "of", "the", "audio", "file", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3289-L3360
dapphp/securimage
securimage.php
Securimage.getSoxNoiseData
protected function getSoxNoiseData($duration, $numChannels, $sampleRate, $bitRate) { $shapes = array('sine', 'square', 'triangle', 'sawtooth', 'trapezium'); $steps = array(':', '+', '/', '-'); $selShapes = array_rand($shapes, 2); $selSteps = array_rand($steps, 2); $sweep0 ...
php
protected function getSoxNoiseData($duration, $numChannels, $sampleRate, $bitRate) { $shapes = array('sine', 'square', 'triangle', 'sawtooth', 'trapezium'); $steps = array(':', '+', '/', '-'); $selShapes = array_rand($shapes, 2); $selSteps = array_rand($steps, 2); $sweep0 ...
[ "protected", "function", "getSoxNoiseData", "(", "$", "duration", ",", "$", "numChannels", ",", "$", "sampleRate", ",", "$", "bitRate", ")", "{", "$", "shapes", "=", "array", "(", "'sine'", ",", "'square'", ",", "'triangle'", ",", "'sawtooth'", ",", "'trap...
This function is not yet used. Generate random background noise from sweeping oscillators @param float $duration How long in seconds the generated sound will be @param int $numChannels Number of channels in output wav @param int $sampleRate Sample rate of output wav @param int $bitRate Bits per sample (8, 16, 2...
[ "This", "function", "is", "not", "yet", "used", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3373-L3411
dapphp/securimage
securimage.php
Securimage.wavToMp3
protected function wavToMp3($data) { if (!file_exists(self::$lame_binary_path) || !is_executable(self::$lame_binary_path)) { throw new Exception('Lame binary "' . $this->lame_binary_path . '" does not exist or is not executable'); } // size of wav data input $size = strl...
php
protected function wavToMp3($data) { if (!file_exists(self::$lame_binary_path) || !is_executable(self::$lame_binary_path)) { throw new Exception('Lame binary "' . $this->lame_binary_path . '" does not exist or is not executable'); } // size of wav data input $size = strl...
[ "protected", "function", "wavToMp3", "(", "$", "data", ")", "{", "if", "(", "!", "file_exists", "(", "self", "::", "$", "lame_binary_path", ")", "||", "!", "is_executable", "(", "self", "::", "$", "lame_binary_path", ")", ")", "{", "throw", "new", "Excep...
Convert WAV data to MP3 using the Lame MP3 encoder binary @param string $data Contents of the WAV file to convert @return string MP3 file data
[ "Convert", "WAV", "data", "to", "MP3", "using", "the", "Lame", "MP3", "encoder", "binary" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3419-L3495
dapphp/securimage
securimage.php
Securimage.initColor
protected function initColor($color, $default) { if ($color == null) { return new Securimage_Color($default); } else if (is_string($color)) { try { return new Securimage_Color($color); } catch(Exception $e) { return new Securimage_C...
php
protected function initColor($color, $default) { if ($color == null) { return new Securimage_Color($default); } else if (is_string($color)) { try { return new Securimage_Color($color); } catch(Exception $e) { return new Securimage_C...
[ "protected", "function", "initColor", "(", "$", "color", ",", "$", "default", ")", "{", "if", "(", "$", "color", "==", "null", ")", "{", "return", "new", "Securimage_Color", "(", "$", "default", ")", ";", "}", "else", "if", "(", "is_string", "(", "$"...
Convert an html color code to a Securimage_Color @param string $color @param Securimage_Color|string $default The defalt color to use if $color is invalid
[ "Convert", "an", "html", "color", "code", "to", "a", "Securimage_Color" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3578-L3593
dapphp/securimage
securimage.php
Securimage.errorHandler
public function errorHandler($errno, $errstr, $errfile = '', $errline = 0, $errcontext = array()) { // get the current error reporting level $level = error_reporting(); // if error was supressed or $errno not set in current error level if ($level == 0 || ($level & $errno) == 0) { ...
php
public function errorHandler($errno, $errstr, $errfile = '', $errline = 0, $errcontext = array()) { // get the current error reporting level $level = error_reporting(); // if error was supressed or $errno not set in current error level if ($level == 0 || ($level & $errno) == 0) { ...
[ "public", "function", "errorHandler", "(", "$", "errno", ",", "$", "errstr", ",", "$", "errfile", "=", "''", ",", "$", "errline", "=", "0", ",", "$", "errcontext", "=", "array", "(", ")", ")", "{", "// get the current error reporting level", "$", "level", ...
The error handling function used when outputting captcha image or audio. This error handler helps determine if any errors raised would prevent captcha image or audio from displaying. If they have no effect on the output buffer or headers, true is returned so the script can continue processing. See https://github.com...
[ "The", "error", "handling", "function", "used", "when", "outputting", "captcha", "image", "or", "audio", "." ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3623-L3634
dapphp/securimage
securimage.php
Securimage_Color.constructRGB
protected function constructRGB($red, $green, $blue) { if ($red < 0) $red = 0; if ($red > 255) $red = 255; if ($green < 0) $green = 0; if ($green > 255) $green = 255; if ($blue < 0) $blue = 0; if ($blue > 255) $blue = 255; $this->r = $red; ...
php
protected function constructRGB($red, $green, $blue) { if ($red < 0) $red = 0; if ($red > 255) $red = 255; if ($green < 0) $green = 0; if ($green > 255) $green = 255; if ($blue < 0) $blue = 0; if ($blue > 255) $blue = 255; $this->r = $red; ...
[ "protected", "function", "constructRGB", "(", "$", "red", ",", "$", "green", ",", "$", "blue", ")", "{", "if", "(", "$", "red", "<", "0", ")", "$", "red", "=", "0", ";", "if", "(", "$", "red", ">", "255", ")", "$", "red", "=", "255", ";", "...
Construct from an rgb triplet @param int $red The red component, 0-255 @param int $green The green component, 0-255 @param int $blue The blue component, 0-255
[ "Construct", "from", "an", "rgb", "triplet" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3735-L3747
dapphp/securimage
securimage.php
Securimage_Color.constructHTML
protected function constructHTML($color) { if (strlen($color) == 3) { $red = str_repeat(substr($color, 0, 1), 2); $green = str_repeat(substr($color, 1, 1), 2); $blue = str_repeat(substr($color, 2, 1), 2); } else { $red = substr($color, 0, 2); ...
php
protected function constructHTML($color) { if (strlen($color) == 3) { $red = str_repeat(substr($color, 0, 1), 2); $green = str_repeat(substr($color, 1, 1), 2); $blue = str_repeat(substr($color, 2, 1), 2); } else { $red = substr($color, 0, 2); ...
[ "protected", "function", "constructHTML", "(", "$", "color", ")", "{", "if", "(", "strlen", "(", "$", "color", ")", "==", "3", ")", "{", "$", "red", "=", "str_repeat", "(", "substr", "(", "$", "color", ",", "0", ",", "1", ")", ",", "2", ")", ";...
Construct from an html hex color code @param string $color
[ "Construct", "from", "an", "html", "hex", "color", "code" ]
train
https://github.com/dapphp/securimage/blob/1ecb884797c66e01a875c058def46c85aecea45b/securimage.php#L3754-L3769
eveseat/web
src/Http/Composers/AbstractMenu.php
AbstractMenu.load_plugin_menu
public function load_plugin_menu($package_name, $menu_data, bool $require_affiliation = false) { // Validate the package menu $this->validate_menu($package_name, $menu_data); // Check if the current user has the permission // required to see the menu if (isset($menu_data['p...
php
public function load_plugin_menu($package_name, $menu_data, bool $require_affiliation = false) { // Validate the package menu $this->validate_menu($package_name, $menu_data); // Check if the current user has the permission // required to see the menu if (isset($menu_data['p...
[ "public", "function", "load_plugin_menu", "(", "$", "package_name", ",", "$", "menu_data", ",", "bool", "$", "require_affiliation", "=", "false", ")", "{", "// Validate the package menu", "$", "this", "->", "validate_menu", "(", "$", "package_name", ",", "$", "m...
Load menus from any registered plugins. This may end up being quite a complex method, as we need to validate a lot of the menu structure that is set out. Packages should register menu items in a config file, loaded in a ServiceProvider's register() method in the 'package.sidebar' namespace. The structure of these men...
[ "Load", "menus", "from", "any", "registered", "plugins", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Composers/AbstractMenu.php#L58-L83
eveseat/web
src/Http/Composers/AbstractMenu.php
AbstractMenu.validate_menu
public function validate_menu($package_name, $menu_data) { if (! is_string($package_name)) throw new PackageMenuBuilderException( 'Package root menu items should be named by string type'); if (! is_array($menu_data)) throw new PackageMenuBuilderException( ...
php
public function validate_menu($package_name, $menu_data) { if (! is_string($package_name)) throw new PackageMenuBuilderException( 'Package root menu items should be named by string type'); if (! is_array($menu_data)) throw new PackageMenuBuilderException( ...
[ "public", "function", "validate_menu", "(", "$", "package_name", ",", "$", "menu_data", ")", "{", "if", "(", "!", "is_string", "(", "$", "package_name", ")", ")", "throw", "new", "PackageMenuBuilderException", "(", "'Package root menu items should be named by string t...
The actual menu validation logic. @param $package_name @param $menu_data @throws \Seat\Web\Exceptions\PackageMenuBuilderException
[ "The", "actual", "menu", "validation", "logic", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Composers/AbstractMenu.php#L93-L162
eveseat/web
src/Http/Controllers/Character/MailController.php
MailController.getMailData
public function getMailData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ...
php
public function getMailData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ...
[ "public", "function", "getMailData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'all_linked_characters'", ")", ")", "return", "abort", "(", "500", ")", ";", "if", "(", "request", "(", "'all_linked_c...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/MailController.php#L58-L104
eveseat/web
src/Http/Controllers/Character/MailController.php
MailController.getMailRead
public function getMailRead(int $character_id, int $message_id) { $message = $this->getCharacterMailMessage($character_id, $message_id); $from = CharacterInfo::find($message->from) ?: $message->from; $characters = $message ->recipients ->where('recipient_type', 'ch...
php
public function getMailRead(int $character_id, int $message_id) { $message = $this->getCharacterMailMessage($character_id, $message_id); $from = CharacterInfo::find($message->from) ?: $message->from; $characters = $message ->recipients ->where('recipient_type', 'ch...
[ "public", "function", "getMailRead", "(", "int", "$", "character_id", ",", "int", "$", "message_id", ")", "{", "$", "message", "=", "$", "this", "->", "getCharacterMailMessage", "(", "$", "character_id", ",", "$", "message_id", ")", ";", "$", "from", "=", ...
@param int $character_id @param int $message_id @return \Illuminate\View\View @throws \Throwable
[ "@param", "int", "$character_id", "@param", "int", "$message_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/MailController.php#L113-L139
eveseat/web
src/Http/Controllers/Corporation/WalletController.php
WalletController.getJournalData
public function getJournalData(int $corporation_id) { if (! request()->has('division')) return abort(500); $journal = $this->getCorporationWalletJournal($corporation_id, (int) request('division')); return DataTables::of($journal) ->editColumn('ref_type', function ($...
php
public function getJournalData(int $corporation_id) { if (! request()->has('division')) return abort(500); $journal = $this->getCorporationWalletJournal($corporation_id, (int) request('division')); return DataTables::of($journal) ->editColumn('ref_type', function ($...
[ "public", "function", "getJournalData", "(", "int", "$", "corporation_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'division'", ")", ")", "return", "abort", "(", "500", ")", ";", "$", "journal", "=", "$", "this", "->", "getC...
@param int $corporation_id @return mixed @throws \Exception
[ "@param", "int", "$corporation_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/WalletController.php#L59-L128
eveseat/web
src/Http/Controllers/Corporation/WalletController.php
WalletController.getTransactionsData
public function getTransactionsData(int $corporation_id) { $transactions = $this->getCorporationWalletTransactions($corporation_id, false); return DataTables::of($transactions) ->editColumn('is_buy', function ($row) { return view('web::partials.transactiontype', compac...
php
public function getTransactionsData(int $corporation_id) { $transactions = $this->getCorporationWalletTransactions($corporation_id, false); return DataTables::of($transactions) ->editColumn('is_buy', function ($row) { return view('web::partials.transactiontype', compac...
[ "public", "function", "getTransactionsData", "(", "int", "$", "corporation_id", ")", "{", "$", "transactions", "=", "$", "this", "->", "getCorporationWalletTransactions", "(", "$", "corporation_id", ",", "false", ")", ";", "return", "DataTables", "::", "of", "("...
@param int $corporation_id @return mixed @throws \Exception
[ "@param", "int", "$corporation_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/WalletController.php#L147-L174
eveseat/web
src/Http/Controllers/Corporation/LedgerController.php
LedgerController.getBountyPrizesByMonth
public function getBountyPrizesByMonth(int $corporation_id, $year = null, $month = null) { ! is_null($year) ? $year : $year = date('Y'); ! is_null($month) ? $year : $month = date('m'); $bountyprizes = $this->getCorporationLedgerBountyPrizeDates( $corporation_id); $boun...
php
public function getBountyPrizesByMonth(int $corporation_id, $year = null, $month = null) { ! is_null($year) ? $year : $year = date('Y'); ! is_null($month) ? $year : $month = date('m'); $bountyprizes = $this->getCorporationLedgerBountyPrizeDates( $corporation_id); $boun...
[ "public", "function", "getBountyPrizesByMonth", "(", "int", "$", "corporation_id", ",", "$", "year", "=", "null", ",", "$", "month", "=", "null", ")", "{", "!", "is_null", "(", "$", "year", ")", "?", "$", "year", ":", "$", "year", "=", "date", "(", ...
@param $corporation_id @param null $year @param null $month @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "@param", "$corporation_id", "@param", "null", "$year", "@param", "null", "$month" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/LedgerController.php#L61-L76
eveseat/web
src/Http/Controllers/Corporation/LedgerController.php
LedgerController.getPlanetaryInteractionByMonth
public function getPlanetaryInteractionByMonth(int $corporation_id, $year = null, $month = null) { ! is_null($year) ? $year : $year = date('Y'); ! is_null($month) ? $year : $month = date('m'); $pidates = $this->getCorporationLedgerPIDates($corporation_id); $pitotals = $this->getCo...
php
public function getPlanetaryInteractionByMonth(int $corporation_id, $year = null, $month = null) { ! is_null($year) ? $year : $year = date('Y'); ! is_null($month) ? $year : $month = date('m'); $pidates = $this->getCorporationLedgerPIDates($corporation_id); $pitotals = $this->getCo...
[ "public", "function", "getPlanetaryInteractionByMonth", "(", "int", "$", "corporation_id", ",", "$", "year", "=", "null", ",", "$", "month", "=", "null", ")", "{", "!", "is_null", "(", "$", "year", ")", "?", "$", "year", ":", "$", "year", "=", "date", ...
@param $corporation_id @param null $year @param null $month @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "@param", "$corporation_id", "@param", "null", "$year", "@param", "null", "$month" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/LedgerController.php#L85-L98
eveseat/web
src/Events/SecLog.php
SecLog.handle
public static function handle($message, $category = null) { SecurityLog::create([ 'message' => $message, 'category' => $category, 'user_id' => auth()->user() ? auth()->user()->id : null, ]); }
php
public static function handle($message, $category = null) { SecurityLog::create([ 'message' => $message, 'category' => $category, 'user_id' => auth()->user() ? auth()->user()->id : null, ]); }
[ "public", "static", "function", "handle", "(", "$", "message", ",", "$", "category", "=", "null", ")", "{", "SecurityLog", "::", "create", "(", "[", "'message'", "=>", "$", "message", ",", "'category'", "=>", "$", "category", ",", "'user_id'", "=>", "aut...
Write an entry in the security log. @param $message @param $category
[ "Write", "an", "entry", "in", "the", "security", "log", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Events/SecLog.php#L35-L45
eveseat/web
src/Extentions/EveOnlineProvider.php
EveOnlineProvider.user
public function user() { if ($this->hasInvalidState()) throw new InvalidStateException; $tokens = $this->getAccessTokenResponse($this->getCode()); $user = $this->mapUserToObject( array_merge( $this->getUserByToken($tokens['access_token']), [ ...
php
public function user() { if ($this->hasInvalidState()) throw new InvalidStateException; $tokens = $this->getAccessTokenResponse($this->getCode()); $user = $this->mapUserToObject( array_merge( $this->getUserByToken($tokens['access_token']), [ ...
[ "public", "function", "user", "(", ")", "{", "if", "(", "$", "this", "->", "hasInvalidState", "(", ")", ")", "throw", "new", "InvalidStateException", ";", "$", "tokens", "=", "$", "this", "->", "getAccessTokenResponse", "(", "$", "this", "->", "getCode", ...
Get the User instance for the authenticated user. @return \Laravel\Socialite\Contracts\User
[ "Get", "the", "User", "instance", "for", "the", "authenticated", "user", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Extentions/EveOnlineProvider.php#L56-L73
eveseat/web
src/Extentions/EveOnlineProvider.php
EveOnlineProvider.mapUserToObject
protected function mapUserToObject(array $user): User { return (new User)->setRaw($user)->map([ 'character_id' => $user['CharacterID'], 'name' => $user['CharacterName'], 'character_owner_hash' => $user['CharacterOwnerHash'], 'scopes' ...
php
protected function mapUserToObject(array $user): User { return (new User)->setRaw($user)->map([ 'character_id' => $user['CharacterID'], 'name' => $user['CharacterName'], 'character_owner_hash' => $user['CharacterOwnerHash'], 'scopes' ...
[ "protected", "function", "mapUserToObject", "(", "array", "$", "user", ")", ":", "User", "{", "return", "(", "new", "User", ")", "->", "setRaw", "(", "$", "user", ")", "->", "map", "(", "[", "'character_id'", "=>", "$", "user", "[", "'CharacterID'", "]...
Map the raw user array to a Socialite User instance. @param array $user @return \Laravel\Socialite\Two\User
[ "Map", "the", "raw", "user", "array", "to", "a", "Socialite", "User", "instance", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Extentions/EveOnlineProvider.php#L82-L94
eveseat/web
src/Http/Composers/CharacterSummary.php
CharacterSummary.compose
public function compose(View $view) { $owner = $this->getUser($this->request->character_id); $summary = $owner->character; $characters = $owner->group->users; $view->with('summary', $summary); $view->with('characters', $characters); }
php
public function compose(View $view) { $owner = $this->getUser($this->request->character_id); $summary = $owner->character; $characters = $owner->group->users; $view->with('summary', $summary); $view->with('characters', $characters); }
[ "public", "function", "compose", "(", "View", "$", "view", ")", "{", "$", "owner", "=", "$", "this", "->", "getUser", "(", "$", "this", "->", "request", "->", "character_id", ")", ";", "$", "summary", "=", "$", "owner", "->", "character", ";", "$", ...
Bind data to the view. @param View $view @return void
[ "Bind", "data", "to", "the", "view", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Composers/CharacterSummary.php#L60-L69
eveseat/web
src/Http/Controllers/Support/ListController.php
ListController.getInvTypes
public function getInvTypes(Request $request) { return response()->json([ 'results' => DB::table('invTypes') ->select('typeName as id', 'typeName as text') ->where('typeName', 'like', '%' . $request->q . '%')->get(), ]); }
php
public function getInvTypes(Request $request) { return response()->json([ 'results' => DB::table('invTypes') ->select('typeName as id', 'typeName as text') ->where('typeName', 'like', '%' . $request->q . '%')->get(), ]); }
[ "public", "function", "getInvTypes", "(", "Request", "$", "request", ")", "{", "return", "response", "(", ")", "->", "json", "(", "[", "'results'", "=>", "DB", "::", "table", "(", "'invTypes'", ")", "->", "select", "(", "'typeName as id'", ",", "'typeName ...
@param \Illuminate\Http\Request $request @return \Illuminate\Http\JsonResponse
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Support/ListController.php#L40-L49
eveseat/web
src/Http/Controllers/Support/ListController.php
ListController.getSeatUserList
public function getSeatUserList(Request $request) { return response()->json([ 'results' => DB::table('users') ->select('id', 'name as text') ->where('name', 'like', '%' . $request->q . '%') ->orderBy('name', 'asc') ->get(), ...
php
public function getSeatUserList(Request $request) { return response()->json([ 'results' => DB::table('users') ->select('id', 'name as text') ->where('name', 'like', '%' . $request->q . '%') ->orderBy('name', 'asc') ->get(), ...
[ "public", "function", "getSeatUserList", "(", "Request", "$", "request", ")", "{", "return", "response", "(", ")", "->", "json", "(", "[", "'results'", "=>", "DB", "::", "table", "(", "'users'", ")", "->", "select", "(", "'id'", ",", "'name as text'", ")...
@param \Illuminate\Http\Request $request @return \Illuminate\Http\JsonResponse
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Support/ListController.php#L56-L66
eveseat/web
src/Http/Validation/ReassignUser.php
ReassignUser.rules
public function rules() { return [ 'user_id' => 'required|exists:users,id', 'group_id' => [ 'required', 'exists:groups,id', function ($attribute, $value, $fail) { // retrieve admin group, if any ...
php
public function rules() { return [ 'user_id' => 'required|exists:users,id', 'group_id' => [ 'required', 'exists:groups,id', function ($attribute, $value, $fail) { // retrieve admin group, if any ...
[ "public", "function", "rules", "(", ")", "{", "return", "[", "'user_id'", "=>", "'required|exists:users,id'", ",", "'group_id'", "=>", "[", "'required'", ",", "'exists:groups,id'", ",", "function", "(", "$", "attribute", ",", "$", "value", ",", "$", "fail", ...
Get the validation rules that apply to the request. @return array
[ "Get", "the", "validation", "rules", "that", "apply", "to", "the", "request", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Validation/ReassignUser.php#L50-L73
eveseat/web
src/Http/Controllers/Character/SheetController.php
SheetController.getSheet
public function getSheet(int $character_id) { // TODO: Revert to repository pattern. // Ensure we've the public information for this character // If not, redirect back with an error. // TODO : queue a job which will pull public data for this toon if (! $character_info = Ch...
php
public function getSheet(int $character_id) { // TODO: Revert to repository pattern. // Ensure we've the public information for this character // If not, redirect back with an error. // TODO : queue a job which will pull public data for this toon if (! $character_info = Ch...
[ "public", "function", "getSheet", "(", "int", "$", "character_id", ")", "{", "// TODO: Revert to repository pattern.", "// Ensure we've the public information for this character", "// If not, redirect back with an error.", "// TODO : queue a job which will pull public data for this toon", ...
@param $character_id @return \Illuminate\View\View
[ "@param", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/SheetController.php#L54-L79
eveseat/web
src/Http/Controllers/Character/WalletController.php
WalletController.getJournalData
public function getJournalData(int $character_id) { if (! request()->has('all_linked_characters')) return response('required url parameter is missing!', 400); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group = Us...
php
public function getJournalData(int $character_id) { if (! request()->has('all_linked_characters')) return response('required url parameter is missing!', 400); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group = Us...
[ "public", "function", "getJournalData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'all_linked_characters'", ")", ")", "return", "response", "(", "'required url parameter is missing!'", ",", "400", ")", "...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/WalletController.php#L57-L142
eveseat/web
src/Http/Controllers/Character/WalletController.php
WalletController.getJournalGraphBalance
public function getJournalGraphBalance(int $character_id) { $data = $this->getCharacterWalletJournal(collect($character_id)) ->orderBy('date', 'desc') ->take(150) ->get(); return response()->json([ 'labels' => $data->map(function ($item) { ...
php
public function getJournalGraphBalance(int $character_id) { $data = $this->getCharacterWalletJournal(collect($character_id)) ->orderBy('date', 'desc') ->take(150) ->get(); return response()->json([ 'labels' => $data->map(function ($item) { ...
[ "public", "function", "getJournalGraphBalance", "(", "int", "$", "character_id", ")", "{", "$", "data", "=", "$", "this", "->", "getCharacterWalletJournal", "(", "collect", "(", "$", "character_id", ")", ")", "->", "orderBy", "(", "'date'", ",", "'desc'", ")...
@param int $character_id @return \Illuminate\Http\JsonResponse
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/WalletController.php#L149-L187
eveseat/web
src/Http/Controllers/Character/WalletController.php
WalletController.getTransactionsData
public function getTransactionsData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group = User::find($character_id)->group->use...
php
public function getTransactionsData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group = User::find($character_id)->group->use...
[ "public", "function", "getTransactionsData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'all_linked_characters'", ")", ")", "return", "abort", "(", "500", ")", ";", "if", "(", "request", "(", "'all_...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/WalletController.php#L206-L254
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getTopWalletJournalData
public function getTopWalletJournalData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ->filter(function ($user) { ...
php
public function getTopWalletJournalData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ->filter(function ($user) { ...
[ "public", "function", "getTopWalletJournalData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'all_linked_characters'", ")", ")", "return", "abort", "(", "500", ")", ";", "$", "character_ids", "=", "col...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L71-L119
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getTopTransactionsData
public function getTopTransactionsData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ->filter(function ($user) { r...
php
public function getTopTransactionsData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ->filter(function ($user) { r...
[ "public", "function", "getTopTransactionsData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'all_linked_characters'", ")", ")", "return", "abort", "(", "500", ")", ";", "$", "character_ids", "=", "coll...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L127-L162
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getTopMailFromData
public function getTopMailFromData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ->filter(function ($user) { retur...
php
public function getTopMailFromData(int $character_id) { if (! request()->has('all_linked_characters')) return abort(500); $character_ids = collect($character_id); $user_group = User::find($character_id)->group->users ->filter(function ($user) { retur...
[ "public", "function", "getTopMailFromData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'all_linked_characters'", ")", ")", "return", "abort", "(", "500", ")", ";", "$", "character_ids", "=", "collect"...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L170-L204
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getCompareStandingsWithProfileData
public function getCompareStandingsWithProfileData(int $character_id, int $profile_id) { $journal = $this->getCharacterJournalStandingsWithProfile($character_id, $profile_id); return DataTables::of($journal) ->editColumn('characterName', function ($row) { return view('...
php
public function getCompareStandingsWithProfileData(int $character_id, int $profile_id) { $journal = $this->getCharacterJournalStandingsWithProfile($character_id, $profile_id); return DataTables::of($journal) ->editColumn('characterName', function ($row) { return view('...
[ "public", "function", "getCompareStandingsWithProfileData", "(", "int", "$", "character_id", ",", "int", "$", "profile_id", ")", "{", "$", "journal", "=", "$", "this", "->", "getCharacterJournalStandingsWithProfile", "(", "$", "character_id", ",", "$", "profile_id",...
@param int $character_id @param int $profile_id @return \Illuminate\Contracts\View\Factory|View @throws \Exception
[ "@param", "int", "$character_id", "@param", "int", "$profile_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L226-L250
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getNotesData
public function getNotesData(int $character_id) { return DataTables::of(CharacterInfo::getNotes($character_id)) ->addColumn('actions', function ($row) { return view('web::character.intel.partials.notesactions', compact('row')) ->render(); }) ...
php
public function getNotesData(int $character_id) { return DataTables::of(CharacterInfo::getNotes($character_id)) ->addColumn('actions', function ($row) { return view('web::character.intel.partials.notesactions', compact('row')) ->render(); }) ...
[ "public", "function", "getNotesData", "(", "int", "$", "character_id", ")", "{", "return", "DataTables", "::", "of", "(", "CharacterInfo", "::", "getNotes", "(", "$", "character_id", ")", ")", "->", "addColumn", "(", "'actions'", ",", "function", "(", "$", ...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L270-L282
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getSingleNotesData
public function getSingleNotesData(int $character_id, int $note_id) { return response()->json( CharacterInfo::getNote($character_id, $note_id)->first()); }
php
public function getSingleNotesData(int $character_id, int $note_id) { return response()->json( CharacterInfo::getNote($character_id, $note_id)->first()); }
[ "public", "function", "getSingleNotesData", "(", "int", "$", "character_id", ",", "int", "$", "note_id", ")", "{", "return", "response", "(", ")", "->", "json", "(", "CharacterInfo", "::", "getNote", "(", "$", "character_id", ",", "$", "note_id", ")", "->"...
@param int $character_id @param int $note_id @return \Illuminate\Http\JsonResponse
[ "@param", "int", "$character_id", "@param", "int", "$note_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L290-L296
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.postAddNew
public function postAddNew(NewIntelNote $request, int $character_id) { CharacterInfo::addNote( $character_id, $request->input('title'), $request->input('note')); return redirect()->back() ->with('success', 'Note Added'); }
php
public function postAddNew(NewIntelNote $request, int $character_id) { CharacterInfo::addNote( $character_id, $request->input('title'), $request->input('note')); return redirect()->back() ->with('success', 'Note Added'); }
[ "public", "function", "postAddNew", "(", "NewIntelNote", "$", "request", ",", "int", "$", "character_id", ")", "{", "CharacterInfo", "::", "addNote", "(", "$", "character_id", ",", "$", "request", "->", "input", "(", "'title'", ")", ",", "$", "request", "-...
@param \Seat\Web\Http\Validation\NewIntelNote $request @param int $character_id @return \Illuminate\Http\RedirectResponse
[ "@param", "\\", "Seat", "\\", "Web", "\\", "Http", "\\", "Validation", "\\", "NewIntelNote", "$request", "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L304-L313
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getDeleteNote
public function getDeleteNote(int $character_id, int $note_id) { CharacterInfo::deleteNote($character_id, $note_id); return redirect()->back() ->with('success', 'Note deleted!'); }
php
public function getDeleteNote(int $character_id, int $note_id) { CharacterInfo::deleteNote($character_id, $note_id); return redirect()->back() ->with('success', 'Note deleted!'); }
[ "public", "function", "getDeleteNote", "(", "int", "$", "character_id", ",", "int", "$", "note_id", ")", "{", "CharacterInfo", "::", "deleteNote", "(", "$", "character_id", ",", "$", "note_id", ")", ";", "return", "redirect", "(", ")", "->", "back", "(", ...
@param int $character_id @param int $note_id @return \Illuminate\Http\RedirectResponse
[ "@param", "int", "$character_id", "@param", "int", "$note_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L321-L329
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.postUpdateNote
public function postUpdateNote(UpdateIntelNote $request, int $character_id) { CharacterInfo::updateNote( $character_id, $request->input('note_id'), $request->input('title'), $request->input('note')); return redirect()->back() ->with('success', 'Note ...
php
public function postUpdateNote(UpdateIntelNote $request, int $character_id) { CharacterInfo::updateNote( $character_id, $request->input('note_id'), $request->input('title'), $request->input('note')); return redirect()->back() ->with('success', 'Note ...
[ "public", "function", "postUpdateNote", "(", "UpdateIntelNote", "$", "request", ",", "int", "$", "character_id", ")", "{", "CharacterInfo", "::", "updateNote", "(", "$", "character_id", ",", "$", "request", "->", "input", "(", "'note_id'", ")", ",", "$", "re...
@param \Seat\Web\Http\Validation\UpdateIntelNote $request @param int $character_id @return \Illuminate\Http\RedirectResponse
[ "@param", "\\", "Seat", "\\", "Web", "\\", "Http", "\\", "Validation", "\\", "UpdateIntelNote", "$request", "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L337-L348
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getJournalContent
public function getJournalContent(int $first_party_id, int $second_party_id) { $journal = $this->characterWalletJournalInteractions($first_party_id, $second_party_id); return DataTables::of($journal) ->editColumn('ref_type', function ($row) { return view('web::partials...
php
public function getJournalContent(int $first_party_id, int $second_party_id) { $journal = $this->characterWalletJournalInteractions($first_party_id, $second_party_id); return DataTables::of($journal) ->editColumn('ref_type', function ($row) { return view('web::partials...
[ "public", "function", "getJournalContent", "(", "int", "$", "first_party_id", ",", "int", "$", "second_party_id", ")", "{", "$", "journal", "=", "$", "this", "->", "characterWalletJournalInteractions", "(", "$", "first_party_id", ",", "$", "second_party_id", ")", ...
@param int $first_party_id @param int $second_party_id @return mixed @throws \Exception
[ "@param", "int", "$first_party_id", "@param", "int", "$second_party_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L357-L427
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getTransactionContent
public function getTransactionContent(int $character_id, int $client_id) { $transactions = $this->characterWalletTransactionInteraction($character_id, $client_id); return DataTables::of($transactions) ->editColumn('is_buy', function ($row) { return view('web::partials....
php
public function getTransactionContent(int $character_id, int $client_id) { $transactions = $this->characterWalletTransactionInteraction($character_id, $client_id); return DataTables::of($transactions) ->editColumn('is_buy', function ($row) { return view('web::partials....
[ "public", "function", "getTransactionContent", "(", "int", "$", "character_id", ",", "int", "$", "client_id", ")", "{", "$", "transactions", "=", "$", "this", "->", "characterWalletTransactionInteraction", "(", "$", "character_id", ",", "$", "client_id", ")", ";...
@param int $character_id @param int $client_id @return mixed @throws \Exception
[ "@param", "int", "$character_id", "@param", "int", "$client_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L436-L467
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getTopMailContent
public function getTopMailContent(int $character_id, int $from) { $mail = $this->getMailContent($character_id, $from); return DataTables::of($mail) ->editColumn('from', function ($row) { $character_id = $row->character_id; $character = CharacterInfo::f...
php
public function getTopMailContent(int $character_id, int $from) { $mail = $this->getMailContent($character_id, $from); return DataTables::of($mail) ->editColumn('from', function ($row) { $character_id = $row->character_id; $character = CharacterInfo::f...
[ "public", "function", "getTopMailContent", "(", "int", "$", "character_id", ",", "int", "$", "from", ")", "{", "$", "mail", "=", "$", "this", "->", "getMailContent", "(", "$", "character_id", ",", "$", "from", ")", ";", "return", "DataTables", "::", "of"...
@param int $character_id @param int $from @return mixed @throws \Exception
[ "@param", "int", "$character_id", "@param", "int", "$from" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L476-L505
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getUniverseNameResolved
private function getUniverseNameResolved(int $character_id, int $first_party_id, int $second_party_id = null) : Collection { // f.e. market escrow -> self referential payment. if($first_party_id === $second_party_id) return collect([ 'character_id' => $character_id, ...
php
private function getUniverseNameResolved(int $character_id, int $first_party_id, int $second_party_id = null) : Collection { // f.e. market escrow -> self referential payment. if($first_party_id === $second_party_id) return collect([ 'character_id' => $character_id, ...
[ "private", "function", "getUniverseNameResolved", "(", "int", "$", "character_id", ",", "int", "$", "first_party_id", ",", "int", "$", "second_party_id", "=", "null", ")", ":", "Collection", "{", "// f.e. market escrow -> self referential payment.", "if", "(", "$", ...
@param int $character_id @param int $first_party_id @param int|null $second_party_id @return \Illuminate\Support\Collection
[ "@param", "int", "$character_id", "@param", "int", "$first_party_id", "@param", "int|null", "$second_party_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L514-L562
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getIntelView
private function getIntelView(string $type, int $character_id, int $first_other_id, int $second_other_id = null) : string { $universe_name = $this->getUniverseNameResolved($character_id, $first_other_id, $second_other_id); if($type === 'character') return $this->getCharacterIntelView($u...
php
private function getIntelView(string $type, int $character_id, int $first_other_id, int $second_other_id = null) : string { $universe_name = $this->getUniverseNameResolved($character_id, $first_other_id, $second_other_id); if($type === 'character') return $this->getCharacterIntelView($u...
[ "private", "function", "getIntelView", "(", "string", "$", "type", ",", "int", "$", "character_id", ",", "int", "$", "first_other_id", ",", "int", "$", "second_other_id", "=", "null", ")", ":", "string", "{", "$", "universe_name", "=", "$", "this", "->", ...
@param string $type @param int $character_id @param int $first_other_id @param int|null $second_other_id @return string
[ "@param", "string", "$type", "@param", "int", "$character_id", "@param", "int", "$first_other_id", "@param", "int|null", "$second_other_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L572-L587
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getCharacterIntelView
private function getCharacterIntelView(Collection $universe_name, int $character_id) : string { if ($universe_name->has('unknown_id')) return $this->getUnknownIntelView($universe_name); if (! $universe_name->has('character_id')) return ''; $character = CharacterInfo...
php
private function getCharacterIntelView(Collection $universe_name, int $character_id) : string { if ($universe_name->has('unknown_id')) return $this->getUnknownIntelView($universe_name); if (! $universe_name->has('character_id')) return ''; $character = CharacterInfo...
[ "private", "function", "getCharacterIntelView", "(", "Collection", "$", "universe_name", ",", "int", "$", "character_id", ")", ":", "string", "{", "if", "(", "$", "universe_name", "->", "has", "(", "'unknown_id'", ")", ")", "return", "$", "this", "->", "getU...
@param \Illuminate\Support\Collection $universe_name @param int $character_id @return string
[ "@param", "\\", "Illuminate", "\\", "Support", "\\", "Collection", "$universe_name" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L596-L607
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getCorporationIntelView
private function getCorporationIntelView(Collection $universe_name, int $character_id) : string { if ($universe_name->has('unknown_id')) return $this->getUnknownIntelView($universe_name); if (! $universe_name->has('corporation_id')) return ''; $corporation = Corpora...
php
private function getCorporationIntelView(Collection $universe_name, int $character_id) : string { if ($universe_name->has('unknown_id')) return $this->getUnknownIntelView($universe_name); if (! $universe_name->has('corporation_id')) return ''; $corporation = Corpora...
[ "private", "function", "getCorporationIntelView", "(", "Collection", "$", "universe_name", ",", "int", "$", "character_id", ")", ":", "string", "{", "if", "(", "$", "universe_name", "->", "has", "(", "'unknown_id'", ")", ")", "return", "$", "this", "->", "ge...
@param \Illuminate\Support\Collection $universe_name @param int $character_id @return string
[ "@param", "\\", "Illuminate", "\\", "Support", "\\", "Collection", "$universe_name" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L616-L627
eveseat/web
src/Http/Controllers/Character/IntelController.php
IntelController.getAllianceIntelView
private function getAllianceIntelView(Collection $universe_name, int $character_id) : string { if ($universe_name->has('unknown_id')) return $this->getUnknownIntelView($universe_name); if (! $universe_name->has('alliance_id')) return ''; $alliance = $universe_name['...
php
private function getAllianceIntelView(Collection $universe_name, int $character_id) : string { if ($universe_name->has('unknown_id')) return $this->getUnknownIntelView($universe_name); if (! $universe_name->has('alliance_id')) return ''; $alliance = $universe_name['...
[ "private", "function", "getAllianceIntelView", "(", "Collection", "$", "universe_name", ",", "int", "$", "character_id", ")", ":", "string", "{", "if", "(", "$", "universe_name", "->", "has", "(", "'unknown_id'", ")", ")", "return", "$", "this", "->", "getUn...
@param \Illuminate\Support\Collection $universe_name @param int $character_id @return string
[ "@param", "\\", "Illuminate", "\\", "Support", "\\", "Collection", "$universe_name" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IntelController.php#L636-L647
eveseat/web
src/Http/Controllers/Corporation/StarbaseController.php
StarbaseController.getStarbases
public function getStarbases(int $corporation_id) { // The basic strategy here is that we will first try and get // as much information as possible about the starbases. // After that we will take the list of starbases and // attempt to determine the fuel usage as well as // ...
php
public function getStarbases(int $corporation_id) { // The basic strategy here is that we will first try and get // as much information as possible about the starbases. // After that we will take the list of starbases and // attempt to determine the fuel usage as well as // ...
[ "public", "function", "getStarbases", "(", "int", "$", "corporation_id", ")", "{", "// The basic strategy here is that we will first try and get", "// as much information as possible about the starbases.", "// After that we will take the list of starbases and", "// attempt to determine the f...
@param $corporation_id @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "@param", "$corporation_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/StarbaseController.php#L47-L59
eveseat/web
src/Http/Controllers/Corporation/StarbaseController.php
StarbaseController.postStarbaseModules
public function postStarbaseModules(StarbaseModule $request, int $corporation_id) { $starbase = $this->getCorporationStarbases($corporation_id, $request->starbase_id)->first(); $starbase_modules = $this->getStarbaseModules($corporation_id, $request->starbase_id); return view('web::corporat...
php
public function postStarbaseModules(StarbaseModule $request, int $corporation_id) { $starbase = $this->getCorporationStarbases($corporation_id, $request->starbase_id)->first(); $starbase_modules = $this->getStarbaseModules($corporation_id, $request->starbase_id); return view('web::corporat...
[ "public", "function", "postStarbaseModules", "(", "StarbaseModule", "$", "request", ",", "int", "$", "corporation_id", ")", "{", "$", "starbase", "=", "$", "this", "->", "getCorporationStarbases", "(", "$", "corporation_id", ",", "$", "request", "->", "starbase_...
@param \Seat\Web\Http\Validation\StarbaseModule $request @param $corporation_id @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "@param", "\\", "Seat", "\\", "Web", "\\", "Http", "\\", "Validation", "\\", "StarbaseModule", "$request", "@param", "$corporation_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/StarbaseController.php#L67-L76
eveseat/web
src/Http/Controllers/Character/CharacterController.php
CharacterController.getCharactersData
public function getCharactersData(Request $request) { $characters = ($request->filtered === 'true') ? auth()->user()->group->users ->filter(function ($user) { return $user->name !== 'admin' && $user->id !== 1; }) ->map(function...
php
public function getCharactersData(Request $request) { $characters = ($request->filtered === 'true') ? auth()->user()->group->users ->filter(function ($user) { return $user->name !== 'admin' && $user->id !== 1; }) ->map(function...
[ "public", "function", "getCharactersData", "(", "Request", "$", "request", ")", "{", "$", "characters", "=", "(", "$", "request", "->", "filtered", "===", "'true'", ")", "?", "auth", "(", ")", "->", "user", "(", ")", "->", "group", "->", "users", "->",...
@param \Symfony\Component\HttpFoundation\Request $request @return mixed @throws \Exception
[ "@param", "\\", "Symfony", "\\", "Component", "\\", "HttpFoundation", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/CharacterController.php#L55-L98
eveseat/web
src/Http/Controllers/Character/CharacterController.php
CharacterController.deleteCharacter
public function deleteCharacter(int $character_id) { CharacterInfo::find($character_id)->delete(); return redirect()->back()->with( 'success', 'Character deleted!' ); }
php
public function deleteCharacter(int $character_id) { CharacterInfo::find($character_id)->delete(); return redirect()->back()->with( 'success', 'Character deleted!' ); }
[ "public", "function", "deleteCharacter", "(", "int", "$", "character_id", ")", "{", "CharacterInfo", "::", "find", "(", "$", "character_id", ")", "->", "delete", "(", ")", ";", "return", "redirect", "(", ")", "->", "back", "(", ")", "->", "with", "(", ...
@param int $character_id @return \Illuminate\Http\RedirectResponse
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/CharacterController.php#L105-L113
eveseat/web
src/Http/Controllers/Character/SkillsController.php
SkillsController.getSkills
public function getSkills(int $character_id) { $skills = $this->getCharacterSkillsInformation($character_id); $skill_groups = $this->getEveSkillsGroups(); return view('web::character.skills', compact('skills', 'skill_groups')); }
php
public function getSkills(int $character_id) { $skills = $this->getCharacterSkillsInformation($character_id); $skill_groups = $this->getEveSkillsGroups(); return view('web::character.skills', compact('skills', 'skill_groups')); }
[ "public", "function", "getSkills", "(", "int", "$", "character_id", ")", "{", "$", "skills", "=", "$", "this", "->", "getCharacterSkillsInformation", "(", "$", "character_id", ")", ";", "$", "skill_groups", "=", "$", "this", "->", "getEveSkillsGroups", "(", ...
@param $character_id @return \Illuminate\View\View
[ "@param", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/SkillsController.php#L44-L52
eveseat/web
src/Http/Controllers/Character/SkillsController.php
SkillsController.getCharacterSkillsLevelChartData
public function getCharacterSkillsLevelChartData(int $character_id) { if ($character_id == 1) { return response()->json([]); } $data = $this->getCharacterSkillsAmountPerLevel($character_id); return response()->json([ 'labels' => [ 'Level 0...
php
public function getCharacterSkillsLevelChartData(int $character_id) { if ($character_id == 1) { return response()->json([]); } $data = $this->getCharacterSkillsAmountPerLevel($character_id); return response()->json([ 'labels' => [ 'Level 0...
[ "public", "function", "getCharacterSkillsLevelChartData", "(", "int", "$", "character_id", ")", "{", "if", "(", "$", "character_id", "==", "1", ")", "{", "return", "response", "(", ")", "->", "json", "(", "[", "]", ")", ";", "}", "$", "data", "=", "$",...
@param $character_id @return \Illuminate\Http\JsonResponse
[ "@param", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/SkillsController.php#L59-L86
eveseat/web
src/Http/Controllers/Character/SkillsController.php
SkillsController.getCharacterSkillsCoverageChartData
public function getCharacterSkillsCoverageChartData($character_id) { if ($character_id == 1) { return response()->json([]); } $data = $this->getCharacterSkillCoverage($character_id); $character = CharacterInfo::where('character_id', $character_id)->first(); re...
php
public function getCharacterSkillsCoverageChartData($character_id) { if ($character_id == 1) { return response()->json([]); } $data = $this->getCharacterSkillCoverage($character_id); $character = CharacterInfo::where('character_id', $character_id)->first(); re...
[ "public", "function", "getCharacterSkillsCoverageChartData", "(", "$", "character_id", ")", "{", "if", "(", "$", "character_id", "==", "1", ")", "{", "return", "response", "(", ")", "->", "json", "(", "[", "]", ")", ";", "}", "$", "data", "=", "$", "th...
@param $character_id @return \Illuminate\Http\JsonResponse
[ "@param", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/SkillsController.php#L93-L124
eveseat/web
src/Http/Controllers/Configuration/SsoController.php
SsoController.postUpdateScopes
public function postUpdateScopes(SsoScopes $request) { setting(['sso_scopes', $request->input('scopes')], true); return redirect()->back()->with('success', trans('web::seat.updated')); }
php
public function postUpdateScopes(SsoScopes $request) { setting(['sso_scopes', $request->input('scopes')], true); return redirect()->back()->with('success', trans('web::seat.updated')); }
[ "public", "function", "postUpdateScopes", "(", "SsoScopes", "$", "request", ")", "{", "setting", "(", "[", "'sso_scopes'", ",", "$", "request", "->", "input", "(", "'scopes'", ")", "]", ",", "true", ")", ";", "return", "redirect", "(", ")", "->", "back",...
@param \Seat\Web\Http\Validation\SsoScopes $request @return \Illuminate\Http\RedirectResponse @throws \Seat\Services\Exceptions\SettingException
[ "@param", "\\", "Seat", "\\", "Web", "\\", "Http", "\\", "Validation", "\\", "SsoScopes", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Configuration/SsoController.php#L49-L55
eveseat/web
src/Http/Composers/CharacterLayout.php
CharacterLayout.compose
public function compose(View $view) { $character_info = CharacterInfo::find($this->request->character_id); if (! is_null($character_info)) $view->with('character_name', $character_info->name); $user = User::find($this->request->character_id); if (! isset($user->refresh...
php
public function compose(View $view) { $character_info = CharacterInfo::find($this->request->character_id); if (! is_null($character_info)) $view->with('character_name', $character_info->name); $user = User::find($this->request->character_id); if (! isset($user->refresh...
[ "public", "function", "compose", "(", "View", "$", "view", ")", "{", "$", "character_info", "=", "CharacterInfo", "::", "find", "(", "$", "this", "->", "request", "->", "character_id", ")", ";", "if", "(", "!", "is_null", "(", "$", "character_info", ")",...
Bind Character Name to the view. @param View $view
[ "Bind", "Character", "Name", "to", "the", "view", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Composers/CharacterLayout.php#L49-L62
eveseat/web
src/Http/Controllers/Auth/SsoController.php
SsoController.handleProviderCallback
public function handleProviderCallback(Socialite $social) { $eve_data = $social->driver('eveonline')->user(); // Avoid self attachment if (auth()->check() && auth()->user()->id == $eve_data->character_id) return redirect()->route('home') ->with('error', 'You can...
php
public function handleProviderCallback(Socialite $social) { $eve_data = $social->driver('eveonline')->user(); // Avoid self attachment if (auth()->check() && auth()->user()->id == $eve_data->character_id) return redirect()->route('home') ->with('error', 'You can...
[ "public", "function", "handleProviderCallback", "(", "Socialite", "$", "social", ")", "{", "$", "eve_data", "=", "$", "social", "->", "driver", "(", "'eveonline'", ")", "->", "user", "(", ")", ";", "// Avoid self attachment", "if", "(", "auth", "(", ")", "...
Obtain the user information from Eve Online. @param \Laravel\Socialite\Contracts\Factory $social @return \Seat\Web\Http\Controllers\Auth\Response @throws \Seat\Services\Exceptions\SettingException
[ "Obtain", "the", "user", "information", "from", "Eve", "Online", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Auth/SsoController.php#L62-L96
eveseat/web
src/Http/Controllers/Auth/SsoController.php
SsoController.findOrCreateUser
private function findOrCreateUser(SocialiteUser $eve_user): User { // Check if this user already exists in the database. if ($existing = User::find($eve_user->character_id)) { // If the character_owner_hash has changed, it might be that // this character was transferred. We...
php
private function findOrCreateUser(SocialiteUser $eve_user): User { // Check if this user already exists in the database. if ($existing = User::find($eve_user->character_id)) { // If the character_owner_hash has changed, it might be that // this character was transferred. We...
[ "private", "function", "findOrCreateUser", "(", "SocialiteUser", "$", "eve_user", ")", ":", "User", "{", "// Check if this user already exists in the database.", "if", "(", "$", "existing", "=", "User", "::", "find", "(", "$", "eve_user", "->", "character_id", ")", ...
Check if a user exists in the database, else, create and return the User object. Group memberships are also managed here, ensuring that characters are automatically 'linked' via a group. If an existsing, logged in session is detected, the new login will be associated with that sessions group. Otherwise, a new group fo...
[ "Check", "if", "a", "user", "exists", "in", "the", "database", "else", "create", "and", "return", "the", "User", "object", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Auth/SsoController.php#L112-L183
eveseat/web
src/Http/Controllers/Auth/SsoController.php
SsoController.loginUser
public function loginUser(User $user): bool { // If this account is disabled, refuse to login if (! $user->active) { event('security.log', [ 'Login for ' . $user->name . ' refused due to a disabled account', 'authentication', ]); return false; ...
php
public function loginUser(User $user): bool { // If this account is disabled, refuse to login if (! $user->active) { event('security.log', [ 'Login for ' . $user->name . ' refused due to a disabled account', 'authentication', ]); return false; ...
[ "public", "function", "loginUser", "(", "User", "$", "user", ")", ":", "bool", "{", "// If this account is disabled, refuse to login", "if", "(", "!", "$", "user", "->", "active", ")", "{", "event", "(", "'security.log'", ",", "[", "'Login for '", ".", "$", ...
Login the user, ensuring that a group is attached. If no group is attached, ensure that the user at least has *a* group attached to it. This method returns a boolean as a status flag for the login routine. If a false is returned, it might mean that that account is not allowed to sign in. @param \Seat\Web\Models\User...
[ "Login", "the", "user", "ensuring", "that", "a", "group", "is", "attached", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Auth/SsoController.php#L218-L234
eveseat/web
src/Http/Controllers/Corporation/TrackingController.php
TrackingController.getMemberTracking
public function getMemberTracking(int $corporation_id) { $selected_status = collect(request('selected_refresh_token_status')); $tracking = $this->getCorporationMemberTracking($corporation_id); if($selected_status->contains('valid_token')) $tracking->has('user.refresh_token'); ...
php
public function getMemberTracking(int $corporation_id) { $selected_status = collect(request('selected_refresh_token_status')); $tracking = $this->getCorporationMemberTracking($corporation_id); if($selected_status->contains('valid_token')) $tracking->has('user.refresh_token'); ...
[ "public", "function", "getMemberTracking", "(", "int", "$", "corporation_id", ")", "{", "$", "selected_status", "=", "collect", "(", "request", "(", "'selected_refresh_token_status'", ")", ")", ";", "$", "tracking", "=", "$", "this", "->", "getCorporationMemberTra...
@param int $corporation_id @return mixed @throws \Exception
[ "@param", "int", "$corporation_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/TrackingController.php#L55-L130
eveseat/web
src/Http/Controllers/Corporation/ContractsController.php
ContractsController.getContractsData
public function getContractsData(int $corporation_id) { $contracts = $this->getCorporationContracts($corporation_id, false); return DataTables::of($contracts) ->editColumn('issuer_id', function ($row) { return view('web::partials.contractissuer', compact('row')) ...
php
public function getContractsData(int $corporation_id) { $contracts = $this->getCorporationContracts($corporation_id, false); return DataTables::of($contracts) ->editColumn('issuer_id', function ($row) { return view('web::partials.contractissuer', compact('row')) ...
[ "public", "function", "getContractsData", "(", "int", "$", "corporation_id", ")", "{", "$", "contracts", "=", "$", "this", "->", "getCorporationContracts", "(", "$", "corporation_id", ",", "false", ")", ";", "return", "DataTables", "::", "of", "(", "$", "con...
@param int $corporation_id @return mixed @throws \Exception
[ "@param", "int", "$corporation_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/ContractsController.php#L55-L102
eveseat/web
src/Http/Controllers/Corporation/ContractsController.php
ContractsController.getContractsItemsData
public function getContractsItemsData(int $corporation_id, int $contract_id) { $assets = $this->getCorporationContractsItems($corporation_id, $contract_id); return view('web::corporation.contractitems', compact('assets')); }
php
public function getContractsItemsData(int $corporation_id, int $contract_id) { $assets = $this->getCorporationContractsItems($corporation_id, $contract_id); return view('web::corporation.contractitems', compact('assets')); }
[ "public", "function", "getContractsItemsData", "(", "int", "$", "corporation_id", ",", "int", "$", "contract_id", ")", "{", "$", "assets", "=", "$", "this", "->", "getCorporationContractsItems", "(", "$", "corporation_id", ",", "$", "contract_id", ")", ";", "r...
@param int $corporation_id @param int $contract_id @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "@param", "int", "$corporation_id", "@param", "int", "$contract_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/ContractsController.php#L110-L116
eveseat/web
src/Http/Controllers/Support/SearchController.php
SearchController.getSearchCharactersData
public function getSearchCharactersData(Request $request) { $characters = $this->doSearchCharacters(); return DataTables::of($characters) ->editColumn('name', function ($row) { $character = CharacterInfo::find($row->character_id); return view('web::par...
php
public function getSearchCharactersData(Request $request) { $characters = $this->doSearchCharacters(); return DataTables::of($characters) ->editColumn('name', function ($row) { $character = CharacterInfo::find($row->character_id); return view('web::par...
[ "public", "function", "getSearchCharactersData", "(", "Request", "$", "request", ")", "{", "$", "characters", "=", "$", "this", "->", "doSearchCharacters", "(", ")", ";", "return", "DataTables", "::", "of", "(", "$", "characters", ")", "->", "editColumn", "(...
@param \Illuminate\Http\Request $request @return mixed @throws \Exception
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Support/SearchController.php#L62-L83
eveseat/web
src/Http/Controllers/Support/SearchController.php
SearchController.getSearchCorporationsData
public function getSearchCorporationsData(Request $request) { $corporations = $this->doSearchCorporations(); return DataTables::of($corporations) ->editColumn('name', function ($row) { $corporation = CorporationInfo::find($row->corporation_id) ?: $row->corporation_id; ...
php
public function getSearchCorporationsData(Request $request) { $corporations = $this->doSearchCorporations(); return DataTables::of($corporations) ->editColumn('name', function ($row) { $corporation = CorporationInfo::find($row->corporation_id) ?: $row->corporation_id; ...
[ "public", "function", "getSearchCorporationsData", "(", "Request", "$", "request", ")", "{", "$", "corporations", "=", "$", "this", "->", "doSearchCorporations", "(", ")", ";", "return", "DataTables", "::", "of", "(", "$", "corporations", ")", "->", "editColum...
@param \Illuminate\Http\Request $request @return mixed @throws \Exception
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Support/SearchController.php#L91-L120
eveseat/web
src/Http/Controllers/Support/SearchController.php
SearchController.getSearchMailData
public function getSearchMailData(Request $request) { $mail = $this->doSearchCharacterMail(); return DataTables::of($mail) ->editColumn('from', function ($row) { $character = CharacterInfo::find($row->from) ?: $row->from; return view('web::partials.cha...
php
public function getSearchMailData(Request $request) { $mail = $this->doSearchCharacterMail(); return DataTables::of($mail) ->editColumn('from', function ($row) { $character = CharacterInfo::find($row->from) ?: $row->from; return view('web::partials.cha...
[ "public", "function", "getSearchMailData", "(", "Request", "$", "request", ")", "{", "$", "mail", "=", "$", "this", "->", "doSearchCharacterMail", "(", ")", ";", "return", "DataTables", "::", "of", "(", "$", "mail", ")", "->", "editColumn", "(", "'from'", ...
@param \Illuminate\Http\Request $request @return mixed @throws \Exception
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Support/SearchController.php#L128-L177
eveseat/web
src/Http/Controllers/Support/SearchController.php
SearchController.getSearchCharacterAssetsData
public function getSearchCharacterAssetsData(Request $request) { $assets = $this->doSearchCharacterAssets(); return DataTables::of($assets) ->editColumn('characterName', function ($row) { $character = CharacterInfo::find($row->character_id) ?: $row->character_id; ...
php
public function getSearchCharacterAssetsData(Request $request) { $assets = $this->doSearchCharacterAssets(); return DataTables::of($assets) ->editColumn('characterName', function ($row) { $character = CharacterInfo::find($row->character_id) ?: $row->character_id; ...
[ "public", "function", "getSearchCharacterAssetsData", "(", "Request", "$", "request", ")", "{", "$", "assets", "=", "$", "this", "->", "doSearchCharacterAssets", "(", ")", ";", "return", "DataTables", "::", "of", "(", "$", "assets", ")", "->", "editColumn", ...
@param \Illuminate\Http\Request $request @return mixed @throws \Exception
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Support/SearchController.php#L185-L204
eveseat/web
src/Http/Controllers/Support/SearchController.php
SearchController.getSearchCharacterSkillsData
public function getSearchCharacterSkillsData(Request $request) { $skills = $this->doSearchCharacterSkills(); return DataTables::of($skills) ->editColumn('character_name', function ($row) { $character = CharacterInfo::find($row->character_id) ?: $row->character_id; ...
php
public function getSearchCharacterSkillsData(Request $request) { $skills = $this->doSearchCharacterSkills(); return DataTables::of($skills) ->editColumn('character_name', function ($row) { $character = CharacterInfo::find($row->character_id) ?: $row->character_id; ...
[ "public", "function", "getSearchCharacterSkillsData", "(", "Request", "$", "request", ")", "{", "$", "skills", "=", "$", "this", "->", "doSearchCharacterSkills", "(", ")", ";", "return", "DataTables", "::", "of", "(", "$", "skills", ")", "->", "editColumn", ...
@param \Illuminate\Http\Request $request @return mixed @throws \Exception
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Support/SearchController.php#L212-L237
eveseat/web
src/Http/Controllers/Corporation/MiningLedgerController.php
MiningLedgerController.getLedger
public function getLedger(int $corporation_id, int $year = null, int $month = null): View { if (is_null($year)) $year = date('Y'); if (is_null($month)) $month = date('m'); $ledgers = $this->getCorporationLedgers($corporation_id); $entries = $this->getCorpo...
php
public function getLedger(int $corporation_id, int $year = null, int $month = null): View { if (is_null($year)) $year = date('Y'); if (is_null($month)) $month = date('m'); $ledgers = $this->getCorporationLedgers($corporation_id); $entries = $this->getCorpo...
[ "public", "function", "getLedger", "(", "int", "$", "corporation_id", ",", "int", "$", "year", "=", "null", ",", "int", "$", "month", "=", "null", ")", ":", "View", "{", "if", "(", "is_null", "(", "$", "year", ")", ")", "$", "year", "=", "date", ...
@param int $corporation_id @param int|null $year @param int|null $month @return \Illuminate\View\View
[ "@param", "int", "$corporation_id", "@param", "int|null", "$year", "@param", "int|null", "$month" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/MiningLedgerController.php#L46-L60
eveseat/web
src/Http/Controllers/Corporation/MiningLedgerController.php
MiningLedgerController.getTracking
public function getTracking(int $corporation_id): View { $members = CorporationMemberTracking::where('corporation_id', $corporation_id)->get(); return view('mining-ledger::corporation.views.tracking', compact('members')); }
php
public function getTracking(int $corporation_id): View { $members = CorporationMemberTracking::where('corporation_id', $corporation_id)->get(); return view('mining-ledger::corporation.views.tracking', compact('members')); }
[ "public", "function", "getTracking", "(", "int", "$", "corporation_id", ")", ":", "View", "{", "$", "members", "=", "CorporationMemberTracking", "::", "where", "(", "'corporation_id'", ",", "$", "corporation_id", ")", "->", "get", "(", ")", ";", "return", "v...
@param int $corporation_id @return \Illuminate\View\View
[ "@param", "int", "$corporation_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Corporation/MiningLedgerController.php#L67-L73
eveseat/web
src/Http/Composers/User.php
User.compose
public function compose(View $view) { $view->with('user', Auth::user()); $view->with('user_characters', $this->getUserGroupCharacters(auth()->user()->group)); }
php
public function compose(View $view) { $view->with('user', Auth::user()); $view->with('user_characters', $this->getUserGroupCharacters(auth()->user()->group)); }
[ "public", "function", "compose", "(", "View", "$", "view", ")", "{", "$", "view", "->", "with", "(", "'user'", ",", "Auth", "::", "user", "(", ")", ")", ";", "$", "view", "->", "with", "(", "'user_characters'", ",", "$", "this", "->", "getUserGroupCh...
Bind data to the view. @param View $view @return void
[ "Bind", "data", "to", "the", "view", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Composers/User.php#L44-L49
eveseat/web
src/Events/Login.php
Login.handle
public static function handle(LoginEvent $event) { // Create a log entry for this login. $event->user->last_login_source = Request::getClientIp(); $event->user->last_login = new DateTime(); $event->user->save(); $event->user->login_history()->save(new UserLoginHistory([ ...
php
public static function handle(LoginEvent $event) { // Create a log entry for this login. $event->user->last_login_source = Request::getClientIp(); $event->user->last_login = new DateTime(); $event->user->save(); $event->user->login_history()->save(new UserLoginHistory([ ...
[ "public", "static", "function", "handle", "(", "LoginEvent", "$", "event", ")", "{", "// Create a log entry for this login.", "$", "event", "->", "user", "->", "last_login_source", "=", "Request", "::", "getClientIp", "(", ")", ";", "$", "event", "->", "user", ...
Update the last login values and write a new login history item. @param \Illuminate\Auth\Events\Login $event
[ "Update", "the", "last", "login", "values", "and", "write", "a", "new", "login", "history", "item", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Events/Login.php#L45-L70
eveseat/web
src/Http/Controllers/Character/ContractsController.php
ContractsController.getContractsData
public function getContractsData(int $character_id) { if (! request()->ajax()) return view('web::character.contacts'); if (! request()->has('all_linked_characters')) return response('required url parameter is missing!', 400); if (request('all_linked_characters') ===...
php
public function getContractsData(int $character_id) { if (! request()->ajax()) return view('web::character.contacts'); if (! request()->has('all_linked_characters')) return response('required url parameter is missing!', 400); if (request('all_linked_characters') ===...
[ "public", "function", "getContractsData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "ajax", "(", ")", ")", "return", "view", "(", "'web::character.contacts'", ")", ";", "if", "(", "!", "request", "(", ")", "-...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/ContractsController.php#L59-L191
eveseat/web
src/Http/Controllers/Character/ContractsController.php
ContractsController.getContractsItemsData
public function getContractsItemsData(int $character_id, int $contract_id) { $assets = $this->getCharacterContractsItems($character_id, $contract_id); return view('web::character.contractitems', compact('assets')); }
php
public function getContractsItemsData(int $character_id, int $contract_id) { $assets = $this->getCharacterContractsItems($character_id, $contract_id); return view('web::character.contractitems', compact('assets')); }
[ "public", "function", "getContractsItemsData", "(", "int", "$", "character_id", ",", "int", "$", "contract_id", ")", "{", "$", "assets", "=", "$", "this", "->", "getCharacterContractsItems", "(", "$", "character_id", ",", "$", "contract_id", ")", ";", "return"...
@param int $character_id @param int $contract_id @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "@param", "int", "$character_id", "@param", "int", "$contract_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/ContractsController.php#L199-L205
eveseat/web
src/Http/Composers/Sidebar.php
Sidebar.compose
public function compose(View $view) { // Grab the menu and sort it. $menu = config('package.sidebar'); ksort($menu); // Return the sidebar with the loaded packages menus $view->with('menu', collect($menu)->map(function ($menu_data, $package_name) { return $this...
php
public function compose(View $view) { // Grab the menu and sort it. $menu = config('package.sidebar'); ksort($menu); // Return the sidebar with the loaded packages menus $view->with('menu', collect($menu)->map(function ($menu_data, $package_name) { return $this...
[ "public", "function", "compose", "(", "View", "$", "view", ")", "{", "// Grab the menu and sort it.", "$", "menu", "=", "config", "(", "'package.sidebar'", ")", ";", "ksort", "(", "$", "menu", ")", ";", "// Return the sidebar with the loaded packages menus", "$", ...
Bind data to the view. @param View $view
[ "Bind", "data", "to", "the", "view", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Composers/Sidebar.php#L51-L70
eveseat/web
src/Http/Middleware/Bouncer/CorporationBouncer.php
CorporationBouncer.handle
public function handle(Request $request, Closure $next, $permission = null) { // Check on the clipboard if this permission // should be granted. if (auth()->user()->has('corporation.' . $permission)) return $next($request); $message = 'Request to ' . $request->path() . ...
php
public function handle(Request $request, Closure $next, $permission = null) { // Check on the clipboard if this permission // should be granted. if (auth()->user()->has('corporation.' . $permission)) return $next($request); $message = 'Request to ' . $request->path() . ...
[ "public", "function", "handle", "(", "Request", "$", "request", ",", "Closure", "$", "next", ",", "$", "permission", "=", "null", ")", "{", "// Check on the clipboard if this permission", "// should be granted.", "if", "(", "auth", "(", ")", "->", "user", "(", ...
Handle an incoming request. This filter checks if a specific permission exists as well as ensures that an affiliation to a corporation exists. @param \Illuminate\Http\Request $request @param \Closure $next @param null $permission @return \Illuminate\Http\RedirectResponse
[ "Handle", "an", "incoming", "request", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Middleware/Bouncer/CorporationBouncer.php#L47-L64
eveseat/web
src/Http/Controllers/Character/KillmailController.php
KillmailController.getKillmailsData
public function getKillmailsData(int $character_id) { if (! request()->has('all_linked_characters')) return response('required url parameter is missing!', 400); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group =...
php
public function getKillmailsData(int $character_id) { if (! request()->has('all_linked_characters')) return response('required url parameter is missing!', 400); if (request('all_linked_characters') === 'false') $character_ids = collect($character_id); $user_group =...
[ "public", "function", "getKillmailsData", "(", "int", "$", "character_id", ")", "{", "if", "(", "!", "request", "(", ")", "->", "has", "(", "'all_linked_characters'", ")", ")", "return", "response", "(", "'required url parameter is missing!'", ",", "400", ")", ...
@param int $character_id @return mixed @throws \Exception
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/KillmailController.php#L58-L129
eveseat/web
src/Http/Controllers/Configuration/UserController.php
UserController.editUser
public function editUser($user_id) { $user = $this->getFullUser($user_id); // get all groups except the one containing admin as admin account is special account // and the one to which the current user is already attached. $groups = $this->getAllGroups()->filter(function ($group, $...
php
public function editUser($user_id) { $user = $this->getFullUser($user_id); // get all groups except the one containing admin as admin account is special account // and the one to which the current user is already attached. $groups = $this->getAllGroups()->filter(function ($group, $...
[ "public", "function", "editUser", "(", "$", "user_id", ")", "{", "$", "user", "=", "$", "this", "->", "getFullUser", "(", "$", "user_id", ")", ";", "// get all groups except the one containing admin as admin account is special account", "// and the one to which the current ...
@param $user_id @return \Illuminate\View\View
[ "@param", "$user_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Configuration/UserController.php#L141-L158
eveseat/web
src/Http/Controllers/Configuration/UserController.php
UserController.updateUser
public function updateUser(EditUser $request) { // retrieve the group to which the edited user is attached. $group_id = User::find($request->input('user_id'))->group_id; // determine if the new e-mail address is already in use. $email_exists = UserSetting::where('name', 'email_addr...
php
public function updateUser(EditUser $request) { // retrieve the group to which the edited user is attached. $group_id = User::find($request->input('user_id'))->group_id; // determine if the new e-mail address is already in use. $email_exists = UserSetting::where('name', 'email_addr...
[ "public", "function", "updateUser", "(", "EditUser", "$", "request", ")", "{", "// retrieve the group to which the edited user is attached.", "$", "group_id", "=", "User", "::", "find", "(", "$", "request", "->", "input", "(", "'user_id'", ")", ")", "->", "group_i...
@param \Seat\Web\Http\Validation\EditUser $request @return mixed
[ "@param", "\\", "Seat", "\\", "Web", "\\", "Http", "\\", "Validation", "\\", "EditUser", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Configuration/UserController.php#L165-L190
eveseat/web
src/Http/Controllers/Configuration/UserController.php
UserController.postReassignuser
public function postReassignuser(ReassignUser $request) { $user = $this->getUser($request->input('user_id')); $current_group = $user->group; $user->fill([ 'group_id' => $request->input('group_id'), ]); $user->save(); // Ensure the old group is not an o...
php
public function postReassignuser(ReassignUser $request) { $user = $this->getUser($request->input('user_id')); $current_group = $user->group; $user->fill([ 'group_id' => $request->input('group_id'), ]); $user->save(); // Ensure the old group is not an o...
[ "public", "function", "postReassignuser", "(", "ReassignUser", "$", "request", ")", "{", "$", "user", "=", "$", "this", "->", "getUser", "(", "$", "request", "->", "input", "(", "'user_id'", ")", ")", ";", "$", "current_group", "=", "$", "user", "->", ...
@param \Seat\Web\Http\Validation\ReassignUser $request @return \Illuminate\Http\RedirectResponse
[ "@param", "\\", "Seat", "\\", "Web", "\\", "Http", "\\", "Validation", "\\", "ReassignUser", "$request" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Configuration/UserController.php#L197-L214
eveseat/web
src/Http/Controllers/Configuration/UserController.php
UserController.deleteUser
public function deleteUser(Request $request, $user_id) { if ($request->user()->id == $user_id) return redirect()->back() ->with('warning', trans('web::seat.self_delete_warning')); $user = $this->getUser($user_id); $group = $user->group; // Delete the us...
php
public function deleteUser(Request $request, $user_id) { if ($request->user()->id == $user_id) return redirect()->back() ->with('warning', trans('web::seat.self_delete_warning')); $user = $this->getUser($user_id); $group = $user->group; // Delete the us...
[ "public", "function", "deleteUser", "(", "Request", "$", "request", ",", "$", "user_id", ")", "{", "if", "(", "$", "request", "->", "user", "(", ")", "->", "id", "==", "$", "user_id", ")", "return", "redirect", "(", ")", "->", "back", "(", ")", "->...
@param \Illuminate\Http\Request $request @param $user_id @return mixed
[ "@param", "\\", "Illuminate", "\\", "Http", "\\", "Request", "$request", "@param", "$user_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Configuration/UserController.php#L236-L254
eveseat/web
src/Http/Controllers/Configuration/UserController.php
UserController.impersonate
public function impersonate($user_id) { // Store the original user in the session session(['impersonation_origin' => auth()->user()]); // Get the user $user = $this->getUser($user_id); // Log the impersonation event. event('security.log', [ 'Impersonati...
php
public function impersonate($user_id) { // Store the original user in the session session(['impersonation_origin' => auth()->user()]); // Get the user $user = $this->getUser($user_id); // Log the impersonation event. event('security.log', [ 'Impersonati...
[ "public", "function", "impersonate", "(", "$", "user_id", ")", "{", "// Store the original user in the session", "session", "(", "[", "'impersonation_origin'", "=>", "auth", "(", ")", "->", "user", "(", ")", "]", ")", ";", "// Get the user", "$", "user", "=", ...
@param $user_id @return mixed
[ "@param", "$user_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Configuration/UserController.php#L261-L294
eveseat/web
src/Http/Controllers/Character/IndustryController.php
IndustryController.getIndustryData
public function getIndustryData(int $character_id) { $jobs = $this->getCharacterIndustry($character_id, false); return DataTables::of($jobs) ->editColumn('installerName', function ($row) { return view('web::partials.industryinstaller', compact('row')) ...
php
public function getIndustryData(int $character_id) { $jobs = $this->getCharacterIndustry($character_id, false); return DataTables::of($jobs) ->editColumn('installerName', function ($row) { return view('web::partials.industryinstaller', compact('row')) ...
[ "public", "function", "getIndustryData", "(", "int", "$", "character_id", ")", "{", "$", "jobs", "=", "$", "this", "->", "getCharacterIndustry", "(", "$", "character_id", ",", "false", ")", ";", "return", "DataTables", "::", "of", "(", "$", "jobs", ")", ...
@param int $character_id @return mixed
[ "@param", "int", "$character_id" ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/Http/Controllers/Character/IndustryController.php#L53-L82
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.boot
public function boot(Router $router) { // Include the Routes $this->add_routes(); // Publish the JS & CSS, and Database migrations $this->add_publications(); // Inform Laravel how to load migrations $this->add_migrations(); // Add the views for the 'web' n...
php
public function boot(Router $router) { // Include the Routes $this->add_routes(); // Publish the JS & CSS, and Database migrations $this->add_publications(); // Inform Laravel how to load migrations $this->add_migrations(); // Add the views for the 'web' n...
[ "public", "function", "boot", "(", "Router", "$", "router", ")", "{", "// Include the Routes", "$", "this", "->", "add_routes", "(", ")", ";", "// Publish the JS & CSS, and Database migrations", "$", "this", "->", "add_publications", "(", ")", ";", "// Inform Larave...
Bootstrap the application services. @param \Illuminate\Routing\Router $router
[ "Bootstrap", "the", "application", "services", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L78-L113
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.add_view_composers
public function add_view_composers() { // User information view composer $this->app['view']->composer([ 'web::includes.header', 'web::includes.sidebar', ], User::class); // ESI Status view composer $this->app['view']->composer([ 'web::inc...
php
public function add_view_composers() { // User information view composer $this->app['view']->composer([ 'web::includes.header', 'web::includes.sidebar', ], User::class); // ESI Status view composer $this->app['view']->composer([ 'web::inc...
[ "public", "function", "add_view_composers", "(", ")", "{", "// User information view composer", "$", "this", "->", "app", "[", "'view'", "]", "->", "composer", "(", "[", "'web::includes.header'", ",", "'web::includes.sidebar'", ",", "]", ",", "User", "::", "class"...
Add the view composers. This allows us to make data available in views without repeating any of the code.
[ "Add", "the", "view", "composers", ".", "This", "allows", "us", "to", "make", "data", "available", "in", "views", "without", "repeating", "any", "of", "the", "code", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L155-L210
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.add_middleware
public function add_middleware($router) { // Authenticate checks that the session is // simply authenticated $router->aliasMiddleware('auth', Authenticate::class); // Ensure that all of the SeAT required modules is installed. $router->aliasMiddleware('requirements', Require...
php
public function add_middleware($router) { // Authenticate checks that the session is // simply authenticated $router->aliasMiddleware('auth', Authenticate::class); // Ensure that all of the SeAT required modules is installed. $router->aliasMiddleware('requirements', Require...
[ "public", "function", "add_middleware", "(", "$", "router", ")", "{", "// Authenticate checks that the session is", "// simply authenticated", "$", "router", "->", "aliasMiddleware", "(", "'auth'", ",", "Authenticate", "::", "class", ")", ";", "// Ensure that all of the S...
Include the middleware needed. @param $router
[ "Include", "the", "middleware", "needed", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L226-L251
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.add_events
public function add_events() { // Internal Authentication Events $this->app->events->listen(LoginEvent::class, Login::class); $this->app->events->listen(LogoutEvent::class, Logout::class); $this->app->events->listen(Attempting::class, Attempt::class); // Custom Events ...
php
public function add_events() { // Internal Authentication Events $this->app->events->listen(LoginEvent::class, Login::class); $this->app->events->listen(LogoutEvent::class, Logout::class); $this->app->events->listen(Attempting::class, Attempt::class); // Custom Events ...
[ "public", "function", "add_events", "(", ")", "{", "// Internal Authentication Events", "$", "this", "->", "app", "->", "events", "->", "listen", "(", "LoginEvent", "::", "class", ",", "Login", "::", "class", ")", ";", "$", "this", "->", "app", "->", "even...
Register the custom events that may fire for this package.
[ "Register", "the", "custom", "events", "that", "may", "fire", "for", "this", "package", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L257-L267
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.configure_horizon
public function configure_horizon() { // Require the queue_manager role to view the dashboard Horizon::auth(function ($request) { if (is_null($request->user())) return false; return $request->user()->has('queue_manager', false); }); // atte...
php
public function configure_horizon() { // Require the queue_manager role to view the dashboard Horizon::auth(function ($request) { if (is_null($request->user())) return false; return $request->user()->has('queue_manager', false); }); // atte...
[ "public", "function", "configure_horizon", "(", ")", "{", "// Require the queue_manager role to view the dashboard", "Horizon", "::", "auth", "(", "function", "(", "$", "request", ")", "{", "if", "(", "is_null", "(", "$", "request", "->", "user", "(", ")", ")", ...
Configure Horizon. This includes the access rules for the dashboard, as well as the number of workers to use for the job processor.
[ "Configure", "Horizon", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L284-L318
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.register
public function register() { // Merge the config with anything in the main app // Web package configurations $this->mergeConfigFrom( __DIR__ . '/Config/web.config.php', 'web.config'); $this->mergeConfigFrom( __DIR__ . '/Config/web.permissions.php', 'web.permi...
php
public function register() { // Merge the config with anything in the main app // Web package configurations $this->mergeConfigFrom( __DIR__ . '/Config/web.config.php', 'web.config'); $this->mergeConfigFrom( __DIR__ . '/Config/web.permissions.php', 'web.permi...
[ "public", "function", "register", "(", ")", "{", "// Merge the config with anything in the main app", "// Web package configurations", "$", "this", "->", "mergeConfigFrom", "(", "__DIR__", ".", "'/Config/web.config.php'", ",", "'web.config'", ")", ";", "$", "this", "->", ...
Register the application services. @return void
[ "Register", "the", "application", "services", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L325-L351
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.register_services
public function register_services() { // Register the Socialite Factory. // From: Laravel\Socialite\SocialiteServiceProvider $this->app->singleton('Laravel\Socialite\Contracts\Factory', function ($app) { return new SocialiteManager($app); }); // Slap in the Eve...
php
public function register_services() { // Register the Socialite Factory. // From: Laravel\Socialite\SocialiteServiceProvider $this->app->singleton('Laravel\Socialite\Contracts\Factory', function ($app) { return new SocialiteManager($app); }); // Slap in the Eve...
[ "public", "function", "register_services", "(", ")", "{", "// Register the Socialite Factory.", "// From: Laravel\\Socialite\\SocialiteServiceProvider", "$", "this", "->", "app", "->", "singleton", "(", "'Laravel\\Socialite\\Contracts\\Factory'", ",", "function", "(", "$", "a...
Register external services used in this package. Currently this consists of: - PragmaRX\Google2FA - Laravel\Socialite - Yajra\Datatables
[ "Register", "external", "services", "used", "in", "this", "package", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L361-L387
eveseat/web
src/WebServiceProvider.php
WebServiceProvider.configure_api
private function configure_api() { // ensure current annotations setting is an array of path or transform into it $current_annotations = config('l5-swagger.paths.annotations'); if (! is_array($current_annotations)) $current_annotations = [$current_annotations]; // merge...
php
private function configure_api() { // ensure current annotations setting is an array of path or transform into it $current_annotations = config('l5-swagger.paths.annotations'); if (! is_array($current_annotations)) $current_annotations = [$current_annotations]; // merge...
[ "private", "function", "configure_api", "(", ")", "{", "// ensure current annotations setting is an array of path or transform into it", "$", "current_annotations", "=", "config", "(", "'l5-swagger.paths.annotations'", ")", ";", "if", "(", "!", "is_array", "(", "$", "curren...
Update Laravel 5 Swagger annotation path.
[ "Update", "Laravel", "5", "Swagger", "annotation", "path", "." ]
train
https://github.com/eveseat/web/blob/397300911d4dc60a8a2e4cb06c9fd511f1b1558d/src/WebServiceProvider.php#L402-L416