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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6b66cadd02ddeedd3d8bf1bfd69f88155e021e57 | PHP | Bronskiy/Companies-Reviews | /application/modules/companies/forms/CompanyPromo.php | UTF-8 | 2,938 | 2.515625 | 3 | [] | no_license | <?php
/**
* Company promo form
*/
class Companies_Form_CompanyPromo extends Main_Forms_ZForm
{
/**
* Init form
*/
public function init()
{
$this->setMethod('post');
// after setName for csrf token unique name based on form name
parent::init();
... | true |
bf44be0eae4b3ef43de011b11fdd5b44d18644f3 | PHP | mnourrhan/social-blog | /app/Http/Requests/UserRegisterRequest.php | UTF-8 | 1,568 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Exceptions\HttpResponseException;
class UserRegisterRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @r... | true |
abc07282b892901a0ea4fe1cd1f851e0ed697747 | PHP | printemps0505/php_sample | /php/20/view/view.php | UTF-8 | 909 | 2.796875 | 3 | [] | no_license |
<!--表示処理-------------------------------------------------------------------------------------------->
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>DB操作</title>
</head>
<body>
<h1>一言掲示板(DB使用)</h1>
<form method="post">
<p>名前:<input type="text" name="your_name">ひとこと:<input t... | true |
4df251d8c50f45767c89c7afd0b09209c5e9447a | PHP | aprian1337/hmvc-rolefilter | /app/Filters/RoleFilter.php | UTF-8 | 982 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Filters;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Filters\FilterInterface;
class RoleFilter implements FilterInterface
{
public function before(RequestInterface $request, $arguments = null)
{
if (session()->get('log') != true) ... | true |
28bd628bc2c20c8a3d3c9f42d180b0f2082ccb0d | PHP | EliseEijkhout/To-Do-List | /logic/activiteitenpage.php | UTF-8 | 2,336 | 2.921875 | 3 | [] | no_license | <?php
require '../logic/connection/info.php';
// '../' is altijd terug naar de root map, als je al in de rootmap bent is dit niet nodig
// in info.php staan de gegevens van de database en de inglognaam en wachtwoord om erin te komen
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
//... | true |
bb0f69c7b627322df0ba343844fa50b9be1de92b | PHP | Rossonero585/toto | /src/Controllers/Http/Controller.php | UTF-8 | 228 | 2.53125 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Controllers\Http;
class Controller
{
protected function sendResponse(int $code, string $content)
{
header('Content-type: text/plain', false. $code);
echo $content;
die();
}
} | true |
9b977e5608478aa9143c6f79af4a56415fea533e | PHP | calvintts/130_project2 | /display.php | UTF-8 | 2,758 | 2.703125 | 3 | [] | no_license | <?php
include('server.php');
$host = 'localhost';
$user = 'root';
$pass = '';
$u = $_SESSION['username'];
//$sql = "SELECT * FROM car,items";
$sql = "SELECT * FROM items INNER JOIN car ON iid=cid";
$records = mysqli_query($conn,$sql);
$temp = "";
?>
<html>
<head>
<title> Display </title>
<link rel="styl... | true |
d334eae417ced897474cbe9fa0ea39fcf09b00fd | PHP | iufanino/poney-fringant | /backend/deconnexion.php | UTF-8 | 362 | 2.515625 | 3 | [] | no_license | <?php
// Pour déconnecter l'utilisateur, il faut détruire la session
if(session_status() != PHP_SESSION_ACTIVE) {
session_start();
}
// "Vider" les variable de session
session_unset();
// Détruire la session
session_destroy();
header('location: http://www.p... | true |
639855f2989fefa7d82a39b82654fa70b5322b65 | PHP | zhooravell/skrill-php-client | /src/ValueObject/Traits/ValueToStringTrait.php | UTF-8 | 305 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Skrill\ValueObject\Traits;
/**
* Class ValueToStringTrait.
*/
trait ValueToStringTrait
{
/**
* @var string
*/
private $value;
/**
* @return string
*/
public function __toString()
{
return $this->value;
}
}
| true |
cb5e0083376344b0e29d0a864342e5ceca1c2452 | PHP | cmigayi/zapi-retail-php | /web/app/data/Supplier.php | UTF-8 | 1,801 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Data;
/**
* @Author: Cecil Migayi
* @Email: migayicecil@gmail.com
* @copyright: zapi, 2018
*
* This class assist in handling any supplier data
*/
class Supplier{
private $supplierId;
private $businessId;
private $supplierName;
private $phone;
private $email;
private $dateTime;
/**
* se... | true |
8c26f23189b531f5f5590af57ae1ba1d8a6feeec | PHP | miskomv/imgur-script | /app/Http/Controllers/FrontController.php | UTF-8 | 1,574 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Image;
use Laravel\Lumen\Routing\Controller as BaseController;
class FrontController extends BaseController
{
private $page_domain = '';
private $page_url = '';
private $page_title = 'Imgur MV Script';
private $page_description = 'Imgur MV Script'... | true |
16c244d8a62f8bc90cf7debe0295cdcb45d307e2 | PHP | Vaishakh-K/Semantic-Similarity-Between-Sanskrit-Sentences | /action_page.php | UTF-8 | 23,281 | 2.71875 | 3 | [] | no_license | <?php
session_start();
$statement1 = $_SESSION['statement1'];
$statement2 = $_SESSION['statement2'];
$host = '127.0.0.1';
$uname = 'root';
$pass = 'Bazinga';
$dbname = 'sanskrit';
/************************************************************************/
/* CREATE CONNECTION */
/**************************... | true |
b68b2745a16f0ca85ef7dd15fbe07570c2563c06 | PHP | dkoschig/bright | /classes/BrConsole.php | UTF-8 | 601 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Project: Bright framework
* Author: Jager Mesh (jagermesh@gmail.com)
*
* @version 1.1.0.0
* @package Bright Core
*/
namespace Bright;
class BrConsole extends BrSingleton {
public function red($message) {
return chr(27) . '[31m' . $message . chr(27) . '[0m';
}
public function ... | true |
ec01ce8178910dd98cb3e6f7cb1800e5f8bbe07c | PHP | greg0ire/Rector | /src/Configuration/Normalizer/RectorClassNormalizer.php | UTF-8 | 1,175 | 2.75 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Rector\Configuration\Normalizer;
use Rector\Exception\Configuration\InvalidConfigurationTypeException;
final class RectorClassNormalizer
{
/**
* @param mixed[] $rectors
* @return mixed[]
*/
public function normalize(array $rectors): array
{
... | true |
27ac13eaae582bd111119682585ea17d16092c2e | PHP | antwebstudio/yii2-core | /src/base/Model.php | UTF-8 | 1,279 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace ant\base;
use Yii;
use yii\helpers\ArrayHelper;
class Model extends \yii\base\Model
{
/**
* Creates and populates a set of models.
*
* @param string $modelClass
* @param array $multipleModels
* @return array
*/
public static function createMultiple($config, $mult... | true |
952a9d3eab7c9b14663602b1344d202d7c1a70a8 | PHP | ndaday/tokonur | /penjualan.php | UTF-8 | 842 | 2.5625 | 3 | [] | no_license | <?php
include "koneksi.php";
include "header.php";
echo "
<h2>Penjualan</h2>
<table border=1 width=100%>
<tr>
<th>NO</th><th>Kode Penjualan</th><th>Tanggal Penjualan</th><th>Kode pelanggan</th><th>Nama Pelanggan</th>
</tr>";
$tampil = mysqli_query(
$koneksi,
"SELECT penjualan.kd_pelan... | true |
2d3eb12b90e6e4b00e2f02b5c7e142f6575a2562 | PHP | zymsys/SPIL | /interfaces/DataMapper/JSON.php | UTF-8 | 553 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Maps PHP objects to and from their JSON equivalents.
*/
interface ISPIL_DataMapper_JSON
{
/**
* Maps JSON strings to PHP objects
* @abstract
* @param $data string
* @return stdClass
*/
function input($data);
/**
* Maps PHP objects to JSON strings
* @abstrac... | true |
a01e9c32158af2088482cdd454efddf0d6d9970e | PHP | evertonvieira/bd1 | /controllers/RedatoresController.php | UTF-8 | 935 | 2.6875 | 3 | [] | no_license | <?php
require "../config/config.php";
class RedatoresController {
public function login ( $matricula, $senha ){
$pdo = conecta();
try {
$logar = $pdo->prepare("SELECT matricula, senha FROM redatores WHERE matricula = ? AND senha = ?");
$logar->bindValue(1, $matr... | true |
875ef64eef70f3a281fe648778eddd4980e4e7a3 | PHP | ArtemPakhomov/project | /model.php | UTF-8 | 1,651 | 2.859375 | 3 | [] | no_license | <?php
class model
{
public static function getTable(){
$dbUser = "root";
$dbPassword = "";
$dbHost = "localhost";
$dbName = "tblbase";
global $base;
$base = new mysqli($dbHost, $dbUser, $dbPassword,$dbName);//Подключение базы данных
$sql = "SELECT * ... | true |
1595610e50105fab2aaefc13bfdc9806cb462f9b | PHP | PaulKuzmin/KoronaAutoAPI | /src/Request/Product/Stock.php | UTF-8 | 673 | 2.53125 | 3 | [] | no_license | <?php
namespace KoronaAuto\Request\Product;
/**
* Запрос остатков товара на складах
*/
class Stock extends \KoronaAuto\Request\ARequest {
protected function getMethod() {
return 'product/stock/';
}
/**
* Получить остатки товара на складах
* @param type $productId Уникальный идентифи... | true |
b3c21fbd3606eac4cb49292048dc40f396648181 | PHP | humantech/defender | /src/Defender/Contracts/Defender.php | UTF-8 | 1,804 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Artesaos\Defender\Contracts;
/**
* Interface Defender.
*/
interface Defender
{
/**
* Get the current authenticated user.
*
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function getUser();
/**
* Check if the authenticated user has the given... | true |
dcf11bb0ef3d6083bfcb2dc181cf8681a8b3e3f5 | PHP | degrigo/501 | /aula02/classe-final.php | UTF-8 | 194 | 2.90625 | 3 | [] | no_license | <?php
echo "<pre>";
// Classe final não permite herança para os filhos
// Classe final bloqueia polimorfismo
final class Foo { protected $foo; }
class Bar extends Foo { }
$foo = new Foo(); | true |
5579f5a590f742258ceb344516205a179436d11f | PHP | ajones05/seearound.me | /application/models/Address.php | UTF-8 | 2,238 | 2.765625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "address".
*/
class Application_Model_Address extends Zend_Db_Table_Abstract
{
/**
* The table name.
*
* @var string
*/
protected $_name = 'address';
/**
* @var array
*/
protected $_dependentTables = [
'Application_Model_User',
'Application_Model_N... | true |
a883bab60721506e1b6169d4314d49d0d38eedb3 | PHP | schwindy/davewillisphotography.com | /app/classes/__kekPHP/Action.php | UTF-8 | 844 | 2.671875 | 3 | [] | no_license | <?php
class Action extends BaseClass
{
var $user;
function __construct($args)
{
if (is_string($args)) {
$db = Database::getInstance();
$db->insert('actions', [
'id' => generate_mysql_id(),
'user_id' => get_user()['id'],
... | true |
0e7603374b665d1001664c4cfa07c9620b73d936 | PHP | mbooali/SimpleMVC-example | /simplemvc/lib/simplemvcwf/router.php | UTF-8 | 1,997 | 3.34375 | 3 | [] | no_license | <?php
// The Router class stores Routes and handles all MVC related
// routing logic
class Router {
private $routes = array();
function __construct() {
}
function registerRoute($route) {
$this->routes[] = $route;
}
// Gets the Route for the current request... | true |
11318aec5428fdca34915a0c4841ee07838694d2 | PHP | marmot-cn/passion | /Application/Inquiry/Model/Inquiry.class.php | UTF-8 | 4,786 | 2.859375 | 3 | [] | no_license | <?php
namespace Inquiry\Model;
use Common\Model\ModifyTime;
use Common\Model\Status;
use Product\Model\Product;
use Marmot\Core;
/**
* Inquiry 询价领域对象
* @author chloroplast
* @version 1.0.0:2016.07.03
*/
class Inquiry
{
/**
* @var ModifyTime 时间性状
*/
use ModifyTime;
/**
* @var Status 状态性... | true |
adae674c3cf5a6163d0bc1e5ee1cdaf82fe236f7 | PHP | FilipeMGaspar/Curso_PHP_7_Hcode | /Secao_14/class/usuario.php | UTF-8 | 3,452 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
//Incluir script que permite mostrar os erros
require_once "../mostraerros.php";
//Criação da class usuario
class Usuario{
private $idusuario;
private $deslogim;
private $dessenha;
private $dtcadastro;
public function getIdusuario(){
return $this->idusuario;
}
public function setIdusuario... | true |
d96e551d4ed89a9c1bcda41be2437dc053f92873 | PHP | jhebmann/dstrade | /profile/update.php | UTF-8 | 4,193 | 2.75 | 3 | [] | no_license | <?php
include('../includes/cookie.php');
$loginexistant = FALSE;
$wrongpass = FALSE;
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="icon" href="../lib/favicon.png" type="image/png" sizes="32x32">
<title>Edit profile</title>
</hea... | true |
4837c79813ee09b8afe9ab7afa702ba65167fa98 | PHP | 0510winnie/lara_blog | /app/Http/Requests/TopicRequest.php | UTF-8 | 1,192 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class TopicRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the ... | true |
1b535af36c7aa669cc61db2432c1f53f1b59341c | PHP | OskarStark/dev-kit | /src/Github/HookProcessor.php | UTF-8 | 1,792 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Github;
use App\Domain\... | true |
b586b4dacff7e54ae5891b68225112acc6aba049 | PHP | xemlock/htmlpurifier-html5 | /library/HTMLPurifier/Injector/HTML5/DlDiv.php | UTF-8 | 1,079 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Injects special attribute to div start token with information whether the token
* is a direct child of dl. This is done during MakeWellFormed stage.
*
* The value of the attribute is used in {@link HTMLPurifier_ChildDef_HTML5_Div}
* for determining whether dt and dd should be allowed.
*
* This addit... | true |
53205461ab0b5c7caef37cf5524eca2e65ff2171 | PHP | christymay/capstone | /admin/store/add.php | UTF-8 | 1,294 | 2.75 | 3 | [] | no_license | <?php
include '../../inc/store.php';
include '../../inc/building.php';
$store = new Store;
$bldg = new Building;
$bldg->isloggedin();
if (isset($_POST['addstore'])) {
$res = $store->insert_store($_POST);
if ($res) {
echo "Successfully added!</br></br>";
}else{
echo "Fail to add store!</br></br>";
}
}
... | true |
bab7bcc7f2c3b8a1f5656186c02a746c3f508adb | PHP | zhucheng82/GasSysManagment | /application/services/doctor_service.php | UTF-8 | 8,022 | 2.65625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class doctor_service
{
public function __construct()
{
$this->ci = &get_instance();
$this->ci->load->model('doctor_model');
$this->ci->load->model('service_model');
$this->ci->load->model('user_price... | true |
6526712b197b558cdc5a2f00febb16ac4443ad92 | PHP | cubledesarrollo/cashew | /application/models/user.php | UTF-8 | 4,040 | 2.921875 | 3 | [] | no_license | <?php
/**
* Modelo para un usuario.
*
* @author Marcos Gabarda
*
*/
class User extends CashewModel
{
/**
*
* @var string
*/
private $hash_function = 'sha256';
/**
* Constructor.
*/
function __construct()
{
parent::__construct();
$this->load->... | true |
f7037572be47183e2cf36d3b33fcbacdfde0c3e3 | PHP | Wil-g2/pucecommerce | /application/controllers/AlunoController.php | UTF-8 | 4,844 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Created by PhpStorm.
* User: willian
* Date: 7/1/18
* Time: 2:56 PM
*/
class AlunoController extends MY_Controller{
public function __construct(){
parent::__construct();
//carrega o modelo de user
$this->loa... | true |
6e6bd76fb01fc8bf295f63070d1b744c0807bd2e | PHP | muraliv21/php-code-quality-testing-sonar-gitlab-ci | /src/Domain/Todo/Usecase/ReadTodo.php | UTF-8 | 462 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace LBN\Demo\Domain\Todo\Usecase;
use LBN\Demo\Domain\Todo\Entity\Todo;
use LBN\Demo\Domain\Todo\Repository\TodoRepository;
final class ReadTodo
{
/** @var TodoRepository */
private $repository;
public function __construct(TodoRepository $repository)
{
$... | true |
5c4cb74b2b4c3192bc401b61582c62b34e1cc1f5 | PHP | satmari/finalaudit | /database/migrations/2016_06_17_082905_create_sizesets_table.php | UTF-8 | 1,120 | 2.609375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSizesetsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sizeset', function(Blueprint $table)
{
$table->increments('id');
$t... | true |
552a9764929e12b51583efbc2f108590dfa96e82 | PHP | php-task/php-task | /src/Task/Storage/ArrayStorage/ArrayTaskRepository.php | UTF-8 | 2,334 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of php-task library.
*
* (c) php-task
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Task\Storage\ArrayStorage;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection... | true |
826dff661cfcaf4f321222c04525dee11be9967c | PHP | D4V1L3X/projobjects-easier | /Classes/Webforce3/DB/Session.php | UTF-8 | 11,659 | 2.9375 | 3 | [] | no_license | <?php
namespace Classes\Webforce3\DB;
use Classes\Webforce3\Config\Config;
use Classes\Webforce3\Exceptions\InvalidSqlQueryException;
class Session extends DbObject
{
/** @var string */
protected $sessionStartDate;
/** @var string */
protected $sessionEndDate;
... | true |
fbddbce42cb0dd61c8e59d2f8cad6aeef41b22c2 | PHP | phug-php/phug | /src/Phug/Parser/Parser/TokenHandler/CodeTokenHandler.php | UTF-8 | 1,095 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Phug\Parser\TokenHandler;
use Phug\Lexer\Token\CodeToken;
use Phug\Lexer\Token\TextToken;
use Phug\Lexer\TokenInterface;
use Phug\Parser\Node\CodeNode;
use Phug\Parser\State;
use Phug\Parser\TokenHandlerInterface;
class CodeTokenHandler implements TokenHandlerInterface
{
public function handleTok... | true |
0ff951b4a0535076a2886e0e4bbe1c0538bd1bcb | PHP | tidal/phunkie | /src/Phunkie/Laws/ApplicativeLaws.php | UTF-8 | 1,158 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Phunkie, library with functional structures for PHP.
*
* (c) Marcello Duarte <marcello.duarte@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Phunkie\Laws;
use const Phunkie\F... | true |
534c3f3536ecd80b2e9962eb72f0b00215f21d13 | PHP | xavoctechnocratspvtltd/xschoolApp | /atk4-addons/performance/lib/Controller/Profiler.php | UTF-8 | 3,600 | 2.515625 | 3 | [
"LicenseRef-scancode-other-permissive"
] | permissive | <?php
namespace performance;
class Controller_Profiler extends \AbstractController {
public $timetable=array();
public $curfunc=array();
public $offset=0;
public $profstart=null;
public $calls=0;
function init(){
parent::init();
$this->api->pr=$this;
$t... | true |
07d744ba4e2072ba222785d9b44ba15e131128dd | PHP | bayfrontmedia/bones | /src/Application/Kernel/Console/Commands/MigrateDown.php | UTF-8 | 4,124 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bayfront\Bones\Application\Kernel\Console\Commands;
use Bayfront\Bones\Application\Utilities\App;
use Bayfront\Container\Container;
use Bayfront\PDO\Db;
use Exception;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputIn... | true |
361907cc902c187d40a637f1e613ade50a1d0733 | PHP | coduo/tutu-faker-extension | /src/Coduo/TuTu/Extension/Faker.php | UTF-8 | 654 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Coduo\TuTu\Extension;
use Coduo\TuTu\Extension;
use Coduo\TuTu\Extension\Faker\Twig\Extension\FakerExtension;
use Coduo\TuTu\ServiceContainer;
class Faker implements Extension
{
/**
* @var null
*/
private $locale;
/**
* @param string|null $locale
*/
public functio... | true |
f4d60c70b708afa3b6c590fe4bb15704a2253736 | PHP | d4ro/skinny-lib | /Application/Response/ResponseInterface.php | UTF-8 | 309 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Skinny\Application\Response;
/**
* Description of ResponseInterface
*
* @author Daro
*/
interface ResponseInterface {
public function setHeader($name, $value, $code = null);
public function setCode($code);
public function setBody($body);
public function respond();
}
| true |
c4786ef7c26072a6ec90d7d59972c49e5d3c1623 | PHP | taylornetwork/laravel-username-generator | /src/Drivers/EmailDriver.php | UTF-8 | 372 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace TaylorNetwork\UsernameGenerator\Drivers;
class EmailDriver extends BaseDriver
{
public string $field = 'email';
/**
* Strip everything after the @ symbol.
*
* @param string $text
*
* @return string
*/
public function first(string $text): string
{
... | true |
a2f3446dfbfc900f63fb5bd7f0e10d2daec2184a | PHP | duytc/ur-api | /src/UR/Entity/Core/ReportViewTemplateTag.php | UTF-8 | 586 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace UR\Entity\Core;
use UR\Model\Core\ReportViewTemplateInterface;
use UR\Model\Core\TagInterface;
use UR\Model\Core\ReportViewTemplateTag as ReportViewTemplateTagModel;
class ReportViewTemplateTag extends ReportViewTemplateTagModel
{
/** @var TagInterface */
protected $tag;
/**
* @va... | true |
723cdde1f94876d41ba1336ac09f4dbb44e6c6a2 | PHP | metagoto/v8 | /tests/004.phpt | UTF-8 | 414 | 2.59375 | 3 | [] | no_license | --TEST--
V8Context array test
--SKIPIF--
<?php if (!extension_loaded('v8')) die('v8 not loaded'); ?>
--FILE--
<?php
$c = new V8Context();
var_dump($c->run("a = [1,2,'hello',3.14, false,true,null]; a.zz = true; a"));
?>
--EXPECT--
array(8) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
string(5) "hello"
[3]=>
flo... | true |
b9142c0adbd9814b39aad3ba4d1046b3ec78d3b5 | PHP | geovanegeh08/PHP | /index.php | UTF-8 | 548 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h1>
<?php
$nome = "Geovane Lindo";
$nascimento = "08/01/1993";
$sobre_nome = "Costa";
/*echo $nome; //Comentário, refere-se a variável nome
echo '<br />'
echo $nascimento;
echo '<br />'
echo $sobre_nome;*/
/*outro comentário
es... | true |
798ffd2c1d1a89e343b50a57749c418b4838074d | PHP | st-universe/core | /src/Orm/Repository/BuildingRepositoryInterface.php | UTF-8 | 545 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Stu\Orm\Repository;
use Doctrine\Persistence\ObjectRepository;
use Stu\Orm\Entity\Building;
use Stu\Orm\Entity\BuildingInterface;
/**
* @extends ObjectRepository<Building>
*
* @method null|BuildingInterface find(integer $id)
*/
interface BuildingRepositoryInterface extends ObjectRepository
{
... | true |
d8b8c455125a26f0c659433902381f3a6ab45884 | PHP | leihog/wallstreet | /src/Command/Update.php | UTF-8 | 657 | 2.953125 | 3 | [] | no_license | <?php
namespace Gomitech\Wallstreet\Command;
use Gomitech\Wallstreet\FetcherInterface;
use Gomitech\Wallstreet\StorageInterface;
class Update {
protected $storage;
protected $fetcher;
public function __construct(FetcherInterface $fetcher, StorageInterface $storage) {
$this->fetcher = $fetcher;
... | true |
67a15703b38b56bece8a8ef1a0945253b69428d0 | PHP | Nich-Thompson/reserveermeneer | /app/Http/Requests/UpdateFilmRequest.php | UTF-8 | 2,212 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Models\Hall;
use DateTime;
use Illuminate\Foundation\Http\FormRequest;
class UpdateFilmRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
ret... | true |
a7d66a0762fe888a2f49d7a676a3c799cab87322 | PHP | sample2721/test | /test/unit/parse_logTest.php | UTF-8 | 1,654 | 2.53125 | 3 | [] | no_license | <?php
class parse_logTest extends \PHPUnit\Framework\TestCase
{
/**
* @test
* @dataProvider readDataProvider
*/
public function read(string $filename, array $expected)
{
$actual = read($filename);
$this->assertEquals($expected, $actual);
}
public function readDataPro... | true |
bc65036f50f0c30a58b858654ef02752afd8940b | PHP | picnii/zenpos | /models/Product.php | UTF-8 | 3,660 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "product".
*
* @property integer $id
* @property string $name
* @property integer $retail_price
* @property string $create_time
* @property string $update_time
* @property string $code
* @property integer $brand_id
*
* @property ... | true |
492141a6aacaee2e88a6092ca087d020c5edd341 | PHP | makary-tony/proMyToDo | /app/TodoItem.php | UTF-8 | 786 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class TodoItem extends Model
{
/**
* The model table name.
*
* @var string
*/
protected $table = 'items';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
... | true |
ac7cd9dedd52672e6e77ffb5b8ba2cecb90a68d5 | PHP | AnamulHasan/pgdit_1724 | /login.php | UTF-8 | 3,066 | 2.75 | 3 | [] | no_license | <?php session_start();
if(isset($_SESSION['userName']))header("location:admin.php");
include_once ('db_connect.php');
if(isset($_POST["submit"])){
$userName = $_POST["userName"];
$passWord = $_POST["passWord"];
$stmt = $db->prepare('SELECT userName,passWord FROM `admin_user` WHERE userName = ?');
$stm... | true |
21712f6c0db29f7b0d081b20f419879efdfdaf7e | PHP | vonNiklasson/graph-server | /GraphServer/Pool.php | UTF-8 | 905 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace GraphServer;
use GraphServer\Base\Pool as BasePool;
/**
* Skeleton subclass for representing a row from the 'pool' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in... | true |
b2e39f75db877f2d3bad45d2d2b575c7509801bf | PHP | rereal7/furiPHP | /chap4/chap4_func.php | UTF-8 | 195 | 2.859375 | 3 | [] | no_license | <?php
function createMsg( $name, $price) {
$msg = <<< EOM
{$name}様
ご注文承りました。
合計{$price}円です。\n
EOM;
echo $msg;
}
function getPrice ($cnt) {
return 500 * $cnt;
} | true |
a5899e2fe7d2e1f3e37511830f98687797336198 | PHP | scrxped/Crawler | /src/Handler/Discovery/LinkDiscoverer.php | UTF-8 | 1,346 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace LastCall\Crawler\Handler\Discovery;
use LastCall\Crawler\CrawlerEvents;
use LastCall\Crawler\Event\CrawlerHtmlResponseEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Discovers link URLs in an HTML response.
... | true |
d912d0be9d98bc836c5a3bcf3ce5501631a70399 | PHP | dantleech/maestro | /src/Library/TokenReplacer/TokenReplacer.php | UTF-8 | 1,475 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Maestro\Library\TokenReplacer;
use Maestro\Library\TokenReplacer\Exception\InvalidTokenType;
use Maestro\Library\TokenReplacer\Exception\UnknownToken;
class TokenReplacer
{
/**
* @var string
*/
private $delimiter;
public function __construct(string $delimiter = '%')
{
... | true |
bdbf35997259c9cf66e7ae8c5f3c4566c4c99720 | PHP | KlausBacker/anakeen-platform-4 | /control/src/include/class/Class.Context.php | UTF-8 | 110,930 | 2.9375 | 3 | [] | no_license | <?php
/*
* Context Class
* @author Anakeen
*/
require_once(__DIR__ . "/../../vendor/autoload.php");
/**
* Util functions using php DOMDocument
*
* @param DOMElement $node
*/
function deleteNode(DOMElement $node)
{
deleteChildren($node);
/**
* @var DOMElement $parent
*/
$parent = $node->pare... | true |
f3454a1ea78faf74ce7762b2b7f6dcadd4275af4 | PHP | Ruha-RP/eNTIBODY | /app/Patient.php | UTF-8 | 641 | 2.546875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Patient extends Model
{
public function tests()
{
return $this->hasMany('App\Test');
}
/**
* The attributes that are mass assignable.
*
* @var array
*/
//These are mass assignables
protected $fill... | true |
f3e4ce4b412088af961fea320386b7a0d7a0d8e7 | PHP | waaghals/Intersect | /application/models/images_model.php | UTF-8 | 7,327 | 2.75 | 3 | [] | no_license | <?php
class Images_model extends CI_Model {
function __construct()
{
// Call the Model constructor
parent::__construct();
$this->load->helper('path', 'url');
}
public function top($number)
{
return $this->images($number, FALSE);
}
public function flop($number)
{
return $this->images($number, TRUE);... | true |
fe96dbbf06a68517c575ff8c4c141c44bec08230 | PHP | StevenGrl/projet3-entrenous | /src/AppBundle/Service/Mailer.php | UTF-8 | 2,378 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: aragorn
* Date: 27/06/18
* Time: 17:07
*/
namespace AppBundle\Service;
use AppBundle\Entity\Event;
use AppBundle\Entity\User;
class Mailer
{
const TYPES = ['notification', 'invitation', 'confirmation'];
protected $templating;
protected $mailer;
/**
... | true |
d2a9c534a15cc4bcead251218f4d3a4d9e94bf94 | PHP | ErkkiTa/bookstore | /book.php | UTF-8 | 1,016 | 2.640625 | 3 | [] | no_license | <?php
require_once 'db_connection.php';
$id = $_GET['id'];
$stmt = $pdo->prepare('SELECT * FROM Books.books LEFT JOIN Books.book_authors ON book_id=Books.books.id LEFT JOIN Books.authors ON Books.authors.id = author_id WHERE Books.books.id=:id');
$stmt->execute(['id' => $id]);
$book = $stmt->fetch();
?>
<!DOCTYPE htm... | true |
dca1381a1a2959117a9862ed1ac91d49aa13ea67 | PHP | BGFR/PHP | /PHP_Fundamentals/midExamExercise/1_Black_Flag.php | UTF-8 | 2,598 | 3.1875 | 3 | [] | no_license | <?php
$days = intval(readline());
$dailyPlunder = intval(readline());
$expectedPlunder = floatval(readline());
$gainedPlunder = 0;
for($i=1;$i<=$days;$i++){
$gainedPlunder +=$dailyPlunder;
if($i%3 == 0){
$gainedPlunder +=$dailyPlunder*0.5;
}
if($i%5 == 0){//Plunder -=$dailyPlunder;
... | true |
7e3cb18bb4548f7db66205cfcd465d17c6eee713 | PHP | FriendsOfShopware/FroshDevelopmentHelper | /src/Command/MakePlugin.php | UTF-8 | 5,086 | 2.515625 | 3 | [] | no_license | <?php
namespace Frosh\DevelopmentHelper\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Compone... | true |
9d9fd1cf7915df0997815b7d2e5c09b95ec073f6 | PHP | huseyincakirca/upload-class | /Image.php | UTF-8 | 3,050 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
require_once 'class.upload.php';
/**
*
*/
class Image extends upload
{
var $newName, // Yeni İsim
$maxSize, // Maksmum Boyut
$place, // Kayıt Edilecek Dosya
$format, // Kayıt Biçimleri
$thumbName, // Küçük Resim İsmi
$... | true |
bb7138bc36e1b08363806c6c8ba10c1e42aa0cc3 | PHP | neagudenisa5/OnlineShop-PHP | /home.php | UTF-8 | 6,781 | 2.5625 | 3 | [] | no_license | <?php
session_start();
include_once 'class.user.php';
require_once("Conection.php");
$db_handle = new DBController();
$user = new User();
$uid = $_SESSION['uid'];
//daca persoana nu e logata ne redirectioneaza catre login.php
//get_session e functia din class.user.php
if (!$user->get_session()){
header("loca... | true |
34490d035bed44d340dee1a7c968a7fa3eb3f5bb | PHP | iRbAf7/gestor_permisos | /models/Cargos/consultarCargos.php | UTF-8 | 354 | 2.6875 | 3 | [] | no_license | <?php
function consultarCargos($conexion) {
try{
$consultar_cargos = $conexion->prepare("SELECT * FROM cargos");
$consultar_cargos->execute();
$consultar_cargos = $consultar_cargos->fetchAll(PDO::FETCH_ASSOC);
}catch(PDOException $e){
echo "Error: " . $e->getMessage();
}
... | true |
ea58a8c4f8e1e6a108d0bc5dc7fbfd2baa99263a | PHP | gotnerds/FourthBranch | /frontend/inc/postVote.php | UTF-8 | 1,458 | 2.546875 | 3 | [] | no_license | <?php
include "db_conx.php";
include_once 'db_connect.php';
include_once 'functions.php';
sec_session_start();
if (login_check($mysqli) == true) {
$logged = 'in';
if (isset($_POST['voteUser'])) {
$date = date("Y-m-d");
$userVote = $_POST['voteUser'];
$organization_id = $_POST['organiz... | true |
b6270a77131ffb312cd592f215b0225e0b3006d8 | PHP | be-charles/steam-market-api-v2 | /src/Responses/ItemListings.php | UTF-8 | 3,274 | 2.71875 | 3 | [] | no_license | <?php
namespace SteamApi\Responses;
use DiDom\Document;
use SteamApi\Interfaces\ResponseInterface;
use SteamApi\Mixins\Mixins;
class ItemListings implements ResponseInterface
{
private $data;
public function __construct($response)
{
$this->data = $this->decodeResponse($response);
}
publ... | true |
810a8b460b774fb8287b545c33545d18f3baff18 | PHP | lpsandaruwan/smak_tms | /application/controllers/adddriver.php | UTF-8 | 2,711 | 2.625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
session_start(); //we need to call PHP's session object to access it through CI
class AddDriver extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->model('addempd');
}
function index()
{
$this->l... | true |
16507d453889334fa8adc35a47ef051af09d45a1 | PHP | emonkak/underbar.php | /src/Underbar/Iterator/IterateIterator.php | UTF-8 | 842 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Underbar.php package.
*
* Copyright (C) 2013 Shota Nozaki <emonkak@gmail.com>
*
* Licensed under the MIT License
*/
namespace Underbar\Iterator;
class IterateIterator implements \Iterator
{
private $initial;
private $f;
private $acc;
private $index;
publ... | true |
a032a1761fd721591d87e05d263a24caafdedb45 | PHP | redcrystalcode/hourglass | /database/doctrine/migrations/Version20161212052641.php | UTF-8 | 902 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema as Schema;
class Version20161212052641 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
$this->addSql(
'CREATE ... | true |
46d3b5c9dd57291f48b5afbee6b55f9f91b00777 | PHP | DIEGOLOPES2021/ProjetoDePHP | /exercicio/aoContrario.php | UTF-8 | 404 | 3.46875 | 3 | [] | no_license | <?php
$vetor = ["maria","joao", 100, "Abobrinah"];
function inveterVetor($vetor){
for($i = (count($vetor)-1); $i >= 0 ; $i--){
echo $vetor[$i] . "--";
}
}
// function inveter(array $inveter){
// $inveter = array_reverse($inveter);
//
// foreach($inveter as $inveter){
// echo $inveter;
... | true |
62a0d8782201a3166250f804cd76b2facf836158 | PHP | sj3kenne/MOBA-Team7 | /database.php | UTF-8 | 4,876 | 2.59375 | 3 | [] | no_license | <?php
// Enable error logging:
error_reporting(E_ALL ^ E_NOTICE);
// mysqli connection via user-defined function
include('./my_connect.php');
$mysqli = get_mysqli_conn();
$ID = $_GET['ID'];
$sql_students = "CREATE TABLE Students(StudentID INT(8) PRIMARY KEY, GradYear VARCHAR(4))";
$sql_InsertStudents= "INSERT I... | true |
2b2c322d0101994b02607627e7784a524b47e53a | PHP | KaraRBennett/AmbassadorPortal | /PHP/Scripts/AddEventExecuteSubmission.php | UTF-8 | 7,375 | 2.765625 | 3 | [] | no_license | <?php
require_once "/var/www/html/PHP/Config.php";
require_once "/var/www/html/PHP/CoreFunctions.php";
require_once "/var/www/html/PHP/Encryption.php";
require_once "/var/www/html/PHP/FormFunctions.php";
require_once "/var/www/html/PHP/SQLFunctions.php";
if($_SERVER["REQUEST_METHOD"] === "POST"){
$throwbackErro... | true |
eb0dc94a95bee174faed3f82b25a29be3e0371cb | PHP | gitter-badger/ordercloud-php | /src/Support/ExceptionGenerators/ChainedExceptionGeneratorService.php | UTF-8 | 1,340 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php namespace Ordercloud\Support\ExceptionGenerators;
use Illuminate\Container\Container;
use Ordercloud\Requests\Exceptions\OrdercloudRequestException;
use Ordercloud\Requests\OrdercloudRequest;
use Ordercloud\Support\Http\OrdercloudHttpException;
class ChainedExceptionGeneratorService implements ExceptionGenerato... | true |
c211bdb0f49cd63dabca629ad21256b5ac243987 | PHP | xRubin/unapi-cbr | /src/CbrClient.php | UTF-8 | 338 | 2.546875 | 3 | [] | no_license | <?php
namespace unapi\cbr;
use GuzzleHttp\Client;
class CbrClient extends Client
{
/**
* @param array $config
*/
public function __construct(array $config = [])
{
$config['base_uri'] = 'http://www.cbr.ru';
$config['cookies'] = true;
parent::__construct($... | true |
9e625a33202bfd9ec4285b269af4b4c3bf7b9a00 | PHP | antidot-framework/antidot-bref-lambda-demo | /src/Application/EventListener/SomeEventListener.php | UTF-8 | 521 | 2.78125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace App\Application\EventListener;
use App\Application\Event\SomeEvent;
use Psr\Log\LoggerInterface;
use function get_class;
use function sprintf;
class SomeEventListener
{
/** @var LoggerInterface */
private $logger;
public function __construct(LoggerInterface $lo... | true |
15a553c5d1b130455cf7c453f5bdf19e92e9942e | PHP | eduardoplnascimento/medmazza-simple | /app/Http/Controllers/AppointmentController.php | UTF-8 | 2,870 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Appointment;
use Illuminate\Http\Request;
use App\Http\Services\AppointmentService;
class AppointmentController extends Controller
{
protected $appointmentService;
protected $appointmentModel;
public function __construct(
AppointmentService $a... | true |
c088f2371aa25f4d88959d682e5bc37426811ed2 | PHP | cbarenca10/Equipo1-5D-DIF- | /Codigo php para realizar consultas a la base de datos remota/conexion.php | UTF-8 | 455 | 2.609375 | 3 | [] | no_license | <?php
// VARIABLES QUE ALMACENAN LA CONEXION A LA BASE DE DATOS
$mysqli = new mysqli(
"localhost",
"chilaqu3_cap_root",
"5ZdPKw!Zszc^",
"chilaqu3_labuena"
);
$conn = mysqli_connect("localhost", "chilaqu3_cap_root", "5ZdPKw!Zszc^", "chilaqu3_labuena");
// COMPROBAMOS LA... | true |
83e57866cc82e5871afad1ca2ee50c9a4c863c56 | PHP | Corinne-cpa/projet | /CPA_2019-2020/DivEnfants12Dec/controller/ControllerParticipe.php | UTF-8 | 1,326 | 2.625 | 3 | [] | no_license | <?php
require_once 'framework/Controller.php';
require_once 'model/Participe.php';
require_once 'model/Orgjeux.php';
require_once 'model/Enfants.php';
class ControllerParticipe extends Controller {
private $participe;
/**
* Constructeur
*/
public function __construct() {
... | true |
6ddb5027b223857bef357e6d5eda93891b45fc9b | PHP | xp-framework/unittest | /src/test/php/unittest/tests/LimitTest.class.php | UTF-8 | 853 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php namespace unittest\tests;
use unittest\{Test, TestCase, TestSuite};
/**
* Test TestSuite class methods
*
* @see xp://unittest.TestSuite
*/
class LimitTest extends TestCase {
private $suite;
/** @return void */
public function setUp() {
$this->suite= new TestSuite();
}
#[Test]
public... | true |
b34169285703c3e3691ce70d18a06a2a7d8ccb41 | PHP | webdcg/redis | /src/Traits/Keys.php | UTF-8 | 13,238 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace Webdcg\Redis\Traits;
use Webdcg\Redis\Exceptions\NotAssociativeArrayException;
trait Keys
{
/**
* Remove specified keys [Blocking].
*
* @param mixed $keys
*
* @return int Number of keys deleted
*/
public function del(...$keys): int
{
return $this->re... | true |
8cfde15fe5624b8d92bfe411ba99a659f5d6dff0 | PHP | hyperf/hyperf | /src/testing/src/Assert.php | UTF-8 | 1,339 | 2.65625 | 3 | [
"BSD-3-Clause",
"WTFPL",
"MIT",
"Apache-2.0",
"LGPL-2.1-only",
"LGPL-2.1-or-later"
] | permissive | <?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace Hyperf\Testing;
use ArrayAccess;
use Hyperf\Testing\Constraint\ArraySub... | true |
75481bc48a582b58489aff2d092ed1344988e262 | PHP | Abderhman250/saydaostora | /database/migrations/2021_07_29_150931_create_game_attributes_table.php | UTF-8 | 820 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGameAttributesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('game_att... | true |
d319ef851a1e7c2ce5d180b248701a94f8b53ebc | PHP | kerubin13911/sapataria | /banco_cliente.php | UTF-8 | 1,333 | 2.71875 | 3 | [] | no_license | <?php
include "conexao.php";
/*Verifica a conexão com o banco de dados*/
$cpf = $_POST["cpf"];
$cliente = $_POST["cliente"];
$telefone = $_POST["telefone"];
$endereco = $_POST["endereco"];
$email = $_POST["email"];
$ok = true;
/*cliente*/
if(strlen(trim($cpf))==0){
$ok = false;
... | true |
065c93020c2c8b925a30f241653d951eed8301b3 | PHP | humanmade/vip-mu-plugins-public | /vip-dashboard/plugins-ui/plugins-ui.php | UTF-8 | 588 | 2.5625 | 3 | [] | no_license | <?php
require __DIR__ . '/class.wpcom-vip-plugins-ui.php';
/**
* The main function responsible for returning the one true WPCOM_VIP_Plugins_UI instance to functions everywhere.
*
* Use this function like you would a global variable, except without needing to declare the global.
* Example: <?php $WPCOM_VIP_Pl... | true |
673c98d50921a4fd9e3bb94919714c8814835a4d | PHP | bkdotcom/PHPDebugConsole | /src/Debug/Dump/Base.php | UTF-8 | 9,176 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of PHPDebugConsole
*
* @package PHPDebugConsole
* @author Brad Kent <bkfake-github@yahoo.com>
* @license http://opensource.org/licenses/MIT MIT
* @copyright 2014-2022 Brad Kent
* @version v3.0
*/
namespace bdk\Debug\Dump;
use bdk\Debug;
use bdk\Debug\AbstractComponent;
... | true |
faebf8216baa1111f3da9f2e7400ce898b449710 | PHP | morganeREBINDAINE/OCR5-blog | /src/App/Session.php | UTF-8 | 822 | 2.890625 | 3 | [] | no_license | <?php
namespace OCR5\App;
class Session
{
private static $vars;
public static function set($key, $value, $key2 = null)
{
$key2 ? self::$vars[$key][$key2] = $value : self::$vars[$key] = $value;
}
public static function get($key = null)
{
if ($key) {
return (isset(s... | true |
45490a3cd3adae88d07766f7fafb40fb144b6ad6 | PHP | WajoxSoftware/yii2-base | /src/modules/payment/services/adapter/PaymentMethodsManager.php | UTF-8 | 877 | 2.703125 | 3 | [] | no_license | <?php
namespace wajox\yii2base\modules\payment\services\adapter;
class PaymentMethodsManager
{
public $good = null;
public function __construct($good)
{
$this->setGood($good);
}
public function setGood($good)
{
$this->good = $good;
return $this;
}
public func... | true |
60e016e62fb07ddf4e6f16a5edc5bd5ccda6ecce | PHP | Ssssory/main-sym-4.1 | /src/Entity/OcWeightClass.php | UTF-8 | 854 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* OcWeightClass
*
* @ORM\Table(name="oc_weight_class")
* @ORM\Entity
*/
class OcWeightClass
{
/**
* @var int
*
* @ORM\Column(name="weight_class_id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strat... | true |
508dceaf9dcba4a591a78602e2ad006fb79faaa2 | PHP | ChurchCRM/CRM | /src/ChurchCRM/Authentication/AuthenticationManager.php | UTF-8 | 7,044 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace ChurchCRM\Authentication {
use ChurchCRM\Utils\RedirectUtils;
use ChurchCRM\Service\NotificationService;
use ChurchCRM\Utils\LoggerUtils;
use ChurchCRM\dto\SystemURLs;
use ChurchCRM\Authentication\AuthenticationProviders\IAuthenticationProvider;
use ChurchCRM\Bootstrapper;
use ChurchCRM\... | true |
76ced234cc4e65c43b2dfd050e0467362fabc2ed | PHP | kepka42/laravel-mapper | /src/Contracts/MapperContract.php | UTF-8 | 457 | 2.765625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace kepka42\LaravelMapper\Contracts;
/**
* Interface MapperContract
* @package kepka42\LaravelMapper\Contracts
*/
interface MapperContract
{
/**
* @param $object
* @param string $hint
* @param array $params
* @return mixed
*/
public function map($object, string $hint, $... | true |
61c517bab827b4b859e589aac7608f3a49e4431b | PHP | man0v/skribbl_dictionary | /index.php | UTF-8 | 7,273 | 2.671875 | 3 | [] | no_license | <?php
define('MAX_WORDS', 500);
$error = [];
$success = [];
//xpuc7o
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
// written in early 2000s
function valid($valid)
{
if ($valid == "")
return false;
$split = preg_split('//u', $valid, null, PREG_... | true |
9b3e230adff6dddf6ef8e3804fa59d70ca3c3c20 | PHP | rurikCL/ematAdmin | /olimpiadas/application/controllers/EmatconsController.php | UTF-8 | 11,703 | 2.546875 | 3 | [] | no_license | <?php
class EmatconsController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
}
public function complementariasAction()
{
//saca listas de acti... | true |
f428534f642ca0bccbb54d78cbbaa2fae4a67c39 | PHP | akbarp125600/tugas_Pemrograman-Web | /petugas/cari/cari_buku.php | UTF-8 | 1,225 | 2.53125 | 3 | [] | no_license | <?php
include 'koneksi.php';
?>
<?php
if(isset($_GET['cari'])){
$cari = $_GET['cari'];
echo "<b>Hasil pencarian : ".$cari."</b>";
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"></link>
</head>
<body>
<div id="label-page"><h3>Tampil Data Buku</h3>
<div id="conten... | true |
b3d10a4da6c41c6e17debf6c51385ad514bc3422 | PHP | NatachaH/laravel-starter-pack | /src/View/Components/Form/MediaDynamic.php | UTF-8 | 4,345 | 2.65625 | 3 | [] | no_license | <?php
namespace Nh\StarterPack\View\Components\Form;
use Illuminate\View\Component;
use Nh\BsComponent\View\Components\Form\DynamicTemplate;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
class MediaDynamic extends DynamicTemplate
{
/**
* Media available formats.
* @var string
*/
public $form... | true |