blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
ca982ab5b71fa3d89a317b2fe0d19f218e0f1431 | PHP | jaiminpilojpara/DB-Migration-Generator | /tablename.php | UTF-8 | 800 | 2.5625 | 3 | [] | no_license | <?php
$conn = new mysqli("localhost", "root", "");
$db_name=$_POST["database_name"];
$sql = "SHOW TABLES FROM ".$db_name;
$resultTableName = $conn->query($sql);
if ($resultTableName->num_rows > 0) {
echo '<div class="form-group">';
echo '<label class="control-label col-md-2" for="Table">Table :</label>
<di... | true |
0d63fee41f590a0a857d3d0de744a95b35eaf90b | PHP | samyouaret/php-utility | /PHPUtility/FileSystem/tests/PathTest.php | UTF-8 | 2,794 | 2.890625 | 3 | [] | no_license | <?php
namespace PHPUtility\FileSystem;
require dirname(".", 2) . '/bootstrap.php';
use PHPUnit\Framework\TestCase;
use PHPUtility\FileSystem\Exceptions\InvalidPathException;
use PHPUtility\FileSystem\Utilities\Path;
class PathTest extends TestCase
{
protected function setUp(): void
{
$this->dir = _... | true |
7a034640e6085911908955724b7528f500d47c6b | PHP | cha63506/MU-Dev | /application/views/college/GetMatchUniversityOfPreant.php | UTF-8 | 107 | 2.5625 | 3 | [] | no_license | <?php
echo "Courses";
foreach($abc1 as $subCourse)
{
echo "<li>".$subCourse['name']."</li>";
}
?>
| true |
f565173bb27b2f480d11c7f6fbd22ecba86d2db4 | PHP | Deschanel/DuerSmartHome | /dueros.php | UTF-8 | 9,392 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
class dueros{
private $obj, $devices, $hassURL, $hassPASS;
public function __construct($obj, $devices, $hassURL, $hassPASS){
$this->obj = $obj;
$this->devices = $devices;
$this->hassURL = $hassURL;
$this->hassPASS = $hassPASS;
}
//获得messageID
public function ge... | true |
62e63f8382df928d65be9614be8f05867b807b39 | PHP | olafkryus/GeneRally | /src/Track/TrackData/Properties/SfLine.php | UTF-8 | 723 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Kryus\GeneRally\Track\TrackData\Properties;
use Kryus\Binary\DataType\Byte;
class SfLine
{
/** @var bool */
private $value;
/**.
* @param Byte $value
* @throws \Exception
*/
public function __construct(Byte $value)
{
$intValue = $va... | true |
c855bc5432b8e368bd796f808c530bbc0c44749e | PHP | jeyroik/extas-api | /src/components/routes/RouteDispatcher.php | UTF-8 | 1,335 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace extas\components\routes;
use extas\components\extensions\TExtendable;
use extas\interfaces\routes\IRoute;
use extas\interfaces\routes\IRouteDispatcher;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
abstract class RouteDispatcher implements IRouteDispatcher
{
... | true |
1f835302e103314e95280d1de3a4c32da9c55e63 | PHP | illdun/Guest | /classes.php | UTF-8 | 3,616 | 2.828125 | 3 | [] | no_license | <?php
class Comment
{
public $id;
public $checkform;
public $name;
public $email;
public $contents;
private function clear_me_up()
{
global $connect;
$this->id=mysqli_real_escape_string($connect, $this->id );
$this->name=mysqli_real_escape_string($connect, $this->name );
$this->email=mysqli_real_escape_s... | true |
255a7039dff6bda72723c602c9a615167c7f3253 | PHP | sgchris/grinotes | /src/api/tools/custom_session_handler.php | UTF-8 | 3,497 | 2.796875 | 3 | [] | no_license | <?php
class CustomSessionHandler extends SessionHandler
{
/**
* @var string
*/
private $sid;
/**
* @var \Zend\Cache\Storage\Adapter\Filesystem
*/
private $zendCacheObject = null;
// default max lifetime
const GC_MAX_LIFETIME = 1440;
/**
*
* @param mixed $sa... | true |
98182dbe66c3fb87a1e3e8e56f57e32b62afa6ff | PHP | diloabininyeri/dilovel | /src/Application/Models/Objectable/UserPassword.php | UTF-8 | 234 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Application\Models\Objectable;
use App\Components\Database\ObjectAbleProperty;
class UserPassword extends ObjectAbleProperty
{
public function strlen()
{
return strlen($this->property);
}
}
| true |
d6a3f502b135f8d70fc0acae04fbdb54269f1ba7 | PHP | umaxfun/x4m | /inc/ext/dropbox/sample.php | UTF-8 | 2,488 | 2.671875 | 3 | [] | no_license | <?php
/**
* DropPHP sample
*
* http://fabi.me/en/php-projects/dropphp-dropbox-api-client/
*
* @author Fabian Schlieper <fabian@fabi.me>
* @copyright Fabian Schlieper 2012
* @version 1.0
* @license See license.txt
*
*/
error_reporting(E_ALL);
require_once("DropboxClient.php");
// you have to cre... | true |
dda659b4d161642a5f3b23e5bd4c986beb7f918e | PHP | rositatisor/library | /src/Entity/Book.php | UTF-8 | 2,599 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\BookRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=BookRepository::class)
*/
class Book
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*... | true |
49fadc4b96bf95cce62645ded3199f52294559a8 | PHP | batistasilva/CIWebControl | /application/models/Company_model.php | UTF-8 | 11,240 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
//require_once 'Msg.php';
//require_once 'SMsg.php';
//require_once 'Customer.php';
//require_once 'Company.php';
//require_once 'CompanyAddr.php';
//require_once 'CustType.php';
//require_once 'Occupation.php';
//require_once 'Staff.php';
/*
* To change this license header, choose License Headers in Project P... | true |
4a81a4179270f17f548500eebe82ebe625dfcfde | PHP | bregzor/my_Webshop | /assets/php/user/set-password.php | UTF-8 | 382 | 2.515625 | 3 | [] | no_license | <?php require_once 'db.php';
$result = "";
$password = password_hash($_POST["password2"], PASSWORD_DEFAULT);
$email = $_POST["email"];
$sql = "UPDATE users SET password=:password WHERE email=:email";
$stmt = $db->prepare($sql);
if($stmt->execute([
':password' => $password,
':email' => $email,
])){
$result =... | true |
d79346eae96e2f3a50ecfce4a2e8c3f38ab4a90d | PHP | BITS-CO-ID/toko-laravel | /app/database/migrations/2014_04_07_100136_create_cat_produk.php | UTF-8 | 1,288 | 2.765625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCatProduk extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
//
Schema::create('categories', function($table) {
$tabl... | true |
9cb2c6e3fe7dbfde7a5b6b00fc9fc076716ec5ec | PHP | ielijose/clickatell | /src/Ielijose/Clickatell/Clickatell.php | UTF-8 | 1,056 | 2.8125 | 3 | [] | no_license | <?php namespace Ielijose\Clickatell;
class Clickatell {
private $user = "";
private $password = "";
private $api_id = "";
private $baseurl ="http://api.clickatell.com";
function __construct($config)
{
$this->user = $config['user'];
$this->password = $config['password'];
$this->api_id = $config['api_id'];... | true |
0de6b9a7447b06ef189301f4add46bd6d2c9fbb7 | PHP | ErickCoello/Proyecto-r | /controladores/CRUD.php | UTF-8 | 3,539 | 2.671875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
class Operaciones {
public $mysql;
public $z;
public $script_sql;
function __construct($tabla, $Obj... | true |
dc5027d91fb54078dccde61e825f9c86705864d1 | PHP | Yo-TR/Portfolio_TRANCHOT | /visiteur/VUE/projet/programation/TeamMeca_Tranchot/php/mes_fonctions.php | UTF-8 | 1,623 | 2.90625 | 3 | [] | no_license | <?php
// Se connecte à la DB
// Paramètres : nom de la base -> $name_DB
function connexion_DB($name_DB) {
// Déclaration des paramètres de connexion
$host = "localhost";
$user = "root";
$bdd = $name_DB;
$passwd = "";
// Connexion au serveur
mysqli_connect($host, $user,$passwd,$bdd) or die("erreur de connexion ... | true |
7357b80450536a1c8dfaa57929dff718c96c8fc8 | PHP | sunrise-php/http-router | /src/Exception/Exception.php | UTF-8 | 1,377 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Fenric <anatoly@fenric.ru>
* @copyright Copyright (c) 2018, Anatoly Fenric
* @license https://github.com/sunrise-php/http-router/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-... | true |
35ea00448db14992dbca39478a50b584d464ddea | PHP | NegoPrograma/php-cms | /models/ModelTemplate.php | UTF-8 | 714 | 3 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Model;
use Utils\DBConfig;
use \PDO;
use \PDOException;
class ModelTemplate
{
protected $db;
function __construct()
{
$this->initDatabase();
}
private function initDatabase()
{
$dsn = DBConfig::getDSN();
$dbHost = $dsn['dbHost'];
$dbName = $ds... | true |
0590b552eb49b6f243d76a89558b4988404d0ce6 | PHP | gcba/expobici | /data/scripts/accumRecorBici.php | UTF-8 | 1,804 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
////////////////
//
// Fecha: Noviembre 2014
// Proyecto: Expo Bici 2014
// Autor: Pili Mayora
//
// Output -> Archivo CSV con cantidad de viajes por mes
// Cuenta los viajes por mes
//
////////////////
// Configuracion de MySQL Database y source del JSON
include 'config.php';
// Abrir conexion a MySQL y se... | true |
a41eeb875347767610d5b50cf56abe196535dd4d | PHP | stevengomez72/SistemaNominas | /editar_transaccion.php | UTF-8 | 4,071 | 2.609375 | 3 | [] | no_license | <?php
include("db.php");
//////////////// Extraccion de Datos de Transaccion /////////////////////////////
if (isset($_GET['id'])) {
$id = $_GET['id'];
$query = "SELECT * FROM registro_transaccion WHERE id_registro_transaccion = $id";
$resultado = mysqli_query($conn, $query);
... | true |
31218b4f9ab4d58241309133305008049ddd772f | PHP | kijiji/haojing | /htdocs/lib/ValidatorTrait.php | UTF-8 | 1,068 | 3.28125 | 3 | [] | no_license | <?
//zhaojun@baixing.com
trait ValidatorTrait {
//todo: implement errors and message.
/*
* $rule can be bool and array:
* BOOL (0:none-required/1:required)
* Array ('rule_func', ['params']), eg:
* ['validNumber', 10, 100] should be valid for number between 10 and 100
* ['validMobile'] should... | true |
19922f54f62656e1e38c2648aa85ef530ca344a7 | PHP | snowlag/Todos_and_more | /views/ToDoList/routes.php | UTF-8 | 4,326 | 2.921875 | 3 | [] | no_license | <?php
require "../../config/db.php";
//--------------------------------------------------Routes for todo lists-------------------------------------------------------
//Route to add new item in todo list
if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['type']) && $_POST['type'] == "Post in Todolist") {
... | true |
b64190877b90f8cc28e9ec3699b0042c0f9efc8e | PHP | hawkesburygeek/flatapp | /app/views/blog/includes/list_posts.php | UTF-8 | 1,045 | 2.6875 | 3 | [] | no_license | <?php
PageFinder::sortTreeAsc($posts);
$postCount = 0;
$numberOfPosts = count($posts);
$paginationCount = 0;
$postsPerPage = \Jade\Config::get('blog.postsPerPage');
$paginationStart = \Jade\Input::Get('start', 1);
$paginationControl = new Pagination($postsPerPage, $paginationStart, $posts);
$posts = $paginationCon... | true |
09d8e6be9cb59abef9cb738a710c371da7eb86ca | PHP | janvernieuwe/sotw-bot | /src/Subscriber/AddReactionSubscriber.php | UTF-8 | 1,781 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Subscriber;
use App\Command\CommandParser;
use App\Event\MessageReceivedEvent;
use CharlotteDunois\Yasmin\Models\Message;
use CharlotteDunois\Yasmin\Models\TextChannel;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Class ExportSubscriber
*
* @package App\Subscriber
*/
... | true |
87c623fda5a60e9f074d13044db4dcbc62d3a61f | PHP | cergel/api | /app/controllers/DiscoveryController.php | UTF-8 | 1,189 | 2.5625 | 3 | [] | no_license | <?php
namespace app\controllers;
use app\base\BaseController;
class DiscoveryController extends BaseController
{
/**
* 手Q发现页,文章3、4之间推荐
*/
public function recommend()
{
$params = [];
$params['channelId'] = CHANNEL_ID;
$ret = $this->service('Discovery')->recommend($params... | true |
753cf4ebae2ea05e2299128971c38d048b320fe6 | PHP | Reconceptus/reconcept | /frontend/controllers/ServicesController.php | UTF-8 | 1,228 | 2.53125 | 3 | [] | no_license | <?php
namespace frontend\controllers;
use modules\services\models\Service;
use yii\data\ActiveDataProvider;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
/**
* Blog controller
*/
class ServicesController extends Controller
{
/**
* Displays post list.
*
* @return mixed
*/
p... | true |
d3ced3b03d9b69d0dd31f8f86771a4d4f58ffe2e | PHP | reslear/uModule | /engine/function.php | UTF-8 | 12,217 | 2.59375 | 3 | [] | no_license | <?php
if(!defined('uphp')) exit;
// id пользователи которые видят ошибки
class F {
/* Функция для проверки прав текущего пользователя*/
static function check_right( $array, $true = true, $false = false ) {
global $___config;
// id текущего пользователя
... | true |
1db46354919ed903407efc0ba8d1bde320c4cc0b | PHP | calupator/wiredplane-wintools | /_Www/_WwwrootOS/6cce80cdb6d666c984f5d5f2b8231826/sape.php | WINDOWS-1251 | 12,253 | 2.609375 | 3 | [] | no_license | <?php
/*
* SAPE.ru -- -
*
* PHP-, 0.6 04.06.2007
*
* support@sape.ru
*
* ! ! - .
* : http://www.sape.ru/faq.php
*
*/
class SAPE_client {
var $_version = '0.6';
var $_verbose = false;
var $_charset = ''; // http://ww... | true |
ec8240900012a9eb1f36eaa14559e4cf3e0ff731 | PHP | jkaufman0000/php-cassandra-binary | /test_map_string_int.php | UTF-8 | 604 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
require 'vendor/autoload.php';
$nodes = ['localhost:9042'];
$database = new Cassandra\Database($nodes, 'test');
$database->connect();
$database->query("DROP TABLE IF EXISTS test_map_string_int");
$database->query("CREATE TABLE test_map_string_int (id int primary key, testmap map<varchar, int>)");
$database->q... | true |
1125532da766584169e8c84c3e9a7242dc811bb1 | PHP | baotuyen777/nanoMVC | /libs/Helper.php | UTF-8 | 10,958 | 2.5625 | 3 | [] | no_license | <?php
class Helper {
/**
*
* @param type $id
* @param type $table
*/
static function checkId($table, $field, $val) {
if (!$val) {
return false;
}
$sql = "SELECT {$field} FROM {$table} WHERE {$field}=:val ";
$stmt = DB::getInstance()->prepare($sq... | true |
39da92b1dd657e25586ee712ea795537b2090f07 | PHP | samhol/samiholck.com | /sphp/php/Sphp/Validators/ValidatorInterface.php | UTF-8 | 909 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* SPHPlayground Framework (http://playgound.samiholck.com/)
*
* @link https://github.com/samhol/SPHP-framework for the source repository
* @copyright Copyright (c) 2007-2018 Sami Holck <sami.holck@gmail.com>
* @license https://opensource.org/licenses/MIT The MIT License
*/
namespace Sphp\Valida... | true |
c086b1a06b398e97ab71d8589e4ecd04be0570b8 | PHP | Juancesar123/sistemapotik | /app/Http/Controllers/dataobatController.php | UTF-8 | 3,927 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\DataTables\dataobatDataTable;
use App\Http\Requests;
use App\Http\Requests\CreatedataobatRequest;
use App\Http\Requests\UpdatedataobatRequest;
use App\Repositories\dataobatRepository;
use Flash;
use App\Http\Controllers\AppBaseController;
use Response;
use App\Models\satu... | true |
b287d29f7f4891538288b63754ef39d1001d8ca0 | PHP | Fallatas/DEVTESTING | /orgianle-buecher/studium/PHP01A-PHP03A/PHP01A/codebeispiele/Code6.6.php | UTF-8 | 405 | 3.078125 | 3 | [] | no_license | <html>
<head>
<title>Das dritte dynamische Programm</title>
</head>
<body>
<p>Heute ist
<?php
$datum = time();
# $datum = 946681199
if (is_int($datum))
{
if ($datum >= 946681200)
{
$text = "Willkommen im 21. Jahrhundert";
}
else
{
$text = "Immer noch im 20. Jahrhund... | true |
488a89cc11c40fff2fa2f29171e1fc2c5eca944a | PHP | JonasFonM/tai_aula_2020 | /listarCliente.php | UTF-8 | 1,378 | 3.25 | 3 | [] | no_license | <?php
// inclui o arquivo BD.php dentro deste arquivo
//para que seus metodos fiquem visiveis
include 'BD.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- formular... | true |
26d730be4b640da58a08e91c22f7a6d9afbe3f00 | PHP | ikagali/ikagali | /knowledge.inc.php | UTF-8 | 469 | 2.984375 | 3 | [] | no_license | <?php
echo "Сегодня - ".date("d F Y")."<br>";
echo "Текущее время - ".date("H:i:s");
?>
<br>
<?php
$a = 'Мои знания на';
$b = 100;
$c = '%';
?>
<br>
<?php
$price = 15;
if($price >= 15 && $price <= 20)
$d = 'Это число находится между 15 и 20';
?>
<?php
$dsadfsd = "не определено";
if(isset($_POS... | true |
ea25e69a0a0c968897eb96aa288408468c990d9e | PHP | abetterstory/abetter-wordpress | /plugins/sitepress-multilingual-cms/vendor/wpml/tm/classes/records/class-wpml-tm-records.php | UTF-8 | 4,509 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"GPL-3.0-only"
] | permissive | <?php
class WPML_TM_Records {
/** @var WPDB $wpdb */
public $wpdb;
/** @var array $cache */
private $cache = array(
'icl_translations' => array(),
'status' => array(),
);
private $preloaded_statuses = null;
/** @var WPML_Frontend_Post_Actions | WPML_Admin_Post_Actions $wpml_post_translations *... | true |
ba54676199544c1b8027ba8b82cead9e04dff114 | PHP | Alex-Nabu/SimpleMvC | /SimpleMvC/vendor/respect/validation/library/Rules/Phone.php | UTF-8 | 294 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Respect\Validation\Rules;
class Phone extends AbstractRule
{
public function validate($input)
{
return !empty($input) && preg_match('/^[+]?([\d]{0,3})?[\(\.\-\s]?(([\d]{1,3})[\)\.\-\s]*)?(([\d]{3,5})[\.\-\s]?([\d]{4})|([\d]{2}[\.\-\s]?){4})$/', $input);
}
} | true |
fe82cc0ced53206527a112f7442615e2a0cdb6e7 | PHP | plabadille/gestionPersonnel | /classes/PLabadille/GestionDossier/Dossier/DossierController.php | UTF-8 | 73,316 | 2.78125 | 3 | [] | no_license | <?php
namespace PLabadille\GestionDossier\Dossier;
use PLabadille\Common\Controller\Response;
use PLabadille\Common\Controller\Request;
use PLabadille\GestionDossier\Controller\AccessControll;
use PLabadille\GestionDossier\Home\HomeHtml;
use PLabadille\Common\Authentication\AuthenticationManager;
//------------------... | true |
e1139aca4784d9c9c4b0060c7bba8129490202a7 | PHP | arkadijslatin/OOP | /model/BaseModel.php | UTF-8 | 3,039 | 3.046875 | 3 | [] | no_license | <?php
namespace model;
namespace model;
use core\DBDriverInterface;
use core\DBDriver;
use core\exception\ModelException;
use core\Logger;
use controller\BaseController;
use core\Request;
use core\ValidatorInterface;
use core\exception\ValidatorException;
abstract class BaseModel
{
protected $db;
protected ... | true |
a4a3d35eebb28378c68048f8461cc27d27ec1326 | PHP | kinapersson/projektarbete_clogstore | /classes/user.class.php | UTF-8 | 1,684 | 2.96875 | 3 | [] | no_license | <?php
class user
{
private $uid;
private $name;
private $password;
private $logout;
private $delete_account;
private $isUserLoggedIn;
private $getUserLevel;
private $isUserAdmin;
public function setuid($uid)
{
$this->uid = $uid;
}
public function setname($name)... | true |
a03027ba167cc430c248d6ff9bb2e5b36ef38dde | PHP | SergeyHub/upload-file-php | /index.php | UTF-8 | 2,133 | 3.25 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>PHP File Upload</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<section class="contact" id="contact">
<div class="title">
<h2 class="contact__titleText"><span>U</span>pload File</h2>
</div>
<div class="contac... | true |
b209a76e9793244e32ce0d53238b86f314e9da5a | PHP | GustavoBauer/Noodle_AW2 | /actions/add_usuario_action.php | UTF-8 | 962 | 2.921875 | 3 | [] | no_license | <?php
session_start();
$tipoUsuario = $_POST['tipoUsuario'];
$matricula = strtoupper($_POST['matricula']);
$nome = $_POST['nome'];
$senha = "aabbccdd";
$arquivoUsuarios = "../model/usuarios.txt";
$tamanhoArquivo = filesize($arquivoUsuarios);
$arquivoAberto = fopen($arquivoUsuarios, "r+");
$arrayUsuarios = array();
... | true |
b7d5864f832d0dc4f83d52b525fac328a3a9aef2 | PHP | FQAIN/SOAM-Sullimar-Academy-of-Music-Enigma-Crackers | /CI(SAOM) - Backup/application/controllers/Exams.php | UTF-8 | 9,365 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
class Exams extends CI_Controller {
function __construct() {
parent::__construct();
//load model
... | true |
280852abe508888e04c59aadde432d079ca175b5 | PHP | llxxddlxd/bm-php-new | /src/model/response/result/AccountCheckValidResult.php | UTF-8 | 477 | 2.546875 | 3 | [] | no_license | <?php
namespace src\model\response\result;
/**
*
*/
class AccountCheckValidResult{
private $isValid;
function __construct()
{
# code...
}
/**
* @return mixed
*/
public function getIsValid()
{
return $this->isValid;
}
/**
* @param mixed $i... | true |
1fd5d085a973a7eaa503ee3b881c5a65817ec5fd | PHP | Benj972/Optimization-ToDo-Co | /src/AppBundle/Entity/User.php | UTF-8 | 3,027 | 2.65625 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Table("user")
* @ORM\Entity
* @UniqueEntity(fields={"username... | true |
2e2f2df4b44cc995234f890f31a3a8e199dc8997 | PHP | tangler-project/tangler | /database/seeds/VoteSeeder.php | UTF-8 | 826 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Models\Post;
use App\Models\Vote;
use App\User;
class VoteSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// $posts = Post::all();
// $users = User::all();
// // dd(... | true |
f9751f930877e4f741b3ff993949031a59378acf | PHP | castion2293/api-caller | /src/ApiCaller.php | UTF-8 | 278 | 2.71875 | 3 | [] | no_license | <?php
namespace SuperPlatform\ApiCaller;
class ApiCaller
{
public function make($caller)
{
$callerName = ucfirst(camel_case($caller)) . 'Caller';
$callerName = 'SuperPlatform\\ApiCaller\\Callers\\' . $callerName;
return new $callerName;
}
} | true |
7fe10fd951510851eb68bade648157768186b633 | PHP | carlos-sysclass/Sysclass3 | /app/forms/Element/Hidden.php | UTF-8 | 572 | 2.53125 | 3 | [] | no_license | <?php
namespace Sysclass\Forms\Element;
use Phalcon\Forms\Element\Hidden as PhalconHidden,
Sysclass\Forms\ElementInterface;
class Hidden extends PhalconHidden implements ElementInterface
{
// ElementInterface
public function getHTMLType() {
return "hidden";
}
public function toArray($attrib... | true |
8616f79d4a7d2b0d6cf3e4414d3d9e45ac58d26f | PHP | AdamGold/SlimRSS | /app/Model/Admin/Post.php | UTF-8 | 4,942 | 2.828125 | 3 | [] | no_license | <?php
/**
* Admin Post model
*
* @package SlimRSS
* @author AdamGold <adamgold7@gmail.com>
* @copyright 2015 AdamGold
*/
namespace Model\Admin;
/**
* Admin Post model
*
* responsible for all post database actions (queries etc.)
*
* @package SlimRSS
* @author AdamGold <adamgold7@gmail.com>
*... | true |
0256651aa488beb7bcbad285eb8ebc52ba39a630 | PHP | marcodm1/PHP-GIT | /Tema5/ejercicio1/ej1.php | UTF-8 | 1,017 | 3.328125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="es">
<head>
<title>Marco Domínguez</title>
<meta charset="UTF-8">
<meta name="author" content="Marco Dominguez">
<meta name="description" content="Ejercicio x">
</head>
<body>
<?php
if (!empty($_GET['array'])) {
$array = unserialize($_GET['array']);
if (is_array($array)) {
most... | true |
a42b9168a7427750c94325b6237900eadc89a1ce | PHP | YANGYANGYYYYYYY/phpyang | /php/php7.php | UTF-8 | 135 | 3.234375 | 3 | [] | no_license | <?php
function add($a)
{
if ($a<=1)
{
return $a;
}
return add($a-1)+add($a-2);
}
for($i=1;$i<=10;$i++)
{
$b=add($i);
echo "$b\n";
}
?>
| true |
99132a5bf0f2fc8531926148b612f5586a1e1cd6 | PHP | fnandot/tic-tac-toe | /src/Game/Game.php | UTF-8 | 3,025 | 3.234375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Acme\TicTacToe\Game;
use function Functional\flatten;
use function Functional\some;
use function Functional\unique;
final class Game
{
private Board $board;
private Player $currentPlayer;
private Player $firstPlayer;
private Player $secondPlayer;
public ... | true |
da5309cbb31435461e1e0f1e77e75ba76a9d46b4 | PHP | danielkleach/librarian | /app/Http/Controllers/NewItemController.php | UTF-8 | 541 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\EntityFactory;
class NewItemController extends Controller
{
protected $entityFactory;
/**
* NewItemController constructor.
*
* @param EntityFactory $entityFactory
*/
public function __construct(EntityFactory $entityFactory)
{
... | true |
46a793ccf90ca2c1964c501d831d376c7d2a14c7 | PHP | VyacheslavLynnyk/test-adventure | /lib/app.class.php | UTF-8 | 1,343 | 2.765625 | 3 | [] | no_license | <?php
class App
{
protected static $router;
public static function getRouter()
{
return self::$router;
}
public static function run($url)
{
self::$router = new Router($url);
$controller_class = ucfirst(self::$router->getController()) . 'Controller';
$controlle... | true |
699447ae2622e55eb8390b0beddad84c8268287c | PHP | anwari1990/klikdosen | /app/Console/Commands/ServeCommand.php | UTF-8 | 1,216 | 2.890625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace App\Console\Commands;
class ServeCommand extends Command
{
/**
* @var string
*/
protected $path = 'public';
/**
* @var string
*/
protected $name = 'serve';
/**
* @var string
*/
protected $description = 'Serve the application on the PHP development ... | true |
7b022a8332919a22bc2ad1f8e21f1955939e5102 | PHP | EmilienLetestu/naoReboot | /src/Managers/ReportManager.php | UTF-8 | 2,056 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: emilien
* Date: 28/09/17
* Time: 17:24
*/
namespace App\Managers;
use App\Entity\Report;
use Doctrine\ORM\EntityManager;
class ReportManager
{
private $doctrine;
/**
* ReportManager constructor.
* @param EntityManager $doctrine
*/
public func... | true |
2af189c0bfb5a96dec4d893ae48be549212f9f87 | PHP | rfleuryleveso/adidash | /app/Http/Controllers/Committee/TagsController.php | UTF-8 | 1,110 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Http\Controllers\Committee;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Tag;
use App\Http\Requests\CommitteeCreateTag;
class TagsController extends Controller
{
/**
* Displays the tags list
*
* @return \Illuminate\Http\Response
*/
p... | true |
246c653d583ea78455b3a13177379f745c19ff28 | PHP | klmpk7/bpo | /10.pewarisan.php | UTF-8 | 764 | 4.0625 | 4 | [] | no_license |
<?php
class manusia {
public $nama_saya;
function berinama($saya) {
$this->nama_saya=$saya;
}
}
// class turunan atau sub class dari kelas manusia
// kita menghubungkan class dengan syntax extends
class teman extends manusia{
// property class teman
public $nama_teman;
... | true |
60879baded3b027dcf25b9c87a8e46cbd9cc8384 | PHP | iget-master/cielo-checkout | /src/Order/CartOrder.php | UTF-8 | 6,140 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Iget\CieloCheckout\Order;
use Exception;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Client as GuzzleClient;
use Iget\CieloCheckout\CieloCheckout;
use Iget\CieloCheckout\Models\CieloOrder;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\S... | true |
9249bad5b71d5ea2e65f0485bb4712eb44163c66 | PHP | frdemoulin/S07-atelier-oquiz | /backend/app/Http/Controllers/MainController.php | UTF-8 | 2,222 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
// on déclare le namespace
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
//import de mon model pour effectuer des requetes
use App\Quizzes;
use App\Tags;
use App\AppUsers;
use App\QuizzesHasTags;
class MainController extends Controller
{
/**
* Create a new controller instance.
... | true |
5804ab687376a5185788dd39b5d87f334a361dec | PHP | Kronkin/LIT-Folio | /processesScripts/processLike.php | UTF-8 | 647 | 2.625 | 3 | [] | no_license | <?php
session_start();
require_once('../includes/mysqli_connect.php');
$workID = $_POST['wid'];
$userID = $_POST['uid'];
$query="INSERT INTO likes (wid, uid) values('" . $workID . "','" . $userID . "')";
mysqli_query($dbc,$query);
$query="SELECT likes FROM assets WHERE wid='". $workID ."';";
$results = mysqli_qu... | true |
72c146af8e765633c28f18df6cb934fccc528141 | PHP | FDSoil/dev_lab_php_oop_curso | /cap015_1_HerenciaInterfacesYPolimorfismo/index.php | UTF-8 | 333 | 2.890625 | 3 | [] | no_license | <?php
/* Forma de uso en index.php */
/* Solo vamos a requerir la clase que
vamos a usar, no la clase padre, ese es
problema de la clase Usuario (recuerden
las flechas de relaciones, cada clase debe
saber a quién necesita para funcionar) */
require_once 'Usuario.php';
$usuario = new Usuario('Enrique','Place');
echo... | true |
1fc60da9f223e9f5227275f949c9c649d5892e47 | PHP | mitchthompson/AD320-group-project | /Library.php | UTF-8 | 5,277 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | <?php
include 'Book.php';
/**
* Created by PhpStorm.
* User: ahand
* Date: 3/8/17
* Time: 7:38 PM
*/
class Library
{
private function __Construct(){}
public static function getBooksByUser($user_id){
$conn = new dbPDO();
$stmt = <<<SELECT
SELECT user_id, isbn
FROM... | true |
53450791dcf26981b39ed86decf763199fbb8bd8 | PHP | alejandrojs-dev/sistema-tecnoline | /app/Http/Resources/Dashboards/DashboardCollection.php | UTF-8 | 904 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Resources\Dashboards;
use Illuminate\Http\Resources\Json\ResourceCollection;
class DashboardCollection extends ResourceCollection
{
/**
* Transform the resource collection into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toAr... | true |
491723c643703b8f7af2af78ff327344d23b7c39 | PHP | sirmes/mind_power | /mind_power/src/admin/leadership.php | UTF-8 | 6,742 | 2.640625 | 3 | [] | no_license | <?
include("../DB.php");
$DB = DB::Open();
$action = $_POST['action'];
// echo "action: $action <br>";
if (strcmp($action,"A") == 0) {
//Add
//echo "In add";
$add_strategic_management_id = $_POST['add_strategic_management_id'];
$add_leadership_name = htmlspecialchars($_POST['add_leadership_name']);
$add_leade... | true |
182a1c7c8e000eac14a5777556e14ba9d349d37b | PHP | modulargaming/item | /classes/MG/View/Item/Shop/View.php | UTF-8 | 1,713 | 2.5625 | 3 | [
"LicenseRef-scancode-dco-1.1",
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') OR die('No direct script access.');
/**
* View for Item Shop View
*
* @package MG/Item
* @category View
* @author Maxim Kerstens
* @copyright (c) 2013 Modular Gaming
* @license BSD http://www.modulargaming.com/license
*/
class MG_View_Item_Shop_View extends Abstract_View_In... | true |
60242a3a95f6b7bebd220b8708c6d0a093a7ee04 | PHP | leandrouni01/final_analisis | /src/controlador/controladoresEspecificos/ControladorEspacioCurricular.php | UTF-8 | 4,988 | 2.65625 | 3 | [] | no_license | <?php
require_once 'ControladorGeneral.php';
class ControladorEspacioCurricular extends ControladorGeneral
{
function __construct()
{
parent::__construct();
}
public function agregar($datos)
{
try {
$this->refControladorPersistencia->iniciarTransaccion();
$... | true |
cd9af97512358ef91fad722754b6d3b93dc17555 | PHP | briacboulet/Econnect | /Econnect/upload.photo.php | UTF-8 | 2,481 | 2.65625 | 3 | [] | no_license | <?php
session_start();
$text = $_POST['Text'];
$Acces = $_POST['Accessibilité'];
try
{
$bdd = new PDO('mysql:host=localhost;dbname=bdd_econnect;charset=utf8', 'root', '');
}
catch (Exception $e)
{
die('Erreur : ' . $e->getMessage());
}
$dossier = 'Photo_post/';
$fichier = basename($_FI... | true |
1155ee0c055606b27941986f4764be5d279daece | PHP | rmemory/blog_php | /app/User.php | UTF-8 | 1,195 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email',... | true |
3d59b7a837faf41051467d8e42b0b6b31833f4ed | PHP | prajwal-stha/scout | /app/Http/Requests/CreateTeamMemberRequest.php | UTF-8 | 1,358 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
use Auth;
use App\TeamMember;
class CreateTeamMemberRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
if (Auth::check())... | true |
a58487fb49ef2453f3ded468d6378bc8574ae5dd | PHP | ajimmenezz/gps | /application/models/DataBaseKit.php | UTF-8 | 5,225 | 2.78125 | 3 | [] | no_license | <?php
namespace Models;
use Libraries\Utils;
use \Exception as Exception;
class DataBaseKit extends DataBase {
public function __construct() {
parent::__construct();
}
public function createKit($data){
$this->db->trans_start();
//CREATE KIT TEMPLATE
$query = "INSERT INTO t... | true |
2014b6ee42f417cc35bde42238c153997ea1d13a | PHP | apigee/apigee-client-php | /src/Api/ApigeeX/Controller/AppGroupMembersController.php | UTF-8 | 3,924 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | true |
8321bbdd76f32fbce2117ba1a1d72478cdfc534d | PHP | dereuromark/cakephp-queue | /src/Command/JobCommand.php | UTF-8 | 7,229 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Queue\Command;
use Cake\Command\Command;
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Core\Configure;
use Cake\Error\Debugger;
use Cake\I18n\FrozenTime;
use Queue\Model\Entity\QueuedJob;
use Queue\Utility\Serializer;
/**
* @property \Queue\Mo... | true |
33cf191e90aae3e1992306fd338eae7d15552049 | PHP | Firesphere/silverstripe-newsmodule | /tests/NewsTagTest.php | UTF-8 | 1,862 | 2.921875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* Unittests for tags.
* Tags should be linked to multiple items, but not all, and vice-versa.
*
* @package News/blog module
* @author Simon 'Sphere' Erkelens
*/
class NewsTagTest extends SapphireTest
{
protected static $fixture_file = 'NewsTest.yml';
/**
* Check if tags are linked correct... | true |
5e485a7a1e0cbe2178b1caa666fddfcf8780553c | PHP | projectKMUTNB/testproject2 | /addstudentcsv.php | UTF-8 | 3,975 | 2.546875 | 3 | [] | no_license | <?
@session_start();
require_once('include/connect.php');
if(!isset($_SESSION['username']))
header("location:login.php");
if(isset($_GET['logout'])){
session_destroy();
header("location:login.php");
}
ini_set('display_errors', 1);
error_reporting(E_ALL);
// Check connection
if (mysqli_connect_errno())
{
echo... | true |
a9fac5297d0a9ecf8b2096f13055c304575771ae | PHP | donbidon/10gine | /src/TENgine.php | UTF-8 | 6,282 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Template ENgine.
*
* @copyright <a href="http://donbidon.rf.gd/" target="_blank">donbidon</a>
* @license https://opensource.org/licenses/mit-license.php
*/
declare(strict_types=1);
namespace donbidon\Lib;
use \InvalidArgumentException;
use \RuntimeException;
/**
* Template ENgine.
*
* @todo AP... | true |
063787b4c76100125ff2e55691cc500d177d24d3 | PHP | phpbb2premods/TeaMod | /teamod/includes/class_stats.php | UTF-8 | 18,395 | 2.59375 | 3 | [] | no_license | <?php
/***************************************************************************
* class_stats.php
* ---------------
* begin : 03/09/2004
* copyright : Ptirhiik
* email : ptirhiik@clanmckeen.com
*
* Version : 0.0.11 - 31/10/2005
*
***************************************************************... | true |
442914ac7ed65eb76eb73ee5ad6f6cbab2a3b7ad | PHP | hbspatil/livehelperchat | /agentconsole/livehelperchat-master/lhc_web/lib/core/lhcore/lhfileuploadadmin.php | UTF-8 | 2,027 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
class erLhcoreClassFileUploadAdmin extends erLhcoreClassFileUpload {
public $uploadedFile = false;
protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) {
$matches = array();
if (strpos($name, '.') === false... | true |
0974417a03fd7b390db171c62e1c992c1bf48fdc | PHP | L0mens/psyxp | /php/register.php | UTF-8 | 4,035 | 2.890625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Lomens
* Date: 02/03/2017
* Time: 13:54
*/
$debug=FALSE;
$nowamp =TRUE;
try{
if($nowamp){
/* BDD M$ AZURE*/
include("co_string.php");
}else{
$bdd = new PDO('mysql:host=localhost;dbname=psyxp;charset=utf8', 'root', '',
array(PDO::AT... | true |
cb17559067152db23dfe62ba38f33df9e5a98270 | PHP | armiece/wordpress-development-homework-summer2013 | /TaggedBackgrounds(current)/index.php | UTF-8 | 4,086 | 2.71875 | 3 | [] | no_license | <?php
/*
Plugin Name: TaggedBackgrounds
Plugin URI: http://taggedbg.co.uk
Version:0.1
Description: Gives users the ability to specify background images for inidivual post pages based on tags.
Author: Slip
Author URI: http://dragonsdenstudios.com/
-----------------------------------------------------------... | true |
be4fdba84e8745d114de10da4887e7bd0e51b88c | PHP | bilaltampubolon/WEB | /part1/home-user.php | UTF-8 | 2,337 | 3.125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Sort a HTML Table Alphabetically</title>
<style>
table {
border-spacing: 0;
width: 100%;
border: 1px solid #ddd;
}
th, td {
text-align: left;
padding: 16px;
}
tr:nth-child(even) {
background-color: #f2f2f2
}
</style>
</head>
<body>
<h3><p><a href="index.php">ADMIN</a>... | true |
5bd1602586d35740ef229207cc29ced9cb1be8bd | PHP | survos/remote | /src/AppBundle/Command/Base/SqsCommand.php | UTF-8 | 12,391 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Command\Base;
use Aws\Credentials\Credentials;
use Aws\Result;
use Aws\Sqs\SqsClient;
use GuzzleHttp\Promise\Promise;
use GuzzleHttp\Promise\PromiseInterface;
use React\EventLoop\StreamSelectLoop;
use Survos\Client\SurvosClient;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\... | true |
3c238a13e1eef3ddc724db853f9f21f3cf316818 | PHP | Ulises961/HBz-Pinboard | /php/chat_php/components/conversation.php | UTF-8 | 1,392 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
function createConversationElement($conversation, $isConversationPrivate){
$conversation_id = $conversation["id"];
$last_message = $conversation["last_message"];
$conversation_name = $conversation["name"];
$last_modification_date = $conversation["last_change"];
... | true |
58986b68a01748b9b72a39f2837b2786b2d687d3 | PHP | tw-chiayi/streetlight-manager | /application/controllers/Dev.php | UTF-8 | 2,357 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dev extends MY_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since th... | true |
b7b45c7d736e41e9333836acbaa88ebb442350f7 | PHP | alexmerlin/dot-queue | /src/Options/QueueOptions.php | UTF-8 | 2,521 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @see https://github.com/dotkernel/dot-queue/ for the canonical source repository
* @copyright Copyright (c) 2017 Apidemia (https://www.apidemia.com)
* @license https://github.com/dotkernel/dot-queue/blob/master/LICENSE.md MIT License
*/
declare(strict_types=1);
namespace Dot\Queue\Options;
use Zend\S... | true |
5795b374a7dd16c82965776b8a8875c294128c8a | PHP | dovanduy/dev | /module/Application/src/Application/Model/Websites.php | UTF-8 | 1,044 | 2.703125 | 3 | [] | no_license | <?php
namespace Application\Model;
use Application\Lib\Api;
use Application\Lib\Cache;
use Application\Lib\Arr;
class Websites
{
public static function removeCache()
{
$key = WEBSITES_ALL;
Cache::remove($key);
}
public static function getAll($websiteId = null, $forDropdo... | true |
712571c5c49fc96636a19a8c1fea8ce5014b3ea3 | PHP | HackingPolitics/hp-backend | /src/Security/Voter/UsedNegationVoter.php | UTF-8 | 1,718 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Security\Voter;
use App\Entity\UsedNegation;
use App\Entity\User;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
class UsedNegationVoter extends Voter
{
/**
* {@inheritdoc}
*/
protected func... | true |
7afa67343d26ae940d0dd1622183a5a45b5e5e85 | PHP | achrafhazim/GestionApplication | /App/Modules/Produit/phinix_db/migrations/20170817100033_familles_des_articles.php | UTF-8 | 2,291 | 2.625 | 3 | [] | no_license | <?php
use Phinx\Migration\AbstractMigration;
use Kernel\Conevert\HTML_Phinx;
class famillesDesArticles extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs... | true |
fe6157e5c693e609aae9c135ba85fe50b1c80209 | PHP | joshuajabbour/authorizable | /src/Rule/Collection.php | UTF-8 | 636 | 2.65625 | 3 | [] | no_license | <?php
namespace JoshuaJabbour\Authorizable\Rule;
use Illuminate\Support\Collection as BaseCollection;
class Collection extends BaseCollection
{
/**
* Returns all relevant rules based on an action and a resource.
*
* @param string|array $action Action to test against the collection.
* @param s... | true |
dec0c319d1688f53834cca8200ae34482096cbd8 | PHP | adrielrosanelli/ExerciciosPHP | /str_replace.php | UTF-8 | 190 | 3.703125 | 4 | [] | no_license | <?php
//Substitui uma entrada, como exemplo uma busca pela string.
$vogais = array("a", "e", "i", "o", "u", "A", "E", "I", "O", "U");
echo str_replace($vogais, "", "Hello World of PHP");
?> | true |
d3c9025deeca7fdcb03ba04ecb43a8cdb508f0b5 | PHP | ejeliot/Haplo-Framework | /haplo-framework/routing/haplo-router.inc.php | UTF-8 | 14,226 | 3.078125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* HaploRouter - this class routes requests by selecting an action from
* a mapping array containing regular expressions for URL patterns and
* their associated action
*
* This file is part of the Haplo Framework, a simple PHP MVC framework
*
* Copyright (C) 2008-2011, Br... | true |
3b8db9ea0e9591a678ec9511015f1b0031e14254 | PHP | illuminate/database | /Eloquent/Casts/AsEnumArrayObject.php | UTF-8 | 2,874 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Illuminate\Database\Eloquent\Casts;
use BackedEnum;
use Illuminate\Contracts\Database\Eloquent\Castable;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use Illuminate\Support\Collection;
class AsEnumArrayObject implements Castable
{
/**
* Get the caster class to use when casting... | true |
26ece23e17bfa638976af72e53a12af83b2764df | PHP | LiquidLemon/php-gallery | /helpers.php | UTF-8 | 304 | 2.734375 | 3 | [
"Unlicense"
] | permissive | <?php
require_once 'models/User.php';
// gets POST value or returns an empty string instead
function post($name, $default = '') {
return isset($_POST[$name]) ? $_POST[$name] : $default;
}
function currentUser() {
return isset($_SESSION['user']) ? User::get(['name' => $_SESSION['user']]) : null;
}
| true |
b87c5b9d8df10ae58ab396840e08c2ae285c7b34 | PHP | BogdanBrizhaty/college-final-project | /www/App/Core/BaseModel.php | UTF-8 | 217 | 2.703125 | 3 | [] | no_license | <?php
require_once('App/Model/DAL/IRepository.php');
class BaseModel
{
protected $Repository;
public function __construct(IRepository $Repository)
{
$this->Repository = $Repository;
}
}
?> | true |
60604e10051d5305fa64cd42ba7ec94f3877a8a3 | PHP | smart-gamma/vendor-framework | /Listener/TrackDurationListener.php | UTF-8 | 1,649 | 2.53125 | 3 | [] | no_license | <?php
namespace Gamma\Framework\Listener;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
class TrackDurationListener
{
protected $stopwatchLogger;
private $uri;
private $requestApiContent;
private $requestMethod;
public functi... | true |
3c2de6a2250dbf668c8ccf8c203cdfe6bbb47403 | PHP | dinamsky/mirschet | /wa-apps/shop/plugins/catalogreviews/lib/classes/wa/routing/shopCatalogreviewsWaRouting.class.php | UTF-8 | 1,440 | 2.609375 | 3 | [] | no_license | <?php
class shopCatalogreviewsWaRouting implements shopCatalogreviewsStorefrontSource
{
public function isPageAction()
{
return $this->isAction('frontend', 'page');
}
public function isCategoryAction()
{
return $this->isAction('frontend', 'category');
}
public function getStorefronts()
{
$routing = wa(... | true |
76669c35a1c3d39280f9b679e1af6ceede2c2727 | PHP | Lukasss93/telegrambot-php | /src/Types/MessageAutoDeleteTimerChanged.php | UTF-8 | 382 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace TelegramBot\Types;
/**
* This object represents a service message about a change in auto-delete timer settings.
* @see https://core.telegram.org/bots/api#voicechatended
*/
class MessageAutoDeleteTimerChanged
{
/**
* New auto-delete time for messages in the chat
* @var int $message_aut... | true |
1e6e0608cd2df2ac6ab7b5b019026ef3748c1270 | PHP | nathan-mcbride54/Marbles | /checkusername.php | UTF-8 | 570 | 2.703125 | 3 | [] | no_license | <?php
// ------------------------------------------------------------------
// NAME: index.php
// DESCRIPTION: Used to check the username being entered with the database when registering
// -------------------------------------------------------------------
include 'includes/library.php';
$pdo = & dbconnec... | true |
dfcf8b8b999cf96c7410a0babde8f1d6f8758215 | PHP | zuziqiu/exercise | /back-end/shopImooc/test/resizeImage.php | UTF-8 | 700 | 2.671875 | 3 | [] | no_license | <?php
$filename = "x5.jpg";
// 创建源画布资源(提供source)
$src_image = imagecreatefromjpeg($filename);
// 原图宽高
list($src_w, $src_h) = getimagesize($filename);
// 缩放比例
$scale = 0.5;
// 取整缩放后宽高
$dst_w = ceil($src_w*$scale);
$dst_h = ceil($src_h*$scale);
// 创建画布资源(采集source在此目标画布)
$ds... | true |