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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ce54b8146526b6f2ee7d3f994c6ce49f9b988f60 | PHP | vijay2021/oopPhp | /clone_toString.php | UTF-8 | 598 | 3.1875 | 3 | [] | no_license | <?php
class Testing{
private $test = "testting";
public function __construct(){
$this->test = "new testing";
}
/* public function __construct(){
$this->test = 89;
}
( ! ) Catchable fatal error: Method Testing::__toString() must return a string value in C:\wamp64\www\test2\index.php on line 17
Call St... | true |
a2838eea3b0afc481faf5db75c26b5c7b73fcf0e | PHP | nguyenpham20/lesson6 | /Animal_Edible/Animal/Tiger123.php | UTF-8 | 205 | 3.046875 | 3 | [] | no_license | <?php
//use Animal\Animal123;
include_once("../AbstractClass123/Animal123.php");
class Tiger123 extends Animal123
{
public function makeSound()
{
return "Tieng keu cua Tiger123";
}
}
| true |
0a85c63c23e64ded18fa81738f2b8434a3fe4c16 | PHP | retailcrm/aliexpress-top-client | /src/Component/Logger/StdoutLogger.php | UTF-8 | 547 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP version 7.3
*
* @category StdioLogger
* @package RetailCrm\Component\Logger
*/
namespace RetailCrm\Component\Logger;
/**
* Class StdioLogger
*
* @category StdioLogger
* @package RetailCrm\Component\Logger
*/
class StdoutLogger extends AbstractLogger
{
/**
* @param mixed $level
... | true |
c863eb8fb40888ce0755d3e3bd8c2b8ffb6f82be | PHP | smartdesarrollador/elem_pry | /php/funciones_matematicas/alfanumerico_aleatorio.php | UTF-8 | 435 | 3.515625 | 4 | [] | no_license | <?php
function randomAlphaNum($length){
$rangeMin = pow(36, $length-1); //smallest number to give length digits in base 36
$rangeMax = pow(36, $length)-1; //largest number to give length digits in base 36
$base10Rand = mt_rand($rangeMin, $rangeMax); //get the random number
$newRand = base_convert... | true |
aaf6c54c5e4f61245969476cc0133863551acb3b | PHP | AllInWeb/allinweb-Yii | /protected/controllers/SiteController.php | UTF-8 | 2,096 | 2.53125 | 3 | [] | no_license | <?php
class SiteController extends Controller
{
/**
* Render главной страницы
*/
public function actionIndex()
{
$carousel = Carousel::model()->findAll(array('limit' => 5));
$portfolio = Portfolio::model()->findAll();
$tarif = Tarif::model()->findAll();
$question =... | true |
dd7be6a51e82ade0878c77b7e8d59c7d474b1c79 | PHP | cidengcc/cmseasy | /lib/plugins/json.php | UTF-8 | 7,637 | 2.703125 | 3 | [] | no_license | <?php
if (!defined('ROOT')) exit('Can\'t Access !');
class FastJSON {
static public function convert($params,$result = null) {
switch(gettype($params)) {
case 'array':
$tmp = array();
foreach($params as $key =>$value) {
if(($value = FastJSON::... | true |
20e2c957bb040e056a1ca7fd67db26af99f780c9 | PHP | e2221/nette-skeleton | /app/Model/UserACL/Authenticator.php | UTF-8 | 1,199 | 2.8125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\UserACL;
use Nette\Security\AuthenticationException;
use Nette\Security\SimpleIdentity;
class Authenticator implements \Nette\Security\Authenticator
{
private UserACLManager $userACLManager;
const AUTHENTICATED_ROLES = ['authenticated'];
public function __... | true |
eb9c01bbc183c2b737656660590b8fc6c0410ae5 | PHP | ROHL14/InventarioProjecto | /app/controllers/logincontroller.php | UTF-8 | 1,338 | 2.546875 | 3 | [] | no_license | <?php
include_once "app/models/login.php";
class LoginController extends Controller
{
private $user;
public function __construct($param)
{
$this->user = new Login();
parent::__construct("login", $param);
/*if (!isset($_SESSION)) {
parent::__construct("login", $param);
} else {
parent::__construct("das... | true |
b86d484de04c6d36beefe28e5390c9139f7c162f | PHP | abdeltiflouardi/Cshar | /lib/Parser.php | UTF-8 | 397 | 2.84375 | 3 | [] | no_license | <?php
class Parser {
static function getFieldNameFromMethod($field) {
return lcfirst(substr($field, 3, strlen($field)));
}
static function getMethodFromFieldName($field, $type = 'set') {
return $type . ucfirst($field);
}
static function getDatabaseTableName($class_name) {
... | true |
d27882fbaa71651b637b17c1f11ef2be3d14b706 | PHP | k3lv1nd/BMS---Apiato-project | /app/Containers/BoardMembers/Models/BoardMembers.php | UTF-8 | 711 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Containers\BoardMembers\Models;
use App\Ship\Parents\Models\Model;
class BoardMembers extends Model
{
protected $fillable = [
'member_id',
'board_id'
];
protected $attributes = [
];
protected $hidden = [
];
protected $casts = [
];
protec... | true |
64d0f5531f706bbe5a183a9320be630db4f82490 | PHP | firalabs/firalabs-tv-show | /src/Shows/Meta/AbstractMeta.php | UTF-8 | 4,408 | 2.84375 | 3 | [] | no_license | <?php
namespace Firalabs\Shows\Meta;
use Firalabs\View;
use WP_Post;
/**
* Abstract class for plugin meta
*
* @author Maxime Beaudoin <firalabs@gmail.com>
* @package firalabs-tv-show
*
*/
abstract class AbstractMeta
{
/**
* The title of the meta
*
* @var string
... | true |
4b646044d8b25f97208491c9e77f3d934417b845 | PHP | chordstricken/charon | /lib/api/login.php | UTF-8 | 986 | 2.65625 | 3 | [] | no_license | <?php
namespace api;
use models;
use \Exception;
use core;
/**
* Handles a login request
* @author Jason Wright <jason@silvermast.io>
* @since 1/2/17
* @package charon
*/
class Login extends core\APIRoute {
/** @var bool overrides parent */
protected $require_auth = false;
/**
* Authenticates ... | true |
39098ad705e124bff580383f4923e0b406ae67bc | PHP | iyaad/Gestion-Stage | /application/migrations/20151221170258_add_email_adress_phone_to_entreprise.php | UTF-8 | 661 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Migration_add_email_adress_phone_to_entreprise extends CI_Migration {
public function up() {
$this->dbforge->add_column('Entreprise', array(
'email' => array(
'type' => 'VARCHAR',
'constraint' => 255,
'NULL' => false,
),
'adresse' => array(
'type' => 'VARCHAR',
'constraint'... | true |
d4fd5e233d1ab48b85e88e810093aee23b238023 | PHP | suite6/LightCDN | /vendor/suite6/Tackler/Communicator/TacklerImporter.php | UTF-8 | 34,034 | 2.53125 | 3 | [] | no_license | <?php
/*
* The MIT License (MIT)
* Copyright (c) 2013 Louis-Eric Simard, Suite6
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the... | true |
e1a4466f41fc0ffa70eb27694e2ecdc0626c1a57 | PHP | ChadS/WebPro_assignment7 | /viewalbum.php | UTF-8 | 468 | 3 | 3 | [] | no_license |
<?php
require('db.php');
$query = "SELECT * FROM album";
$result = mysqli_query($con, $query);
if ($result->num_rows > 0) {
// output data of each row
while ($row = $result->fetch_assoc()) {
echo "id: " . $row["id"] . " | Title: " . $row["title"] . " | Type: " . $row["typeofalbum"] . " | Material: " .... | true |
ba432f6e2d0bf49d2dcbf2845b162ecd40d7740d | PHP | FahadShahid143/TwitterAPI | /app/Http/Controllers/TwitterController.php | UTF-8 | 3,200 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use RecursiveArrayIterator;
use RecursiveIteratorIterator;
use Twitter;
use File;
class TwitterController extends Controller
{
/**
*
* Return a sample page where all the tweets will be shows and operate
*
*/
public fun... | true |
32519b577e020ec538ede530148e13e070e7ef41 | PHP | platinize/movie-rental | /src/Customer/PriceCodes/RegularPriceCode.php | UTF-8 | 259 | 2.953125 | 3 | [] | no_license | <?php
namespace App\Customer\PriceCodes;
class RegularPriceCode implements PriceGetable
{
public function get(int $daysRented): int
{
if ($daysRented > 2) {
return ($daysRented - 2) * 1.5 + 2;
}
return 2;
}
} | true |
4d4a09ffd9aeda7be455f826a9ee5022244d68ab | PHP | StanY098/projects | /ShoppingListOrganizer/email_requirement.php | UTF-8 | 2,925 | 2.734375 | 3 | [] | no_license | <?php
require_once('function.php');
require_once('header.php');
require_once('footer.php');
connectDB();
head('Email Requirement');
$valid = true;
if($_SERVER['REQUEST_METHOD'] == "POST"){
//check if email is valid
if(!$_POST['email']){
$valid = false;
... | true |
54c2c06446d7e8dd768c41eb520cbf4b78819917 | PHP | Teddycat/food-delivery | /models/Location.php | UTF-8 | 1,489 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\base\Model;
use yii\db\ActiveRecord;
use yii\db\Query;
class Location extends ActiveRecord {
public function getty($city) {
return (new Query())->from('location')
->select(['location_address', 'location_lat', 'location_let', 'location_iden... | true |
7c07d1a7ffc4e67f6191e4494bb5395b3a651d66 | PHP | ego-cogitare/telegram-bot | /app/Services/Interfaces/IMarketsApi.php | UTF-8 | 247 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Interfaces;
/**
* Interface IMarketsApi
*/
interface IMarketsApi {
/**
* @param array $payload
* @throws \Exception
* @return string|json
*/
public function call(array $payload = []);
} | true |
7002ec1e17d3b6b849d80464c41b797801214a78 | PHP | ludotm/cobalt | /Core/Com/Email.php | UTF-8 | 13,976 | 2.625 | 3 | [] | no_license | <?php
namespace Core\Com;
use \Core\Service;
use \Core\Api\Spothit;
use \Core\Com\Mailer\Mailer;
use \Core\Entity;
class Email extends Entity
{
public $options=array();
protected $options_keys=array();
public function __construct($params=array())
{
parent::__construct('_emails');
/... | true |
71a44148668e00142083db473236e22bf1f61bae | PHP | mutagatifu/kwiyandikisha | /include/program.php | UTF-8 | 3,827 | 2.890625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Hview
* Date: 28/11/2018
* Time: 10:37
*/
include 'dbconnection.php';
class Program extends DbConnection
{
private $id;
private $name;
private $duration;
//private $language;
//private $university;
private $startingDate;
/**
* @return mixed
*/
public ... | true |
98092be797413f102120b9543e6c8ac8c483fd6e | PHP | gabo32/CursoApiRestLaravel | /app/Http/Controllers/buyer/BuyerProductController.php | UTF-8 | 990 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\buyer;
use App\Models\Buyer;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Controllers\ApiController;
class BuyerProductController extends ApiController
{
/**
* Display a listing of the resource.
* es una relacion muchos a muchos
... | true |
84c2de989d8fc23fa68ac44e586af25bc754174a | PHP | JohnProg/HelloWorldPeruPage | /app/models/Project.php | UTF-8 | 1,154 | 2.609375 | 3 | [] | no_license | <?php
class Project extends Eloquent {
protected $table = 'projects';
public function toArray()
{
$array = parent::toArray();
$array['main_image'] = $this->get_main_image();
return $array;
}
public function get_main_image()
{
$photo = Photo::where('object_id', ... | true |
45958b04bf4021f7528d5afb2733c53a0d63945b | PHP | btinon/strack | /editServer.php | UTF-8 | 2,380 | 3.078125 | 3 | [] | no_license | <?php
$uname="root";
$pass="";
?>
<html>
<head>
<title>Edit Server</title>
<style>
</style>
</head>
<body>
<form action="edit.php" method="post">
Server ID: <input type="text" name="id">
<br />
<br />
<br />
<br />
<?php
$id = 11111;
try
{
$pdo = ne... | true |
41606727cda07675da1f7f16c4c55ac4f425d063 | PHP | bmangeard/Student_WebSite_Project | /se_connecter.inc.php | UTF-8 | 2,663 | 2.515625 | 3 | [] | no_license | <?php
//Vider par defaut les SESSIONs
session_start();
session_destroy();
if(!empty($_POST)){
//Déclaration variables des données du formulaire
extract($_POST);
$userEmail=$inputEmail;
$userMdp=$inputMdp;
$userPrenom;
$valide=false;
$errorMessage=... | true |
d8c419b28ed86d8350a2f46306ae18fc2d784de5 | PHP | Xplosive06/blog_p4 | /controller/Home.php | UTF-8 | 1,452 | 2.671875 | 3 | [] | no_license | <?php
class Home
{
public function showHome() {
$comment_manager = new CommentManager();
$post_manager = new PostManager();
$posts = $post_manager->getList();
$myView = new View('home');
$myView->render(array(
'posts' => $posts,
'post_manager' => $post_manager,
'comment_manager' ... | true |
54d28c4a40c595be8b9f8a0a845327cf74d48d92 | PHP | katet19/lifebar | /php/controller_weave.php | UTF-8 | 8,636 | 2.8125 | 3 | [] | no_license | <?php
require_once "includes.php";
//ManuallyRunCalcWeave(500);
function ManuallyRunCalcWeave($start){
$mysqli = Connect();
if ($result = $mysqli->query("select * from `Users` order by `ID` LIMIT ".$start.", 50")) {
while($row = mysqli_fetch_array($result)){
CalculateWeave($row["ID"]);
}
}
Close($mysqli, $re... | true |
be06f0524a32c56cc60e38a73861dc4bc43df0a3 | PHP | VeronicaAxelsson/mvc-projekt | /tests/Unit/TreasureAdventureTest.php | UTF-8 | 1,124 | 3.171875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Classes\Adventure;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
/**
* Test cases for class Dice
*/
class TreasureAdventureTest extends TestCase
{
private $adventure;
/**
* Construct object to be used in tests.
*/
protected function setUp(... | true |
1f944d40e0264d1f40361b64ba3a538cd1407b71 | PHP | pjedrzejewski/KnpBundles | /src/Knp/Bundle/KnpBundlesBundle/Github/Developer.php | UTF-8 | 2,013 | 2.640625 | 3 | [] | no_license | <?php
namespace Knp\Bundle\KnpBundlesBundle\Github;
use Github\HttpClient\ApiLimitExceedException;
use Knp\Bundle\KnpBundlesBundle\Entity\Developer as EntityDeveloper;
class Developer extends Owner
{
/**
* {@inheritDoc}
*/
public function import($name, $update = true)
{
$developer = ne... | true |
c038f3bc524d268af8e46610ec036b0d3b9b022b | PHP | pbrilius/itoma-slim | /src/Application/Entity/Segment.php | UTF-8 | 1,931 | 3.09375 | 3 | [] | no_license | <?php
namespace App\Application\Entity;
/**
* Segment
*/
class Segment
{
/**
* @var int
*/
private $id;
/**
* @var \DateTime|null
*/
private $createTime;
/**
* @var \DateTime|null
*/
private $updateTime;
/**
* @var string|null
*/
private $n... | true |
62362232f006ef67bfda959c9ab3b810576c9a10 | PHP | Serria117/php | /PHP_OOP/abstractClass.php | UTF-8 | 1,194 | 4.15625 | 4 | [] | no_license | <h3>Tính trừu tượng và Abstract Class</h3>
<?php
abstract class person{
protected $firstName;
protected $lastName;
public function setFirstName($name){
$this->firstName = $name;
}
public function setLastName($name){
$this->lastName = $name;
}
... | true |
a3267438890cbe8681af3c0454d1f65eca95113b | PHP | Indatus/assembler | /src/Tasks/FabricateTask.php | UTF-8 | 795 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Indatus\Assembler\Tasks;
use Robo\Tasks;
use Robo\Contract\TaskInterface;
use Robo\Task\Docker\loadTasks as Docker;
class FabricateTask extends Tasks implements TaskInterface
{
use Docker;
/** @var string */
protected $pathToDockerfile;
/** @var string */
protected $tag;
/**... | true |
92087898b68d2266202585889f2991aeed60789c | PHP | anees-patwa/Calendar | /registerUser.php | UTF-8 | 1,536 | 3.03125 | 3 | [] | no_license | <?php
header("Content-Type: application/json; charset=utf-8"); // Since we are sending a JSON response here (not an HTMLdocument), set the MIME Type to application/json
//Because you are posting the data via fetch(), php has to retrieve it elsewhere.
$json_str = file_get_contents('php://input');
//This will store the... | true |
9131e48947b62e25101ed51bae4171c21c3b360b | PHP | dkulyk/ext-fiber | /stubs/ReflectionFiber.php | UTF-8 | 1,776 | 2.78125 | 3 | [] | no_license | <?php
final class ReflectionFiber
{
/**
* @param Fiber $fiber Any Fiber object, including those are not started or have
* terminated.
*
* @return ReflectionFiber
*/
public static function fromFiber(Fiber $fiber): self { }
/**
* @param FiberScheduler $sched... | true |
6bf4c0799e73a1efb49fe1496f67f9566ae05145 | PHP | SharedProjectsCollaboration/Startup | /modules/user.php | UTF-8 | 3,541 | 2.546875 | 3 | [] | no_license | <?php
defined('USER_IDENTITY') or define('USER_IDENTITY', '_su_identity');
defined('USER_PASSWORD') or define('USER_PASSWORD', '_su_password');
defined('SU_USER_REGISTER_IDENTITY') or define('SU_USER_REGISTER_IDENTITY', 1);
defined('SU_USER_REGISTER_PASSWORD') or define('SU_USER_REGISTER_PASSWORD', 2);
defined('SU_US... | true |
caa0ef389482a7cf07b170b92cf3b43de383e63b | PHP | twigphp/Twig | /src/RuntimeLoader/FactoryRuntimeLoader.php | UTF-8 | 814 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\RuntimeLoader;
/**
* Lazy loads the runtime implementations for a Twig element.
*
* @author Robin C... | true |
db9e04afc6975c4477172fbaa1cb8fee44c49109 | PHP | mohamedadel2018/3ndisuaal | /database/factories/BookFactory.php | UTF-8 | 2,320 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use App\Models\Book;
use Illuminate\Database\Eloquent\Factories\Factory;
class BookFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Book::class;
/**
* Define the model's defau... | true |
801a89f02d948537ca17e617cfedc4e441f8e236 | PHP | xdissent/dforms | /src/DForms/Widgets/CheckboxInput.php | UTF-8 | 4,259 | 3.015625 | 3 | [] | no_license | <?php
/**
* Checkbox input widget
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the Creative
* Commons Attribution-Share Alike United States license that is available
* through the world-wide-web at the following URI:
* http://creativecommons.org/licenses/by-nc-nd/3.0/us/. If y... | true |
8b95c220b710dd6335c700894fe3ab44f9e61df5 | PHP | webmappsrl/wm-server | /src/classes/utils/WebmappPostGis.php | UTF-8 | 10,337 | 2.75 | 3 | [] | no_license | <?php
final class WebmappPostGis
{
private $resource;
private $all_tables = array('poi', 'track', 'feature_taxonomy', 'related_track');
public static function Instance()
{
static $inst = null;
if ($inst === null) {
$inst = new WebmappPostGis();
}
return $in... | true |
5f9f8d98dfee6fa7a37d60914fb835ccb28ce7af | PHP | horidaisuke/cakephp-aws-s3bucket | /src/Datasource/Connection.php | UTF-8 | 8,708 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace S3Bucket\Datasource;
use Aws\Result;
use Aws\S3\S3Client;
use Cake\Datasource\ConnectionInterface;
use Cake\Utility\Hash;
use Psr\Log\LoggerInterface;
use Psr\SimpleCache\CacheInterface;
/**
* Class Connection
*
* @package S3Bucket\Datasource
* @method object getDriver()
... | true |
e2e9efe8a7a0a409c76f6f21eea742bdfaf6719c | PHP | adrmrn/hackyeah-foodsharing-spots | /core/Spot/Application/DataSource/SpotDataSource.php | UTF-8 | 292 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Core\Spot\Application\DataSource;
use Core\Spot\Application\ReadModel\SpotReadModel;
interface SpotDataSource
{
/**
* @return SpotReadModel[]
*/
public function getAll(): array;
public function exists(string $spotId): bool;
} | true |
c78a0170c1dc585b6459647b85f1b31141b8fdba | PHP | quadrowin/icengine | /Class/Bootstrap/Manager.php | UTF-8 | 1,465 | 2.96875 | 3 | [] | no_license | <?php
/**
* Менеджер загрузчиков
*
* @author goorus, morph
*/
class Bootstrap_Manager
{
/**
* Загрузчики
*
* @var array <Bootstrap_Abstract>
*/
protected $bootstraps;
/**
* Текущий загрузчик
*
* @var Bootstrab_Abstract
*/
protected $current;
... | true |
392fab270107bb1603e0fec264143b8bcc141a8e | PHP | speich/fotodb | /website/scripts/php/class/Iterator/FilterSync.php | UTF-8 | 1,703 | 2.984375 | 3 | [] | no_license | <?php
namespace PhotoDatabase\Iterator;
use DateTime;
use RecursiveFilterIterator;
/**
* Class FilterSyncXmp
* Filter out file
* @package PhotoDatabase
*/
class FilterSync extends RecursiveFilterIterator
{
public const XMP = 1;
public const EXIF = 2;
public function __construct(PhotoDbDirectoryIte... | true |
8dbf96a8715b9a2e6f9156835a1a1c947dcb48ac | PHP | neverwoods/punchcms | /includes/class.elementmeta.php | UTF-8 | 1,277 | 2.75 | 3 | [] | no_license | <?php
/**
*
* Handles ElementMeta properties and methods.
* @author felix
* @version 0.1.0
*
*/
class ElementMeta extends DBA_ElementMeta {
private $languageId = 0;
public static function selectByElement($intElementId, $intLanguageId = NULL) {
if (is_null($intLanguageId)) $intLanguageId = Cont... | true |
d4058685f068a743142abc9152f237eb0e4c01f5 | PHP | wahyu-pro/phptask3 | /001.php | UTF-8 | 476 | 3.28125 | 3 | [] | no_license | <?php
class Hash {
protected $str;
function __construct($str)
{
$this->str = $str;
}
function md5()
{
echo md5($this->str);
}
function sha1(){
echo sha1($this->str);
}
function sha256(){
echo hash("sha256", $this->str);
}
function sha512()... | true |
013bd3bf0515fc17a93105c6766843daf605d35f | PHP | dora-budic/php-oop-2 | /creditCard.php | UTF-8 | 680 | 3.078125 | 3 | [] | no_license | <?php
trait CreditCard {
private $card_number;
private $expiration_date;
private $cvc;
public function setCardNumber($card_number)
{
$this->card_number = $card_number;
}
public function getCardNumber()
{
return $this->card_number;
}
public funct... | true |
c7ce72eb3b84347842892bd25927bc261cd6378f | PHP | ybouhjira/tp-web-exam-ex4 | /lister.php | UTF-8 | 1,589 | 3.203125 | 3 | [] | no_license | <?php
require 'functions.php';
$xml = open_xml('etudiants.xml');
$studants = $xml->getElementsByTagName('etudiant');
$notesClass = [];
?>
<!doctype html>
<html>
<head>
<title>Liste des etudiants</title>
<meta charset="utf-8">
<style type="text/css">
table {
border-collapse: collapse;
box-shad... | true |
89edf63906d7ae03733e2e36fb8b65b565cac9e3 | PHP | 62BRAINS/ucm | /includes/plugin_security/htmlpurifier/standalone/HTMLPurifier/Printer/HTMLDefinition.php | UTF-8 | 8,599 | 2.78125 | 3 | [] | no_license | <?php
class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer {
/**
* Instance of HTMLPurifier_HTMLDefinition, for easy access
*/
protected $def;
public function render( $config ) {
$ret = '';
$this->config =& $config;
$this->def = $config->getHTMLDefinition();
$ret .= $this-... | true |
0cf9336995b4e084487e3920b418b1707a3def49 | PHP | pinoelefante/PostApp | /functions.php | UTF-8 | 8,167 | 2.625 | 3 | [] | no_license | <?php
require_once("config.php");
require_once("enums.php");
require_once("logger.php");
$requestId = LogRequest();
checkUserAgent();
function isLogged($required = false)
{
$sessionVer = sessionVerification();
if($required && !$sessionVer)
{
sendResponse... | true |
399031433a51c8d95f1447a9954edac37a54a74e | PHP | tofl/PHP-Functions | /truncateString.php | UTF-8 | 408 | 3.0625 | 3 | [] | no_license | <?php
function truncateString($string, $n) {
$n = (int)$n;
if (!is_string($string) OR !isset($string) OR $n <= 0 OR !isset($n)) return false;
if ($n >= strlen($string)) return $string;
trim($string);
$string = ' ' . $string . ' ';
if ($string{$n} != ' ') {
while ($string{$n} != ' ')... | true |
d28252eed9619c77f1d89f7bfe535af7c9d9e049 | PHP | uneak/AssetsBundle | /AssetType/AssetTypeGuesserChain.php | UTF-8 | 1,736 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Uneak\AssetsBundle\AssetType;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Uneak\AssetsBundle\AssetItem\Asset\Asset;
use Uneak\AssetsBundle\AssetType\Guess\Guess;
class AssetTypeGuesserChain implements AssetTypeGuesserInterface {
private $guessers = array();
/**
* Co... | true |
d841e797aee7d97cfa3e00bcfe74e7b62a75dfea | PHP | Spitschka/DS2020 | /htdocs/framework/lib/data/schueler.class.php | UTF-8 | 8,441 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
class schueler {
private static $all = array();
private static $cachedAllElternUsers = [];
private $data;
private $adressen = array();
private $telefonnummern = array();
private $emailadressen = [];
public function __construct($data) {
$this->data = $data;
}
public function ge... | true |
ee990c496260f3a29baacb44142503557a588951 | PHP | wuwwl990507/student_dbs | /login-save-ajax.php | UTF-8 | 1,629 | 2.734375 | 3 | [] | no_license | <?php
session_start();
include("conn.php");
// 邮箱
$email = empty($_REQUEST['email']) ? "null":strtolower($_REQUEST['email']);
// 密码
$password = empty($_REQUEST['password']) ? "null":$_REQUEST['password'];
$responseArr = array(
"code" => 200,
"msg" => "登录成功"
);
// 首先根据用户提交的邮件查询,如果至少一条记录,则邮件正确,否则邮件不正确
$sq... | true |
7bd1576ac87cce498ed6b5ba88d9839029080ae4 | PHP | ToushiroHotoru/task | /app/controllers/Game.php | UTF-8 | 3,805 | 2.53125 | 3 | [] | no_license | <?php
Class Game extends Controller
{
function index($link = '')
{
if(empty($link))
{
$data['page_title'] = "not found";
$this->view("404.php", $data);
} else {
$games = $this->loadModel('games');
... | true |
67ed444083c028e623fc3186285d3a964fb5935a | PHP | rmccue/github-api3-php | /tests/GitHub/Tests/API/User/UserTest.php | UTF-8 | 11,891 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace GitHub\Tests\API\User;
use GitHub\API\Api;
use GitHub\API\User\User;
use GitHub\Tests\API\ApiTest;
use GitHub\API\Authentication;
class UserTest extends ApiTest
{
public function testGetWithUsername()
{
$transportMock = $this->getTransportMock();
$expectedResults = $this->get... | true |
0d808b127be0f3edb114cf9f042939ecd1d006eb | PHP | Yuri2530/PHP_STATIC_GETINSTANCE | /getinstance.php | UTF-8 | 518 | 3.328125 | 3 | [] | no_license | <?php
class Humano{
public static $humano;
public $saludar;
public function __construct($arg){
$this->saludar = $arg;
}
public static function getInstance($arg=null){
if(!(self::$humano instanceof self)){
self::$humano = new Humano($arg);
}
return self::$humano;... | true |
c1d3797647f648eb33efc5df7d84395dd9d3782c | PHP | shibadog0410/php-shop-practice | /php/programmer.php | UTF-8 | 136 | 2.75 | 3 | [] | no_license | <?php
require_once('employee.php');
class Programmer extends Employee
{
public function work()
{
echo 'sample';
}
}
| true |
1ef56fced935a663fa3033130c547984544a461c | PHP | eugeny-70/argilla | /protected/commands/ModuleCleanerCommand.php | UTF-8 | 5,086 | 2.546875 | 3 | [] | no_license | <?php
/**
* @author Nikita Melnikov <melnikov@shogo.ru>
* @link https://github.com/shogodev/argilla/
* @copyright Copyright © 2003-2014 Shogo
* @license http://argilla.ru/LICENSE
* @package frontend.commands
*/
Yii::import('backend.components.*');
Yii::import('backend.components.db.*');
Yii::impo... | true |
339159889da723a42b93ad1a1dd479b4881df13f | PHP | destyk/lztcombine-php | /src/Builder/core/Security.php | UTF-8 | 3,305 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* LztCombine - библиотека для программного использования ВСЕГО функционала форума lolzteam
*
* @package destyk/lztcombine-php
* @author Nikita <nikita.karpov.1910@mail.ru>
* @copyright 2022 (c) DestyK
* @license MIT https://raw.githubusercontent.com/destyk/lztcombine-php/master/LICENSE
*/
name... | true |
6c457c78fa2396e7e61551411e936ee4c38a0947 | PHP | bng5/CMS | /cms/clases/Usuarios.php | UTF-8 | 427 | 2.65625 | 3 | [] | no_license | <?php
/**
*
*
* @author pablo
*/
class Usuarios {
public static function obtenerPorUsuario($nombreusuario) {
$db = DB::instancia();
$statement = $db->prepare('SELECT `id`, `usuario`, `estado_id`, leng_id, nombre_mostrar, clave FROM `usuarios` WHERE `usuario` = ? LIMIT 1');
$statement->execute(array($nombr... | true |
c9a5e485d5c79330ce05ad7187ea0aa9db7e54f2 | PHP | xolisamatika/simple-app | /backend/classes/TeamRepository.php | UTF-8 | 1,502 | 3.203125 | 3 | [] | no_license | <?php
require "Database.php";
require 'Team.php';
require 'User.php';
class TeamRepository {
private static $teams = array ();
private static $users = array ();
private static $user = null;
protected static function init() {
$teams = Team::getAllTeams ();
$users = User::getAllUsers ();
self::$teams = $tea... | true |
2399f4a9f7dbce48623c467fee405ee72128415e | PHP | MrSamehOmr/shoolmanager | /index.php | UTF-8 | 1,818 | 2.671875 | 3 | [] | no_license | <?php
session_start();
include "general/includes/sql/connector.php";
if(isset($_SESSION['userId'])){
header("location: home/");;
}
if($_SERVER["REQUEST_METHOD"] == "POST"){
$userName = $_POST['userName'];
$password = $_POST['password'];
$hdpassword = s... | true |
6423d66d63d474cf79234205e726d0c47339ea84 | PHP | PandaPoPy/Galerie | /index.php | UTF-8 | 1,466 | 2.84375 | 3 | [] | no_license | <?php
require_once('init.php');
$nom_page = 'accueil';
require_once('header.php');
?>
<div class="gallery">
<?php
// extraction de la page actuelle
// approche par array_chunk()
/*$liste_pages = array_chunk($images, $config['images_par_page']);
$images = $liste_pages[$page];*/
//calcul du nombre d'images:
$nb_... | true |
f4ae4ac2d8d1ac56bd0cfd16e9f7a97134db05ff | PHP | smasty/CLImate.php | /src/CLImate/Notifiers/Progress/Bar.php | UTF-8 | 2,353 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright 2012 Martin Srank (http://smasty.net)
*/
namespace CLImate\Notifiers\Progress;
use CLImate,
CLImate\IO;
/**
* Basic ASCII progress bar.
*/
class Bar extends CLImate\Notifiers\Progress {
/** @var string */
protected $formatBefore = '{:msg} {:percent}% [';
/** @var string */
protecte... | true |
e41657abb7e9511a3ac3e44e59ea18fbf92444d3 | PHP | romanovitch-nicolas/projet5 | /models/ProductManager.php | UTF-8 | 6,810 | 3.015625 | 3 | [] | no_license | <?php
namespace Nicolas\FermeHaffner\Models;
require_once("Manager.php");
class ProductManager extends Manager
{
// Connexion à la base de données lors de l'instanciation
public function __construct()
{
$this->db = $this->dbConnect();
}
// Récupération des catégories de pro... | true |
2083bd6c2aed23310fa09360abe92561fabf9d72 | PHP | jaenmedina/php-travis-ci-client | /src/handlers/TravisHandler.php | UTF-8 | 1,491 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace jaenmedina\PhpTravisCiClient\Handler;
use jaenmedina\PhpRestClient\Methods\Get;
use jaenmedina\PhpRestClient\Methods\Post;
class TravisHandler
{
/**
* @var string
*/
protected $travisAccessToken;
/**
* @param $travisAccessToken
*/
public function __construct($trav... | true |
ce1f977dc35f63f462de8bd76ecdd42bac9125f7 | PHP | AloPeyk/AloPeyk-Api-Laravel | /src/ApiHandler.php | UTF-8 | 10,128 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace AloPeyk\Api\RESTful;
use AloPeyk\Api\RESTful\Config\Configs;
use AloPeyk\Api\RESTful\Exception\AloPeykApiException;
use AloPeyk\Api\RESTful\Exception\InvalidLatLongException;
use AloPeyk\Api\RESTful\Exception\InvalidLocationNameException;
use AloPeyk\Api\RESTful\Exception\InvalidOrderException;
use Al... | true |
b68ea3cbf6e705ca1bf9e13eebc84327727e9173 | PHP | softon/indipay | /src/Gateways/MockerGateway.php | UTF-8 | 3,784 | 2.625 | 3 | [
"MIT"
] | permissive | <?php namespace Softon\Indipay\Gateways;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\View;
use Softon\Indipay\Exceptions\IndipayParametersMissingException;
class MockerGateway implements PaymentGatewayInterface {
... | true |
8b6efefd80a5d3a25f5a49440b3b1c648760fc28 | PHP | Multifrenos/catalogoproductos | /modulos/mod_importar/funcP2ListaPrecios.php | UTF-8 | 7,474 | 2.859375 | 3 | [] | no_license | <?php
/*
* @version 0.1
* @copyright Copyright (C) 2017 Catalogo productos Soluciones Vigo.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Ricardo Carpintero
* @Descripcion Funciones en php para Paso2ListaPrecios.
* */
/* Funtion verNuevosRef --> Ejecuta v... | true |
e4c2f276745a6bb4cfd3f96bafddf1f394cfec29 | PHP | Yaijix/learn_exploitation_data_web_app | /model.php | UTF-8 | 659 | 2.796875 | 3 | [] | no_license | <?php
$server = "localhost";
$user = "root";
$password = "";
$dbname = "cours_sql";
$entreprise = ['entreprise'];
$conn = new PDO("mysql:host=$server;dbname=$dbname",$user, $password);
function getArmesByEntreprise($entreprise){
global $conn;
$armes = $conn->prepare("
SELECT arme.nom
FROM arme
... | true |
0430fd48dc4c39eed34773cdd0aa6950f7d3b2f6 | PHP | RyanNerd/rxchart-app | /app/Controllers/File/FileDownloadAction.php | UTF-8 | 2,016 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Willow\Controllers\File;
use JsonException;
use Psr\Http\Message\ResponseInterface;
use Slim\Psr7\Factory\StreamFactory;
use Slim\Psr7\Request;
use Slim\Psr7\Response;
use Willow\Middleware\ResponseBody;
use Willow\Middleware\ResponseCodes;
use Willow\Models\File;
use Willow\M... | true |
10a56ffcc810a7d4357eb984d1c2bc3f104b51ed | PHP | CubitOpenSource/Estoque | /CubitOpenSource/Estoque/mvc/models/database/DB_Admin.php | UTF-8 | 919 | 2.890625 | 3 | [] | no_license | <?php
namespace CubitOpenSource\Database;
/**
* Class: DB_Admin
*
* Holds all database table objects used in this project.
*
* @package CubitOpenSource
* @subpackage Database
* @author CubitOpenSource <cubit.open.src@gmail.com>
*
* Created: Jun 1, 2019.
* Last Modified: Jun 13, 2019.
*/
class DB_Admin
... | true |
7a414f45dceed0be59cb17a0c2a596be57dfc748 | PHP | dongrunbin/OETableGames | /server/php/OETableGames/Common/Model.php | UTF-8 | 600 | 2.59375 | 3 | [] | no_license | <?php
namespace Common;
use Core\Util;
class Model
{
/**
*
* Passport
*
* @param int $id
*
* @return \Entity\Passport|\Model\Passport
*
*/
public static function Passport($id = 0)
{
return Util::loadModel('Model\Passport', 'Passport', $id);
}
/**
*
* Player
*
* @param int $id
*
... | true |
6fdf88e9216988f33b285195ef8a8b5e1f069114 | PHP | subrotoice/php | /crud-php/classes/student.php | UTF-8 | 4,037 | 3.140625 | 3 | [] | no_license | <?php
class Student
{
private $name;
private $email;
private $age;
private $address;
public function allStudetnArray()
{
include("config/database.php");
try {
$sql = "SELECT * FROM students ORDER BY id DESC";
$result = $pdoCon->prepare($sql);
$result->execute();
... | true |
0c10188a594a26771fe46d324254ca5d95124149 | PHP | obla4ko339/phalcon | /app/controllers/UsersController.php | UTF-8 | 1,413 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: grabvn
* Date: 29.12.2016
* Time: 10:55
*/
class UsersController extends BaseController
{
public function indexAction(){
$this->view->users = Users::find();
}
public function newAction(){
echo "<p>Новый пользователь</p>";
if($this->req... | true |
26164a4ff1cb16f707652aa2dc90c33ecdbbffcb | PHP | SandyPush/cms | /cms/modules/search/models/Keyword.php | UTF-8 | 2,354 | 2.546875 | 3 | [] | no_license | <?php
class Keyword extends Zend_Db_Table
{
protected $_name='ss_keyword';
private $db;
public function __construct($db)
{
$this->db= $db;
parent::__construct();
}
public function getOne($where)
{
$result=$this->db->fetchRow("select a.*,(select group_concat(a_word) from ss_associate whe... | true |
e055dbe377933aca7608ed0d5e8b25dacd0d31c5 | PHP | jphacks/TK_1623 | /OneNightWerewolf Bot/web/callback.php | UTF-8 | 38,837 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
// データベース
// ・game_room
// id game_room_num(Int) game_room_id(String) game_mode(String) num_of_people(Int) num_of_roles(Int) num_of_votes(Int)
// ・user
// id user_id(String) user_name(String) game_room_num(Int) role(String) voted_num(Int) is_roling(Bool) is_voting(Bool)
require('../vendor/autoload.php');
req... | true |
2a8967da5f703a78d2f5ea951968a38db0badc6c | PHP | maxrexfax/shop_laravel | /app/Product.php | UTF-8 | 1,574 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Helpers\PriceHelper;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
/**
* @var string[]
*/
protected $fillable = [
'product_name', 'rating', 'price', 'logo_image', 'description', 'title', 'short_description', 'full_description'
];
... | true |
664ee90cf14ab28679d73e53955deeceefd7f188 | PHP | diegofelix/battleroad | /app/Http/Controllers/AuthController.php | UTF-8 | 2,296 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Battleroad\Http\Controllers;
use Champ\Account\Events\UserSignedUp;
use Champ\Social\SocialAuthenticatorListenerInterface;
use Champ\Account\Repositories\UserRepository;
use Champ\Social\SocialFactory;
class AuthController extends BaseController implements SocialAuthenticatorListenerInterface
{
/... | true |
61709ea14fbf91ee9016bd5f195f21850e063ba6 | PHP | DaveN39/Codeup-Exercises | /logger.php | UTF-8 | 632 | 3.140625 | 3 | [] | no_license | <?php
function logMessage($logLevel, $message)
{
// todo - complete this function
$date = date("Y-m-d");
$filename = "log-$date.log";
$today = date("Y-m-d H:i:s");
$handle = fopen($filename, 'a');
fwrite($handle, $today . ' ' . $logLevel . ' ' . $message . PHP_EOL);
fclose($handle);
}
func... | true |
ddfd0984f09c1f6c2bf942d6c2d13145470e0487 | PHP | Prothread/SeriTV | /server/app/Http/Controllers/MovieController.php | UTF-8 | 3,148 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use \App\Movie;
class MovieController extends Controller
{
//Check logged in
public function __construct()
{
//$this->middleware('auth');
}
public function getMovie($id)
{
... | true |
6c5c144ef03e20de8e2c7c4fa8a3e60650c0f4bf | PHP | danielfree19/phpproject | /php_code/cart/cart.php | UTF-8 | 2,870 | 2.515625 | 3 | [] | no_license | <?php
$totalprice =0;
if (isset($_SESSION['useruid'])) {
?>
<div class="dropdown" style="text-align:right;">
<button onclick="myFunction()" class="dropbtn">עגלה</button>
<div id="myDropdown" class="dropdown-content">
<?php
foreach ($_SESSION["cart"] as $key => $val) {
?>
<a href="#">
<?php
... | true |
2667c3f2cd44fa2a6607f9437fef7a9e1fe0d113 | PHP | j92/meal-planner | /api/src/Core/Service/RecipeServiceInterface.php | UTF-8 | 367 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Core\Service;
use App\Entity\Recipe;
interface RecipeServiceInterface
{
public function getRecipeById(int $recipeId): Recipe;
public function createRecipe(Recipe $recipe): Recipe;
public function removeRecipe(Recipe $recipe): void;
public function downl... | true |
3e8faab58cdf62217c2aa62d06a2f25b71ea4bbf | PHP | khajaamin/e4 | /common/models/LiveventsSearch.php | UTF-8 | 2,575 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\Livevents;
/**
* LiveventsSearch represents the model behind the search form about `common\models\Livevents`.
*/
class LiveventsSearch extends Livevents
{
/**
* @inheritdoc
*/
public fun... | true |
b70f64e6355a97b6aeb5c9036a2c138852fcf96d | PHP | mbouclas/mcms-core | /src/Services/File/FileConfiguratorContract.php | UTF-8 | 438 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mcms\Core\Services\File;
interface FileConfiguratorContract
{
/**
* Creates the destination path from the configuration $dirPattern
*
* @return mixed
*/
public function uploadPath();
/**
* Creates a filename from the configuration $filePattern if any
*
... | true |
9c44a43455a0d5a9ae7e4536924b49934339fd18 | PHP | link2arslan/travelport | /src/Rail/typeSpecificTime.php | UTF-8 | 577 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace FilippoToso\Travelport\Rail;
class typeSpecificTime
{
/**
* @var string $Time
*/
public $Time = null;
/**
* @param string $Time
*/
public function __construct($Time = null)
{
$this->Time = $Time;
}
/**
* @return string
*/
public fu... | true |
809a356f558d413106540741bed52e78ef3f530e | PHP | Kradores/BroadcastManagement | /app/Http/Controllers/TestsController.php | UTF-8 | 1,771 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\OutgoingSms;
use Illuminate\Support\Facades\Artisan;
class TestsController extends Controller
{
public function index() {
return view("pages.test");
}
public function send(Request $request) {
$this->validate($req... | true |
ab9382288be60e2be6ecb0804345ed8d14f9cb6b | PHP | genleeshin/sayem | /app/Controllers/ThreadsController.php | UTF-8 | 4,409 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Thread;
use App\Database;
use App\Topic;
class ThreadsController extends Controller{
public function index()
{
// if url has id then show thread posts, else threads list
$id = get_int('id', false);
if($id)
return $this->posts($id);
return $this->threads();... | true |
3ab2d6385d574dd3d4544791b3cf396f31cb5ccf | PHP | AoifeNiD/phpNightmareChanged | /user1.inc.php | UTF-8 | 2,695 | 2.859375 | 3 | [] | no_license | <?php
$link = mysqli_connect("127.0.0.1", "root", "", "user_system");
function generate($password) {
$password = hash('sha1', $password);
return $password;
}
function login($link, $email, $password) {
$password = generate($password);
$query = mysqli_query($connection, "SELECT `user_name`, `user_passw... | true |
1cb3e615eaed6efe88dab9139b1a088a35faa933 | PHP | jorgenhorstink/phpDeployR | /classes/deployR/impl/DeployRHttpScriptRepository.php | UTF-8 | 1,345 | 2.609375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
require_once DEPLOYR_DIRECTORY . '/responseParser/DeployRScriptRepositoryResponseParser.php';
class DeployRHttpScriptRepository {
protected $client;
protected $serverUrl;
protected $cookieId;
protected $outputFormat;
public function __construct(DeployRHttpClient $client, $serverUrl... | true |
d2da968f9162e614b13cd9ebbeda35bfa38b8720 | PHP | lourdesg/mirepositorio | /enviomail.php | UTF-8 | 1,113 | 2.9375 | 3 | [] | no_license | <?php
// Especificamos el destinatario (nuestro email) y el asunto.
$email_para = "miemail@midominio.com";
$email_de = "Mi Pagina Web";
$email_asunto = "Formulario de contacto desde mi sitio web";
// Pasamos a validar los datos enviados por el usuario
if(!isset($_POST['nombre']) ||
!isset($_POST['email']) ||
!isset($... | true |
485f1140984a918b37b91214c0be4c15b8fa34c8 | PHP | RonaCeros14/PurpleSwirl | /admin/login.php | UTF-8 | 2,782 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include("connectionString.php");
if (isset($_POST['btnLogin']))
{
$varcharUsername = mysqli_real_escape_string($connect, $_POST['txtbxUsername']);
$varcharPassword = mysqli_real_escape_string($connect, $_POST['txtbxPassword']);
$queryAccount = "SELECT * FROM tbl_adminaccount WHERE username... | true |
f3e5c208bd315f82f00bb2be48e89ce9d9a33a09 | PHP | agentile/foresmo | /source/solar/tests/Solar/Log/Adapter/MultiTest.php | UTF-8 | 2,700 | 2.6875 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/../AdapterTestCase.php';
class Solar_Log_Adapter_MultiTest extends Solar_Log_AdapterTestCase {
// built in setup()
protected $_config = array();
public function setup()
{
// easier to do this here than as a property, since we use functions.
... | true |
73b0dd8ed8acfb9e4d3996b4a02ecb0eee8b1658 | PHP | xefiji/seasons | /Serializer/DomainSerializer.php | UTF-8 | 3,856 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Xefiji\Seasons\Serializer;
use Xefiji\Seasons\DomainLogger;
use Xefiji\Seasons\Exception\DomainLogicException;
use Xefiji\Seasons\Exception\MissingClassInEvent;
use JMS\Serializer\Serializer;
/**
* Class DomainSerializer
* @package Xefiji\Seasons\Serializer
*/
class DomainSerializer
{
/**@var ... | true |
1f584fc0bc7d368ff08f7e196be7eb5e143c8204 | PHP | SmithWebster/wsm-test-project | /src/Cart/Entity/Order/Discount.php | UTF-8 | 1,074 | 3.15625 | 3 | [] | no_license | <?php
namespace Cart\Entity\Order;
/**
* Discount model
*
* @author wsm_team
*/
class Discount
{
/**
* Coupon code
*
* @var string
*/
public $code;
/**
* Discount amount
*
* @var float
*/
public $amount;
/**
* Rule Name
*
* @var string
... | true |
7c636bc9d26d3989a62ca3dc5365c0a006eeee50 | PHP | honey-comb/starter | /src/Tests/Traits/BuildsMocks.php | UTF-8 | 3,614 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace HoneyComb\Starter\Tests\Traits;
use Mockery;
use Mockery\MockInterface;
use PHPUnit\Framework\MockObject\MockBuilder;
use PHPUnit_Framework_MockObject_MockObject;
/**
* Trait BuildsMocks
* @package HoneyComb\Starter\Tests\Traits
*/
trait BuildsMocks
{
/**
* @p... | true |
bc15b59db523a60c7fedb91e83feade05343abb6 | PHP | phpcz/thinkadminv5 | /application/common/service/SmsService.php | UTF-8 | 8,004 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/11/18
* Time: 18:00
*/
namespace app\common\service;
use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ServerException;
use AlibabaCloud\Client\Exception\ClientException;
use think\Db;
use think\Validate;
/**
* 短信服务
* Clas... | true |
083af68ce0fd00e0e3204e14238bf51f860b7382 | PHP | SaulSoteloSuastegui/1-MVC-PHP | /Curso-PHP-MySQL-master/35. Encuesta PDO/terminado/index.php | UTF-8 | 1,277 | 2.84375 | 3 | [] | no_license | <?php
include_once 'includes/survey.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="main.css">
<title>Encuesta</title>... | true |
abcbcae6798de702a937798e2b6856b0b66d4627 | PHP | mtlew/checkout-example | /src/coupon/discount/DiscountAbsolute.php | UTF-8 | 967 | 2.875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace app\modules\cart\src\coupon\discount;
class DiscountAbsolute implements IDiscount
{
protected $value;
protected $balance;
protected $multiple;
public function __construct(int $value, bool $multiple)
{
$this->value = $value;
$this->bal... | true |