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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
270e5b9d39932aa34e9addabdca7a5206fc9eeee | PHP | Gursehaj/Positio-Backend | /index.php | UTF-8 | 979 | 2.640625 | 3 | [] | no_license | <?php
$host="localhost";
$username="<username>";
$password="<password>";
$database="********";
$conn = mysqli_connect($host, $username, $password, $database);
if(isset($_GET["request"]))
{
if($_GET["request"]=="get")
{
$sql="SELECT * FROM positio";
$result=mysqli_query($conn, $sql) or die(mysqli_error($conn));
... | true |
f99dabf489a2249ee636054c01b08caeab106a12 | PHP | shoaib-125/ebanking-system | /script/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/RoomOptions.php | UTF-8 | 3,550 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\Rest\Insights\V1;
use Twilio\Options;
use Twilio\Values;
/**
* PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
*... | true |
ddb55b35b18102a85ae8f1b1772edb9381fba91e | PHP | Jsonize/jsonize-php-client | /src/AbstractJsonize.php | UTF-8 | 3,661 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Jsonize;
abstract class AbstractJsonize {
public abstract function destroy();
private $once = FALSE;
public function __construct($options = array()) {
if (isset($options["once"]))
$this->once = $options["once"];
}
// Reads a single JSON or returns NULL
protected abstract function re... | true |
524e4e9646bd3252833ded4788fac5b977cf9577 | PHP | Dmansuy/ipssi-oop-php-2017 | /ipssi-oop-php-2017/src/Conferences/Controller/OrganisersController.php | UTF-8 | 602 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Conferences\Controller;
use Conferences\Repository\OrganisersRepository;
final class OrganisersController
{
private $organisersController;
public function __construct(OrganisersController $organisersController)
{
$this->organisersController... | true |
e6d974bb8696017378a6c6758f81e9dbea76275f | PHP | jihene7/Projet-Web | /nalika/entities/annonce.php | UTF-8 | 1,529 | 2.75 | 3 | [] | no_license | <?PHP
class annonce{
private $id_annonce;
private $id_offre;
private $id_produit;
private $description;
private $date_annonce;
private $date_limite;
private $id_client;
function __construct($id_annonce,$id_offre,$id_produit,$description,$date_annonce,$date_limite,$id_client){
$this->id_annonce=$id... | true |
4b89a69629da0ff0c9bf96ab8610925dfa445ab8 | PHP | nihao1995/sd | /phpcms/modules/zyshop/classes/easySql.php | UTF-8 | 1,210 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 徐强
* Date: 2019/6/5
* Time: 14:09
*/
namespace zyshop\classes;
use zyshop\classes\modelFactory as excelModelFactory;
class easySql //处理简单的增删改查
{
function __construct($modelName)
{
$this->easySql = excelModelFactory::Create()->getModel($modelName);
}
... | true |
876511d9c99691c59046578d80cb4816164f4e42 | PHP | ej222pj/1DV408_Projekt | /BildBlogg/view/EditProfileView.php | UTF-8 | 2,609 | 2.71875 | 3 | [] | no_license | <?php
namespace view;
class EditProfileView{
private $message;
private $save = "save";
private $oldpassword = "oldpassword";
private $newpassword = "newpassword";
private $repnewpassword = "repnewpassword";
public function didUserPressSave(){
if(isset($_POST[$this->save])){
return true;
}
}
//Tar ... | true |
c7909dc89339a9fffa236e60be157ccd9173878e | PHP | chenjiebin/phpexample | /finance/rate.php | UTF-8 | 197 | 2.828125 | 3 | [] | no_license | <?php
// 实际年化利率=F*N*24/(N+1)
// 这里面只有两个变量需要小伙伴填写:F:分期费率;N:借款期数
$rate = (450 / 100000) * 60 * 24 / (60 + 1);
echo $rate . PHP_EOL; | true |
28f66bbeccb4604e1deed47bde0337ba5182515b | PHP | sop/x509 | /test/unit/certificate/extension/access-description/AuthorityAccessDescriptionTest.php | UTF-8 | 2,668 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
use PHPUnit\Framework\TestCase;
use Sop\ASN1\Type\Constructed\Sequence;
use Sop\X509\Certificate\Extension\AccessDescription\AuthorityAccessDescription;
use Sop\X509\GeneralName\UniformResourceIdentifier;
/**
* @group certificate
* @group extension
* @group access-description
*
... | true |
3fee88c269b8875b37646541f4862236197d689a | PHP | edde-framework/edde | /src/Edde/Schema/ISchemaBuilder.php | UTF-8 | 1,063 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Edde\Schema;
interface ISchemaBuilder {
/**
* set alias to this schema; later in queries name or alias could be used
*
* @param string $alias
*
* @return ISchemaBuilder
*/
public function alias(string $alias): ISchemaBuilder;
/**
... | true |
aee58ee4bb3866218cc764bcc1abfbfe49f36ea5 | PHP | sedera3/challenge-sf | /src/Opticity/GestionBundle/Controller/CommandController.php | UTF-8 | 2,178 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: MADATALY
* Date: 29/03/2018
* Time: 20:49
*/
namespace Opticity\GestionBundle\Controller;
use FOS\RestBundle\Controller\Annotations\Get;
use FOS\RestBundle\Controller\Annotations\Put;
use FOS\RestBundle\Controller\Annotations\Delete;
use Opticity\GestionBundle\Entity\Com... | true |
afa45b2f3064a4ed4baa8088a78d143cb0180c02 | PHP | cwmiller/broadworks-connector | /src/Ocip/Models/GroupAdminCallingLineIdNumberAccess.php | UTF-8 | 468 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace CWM\BroadWorksConnector\Ocip\Models;
/**
* GroupAdminCallingLineIdNumberAccess
*
* Group Administrator's policy for accessing calling line id number.
*
* @method static GroupAdminCallingLineIdNumberAccess FULL()
* @method static GroupAdminCallingLineIdNumberAccess READ_ONLY()
* @EnumValueType s... | true |
af3d413fe89c700341ab2e20a8cb609d827e69c8 | PHP | p4lv/Excel-GoalSeek | /src/ExcelGoalSeek/ExcelGoalSeek.php | UTF-8 | 8,195 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace P4lv\ExcelGoalSeek;
use P4lv\ExcelGoalSeek\Exception\GoalNeverReached;
use P4lv\ExcelGoalSeek\Exception\GoalReachedNotEnough;
use Psr\Log\LoggerInterface;
class ExcelGoalSeek
{
/**
* @var LoggerInterface|null
*/
private $logger;
public function __construct(LoggerInterface $logg... | true |
d72213d75873dc62ade4584aac54da9dceddcebd | PHP | CallFire/callfire-api-samples | /2.0/php/calls/sendCalls.php | UTF-8 | 1,281 | 2.515625 | 3 | [] | no_license | <?php
class ApiClientSample {
public static function main() {
$client = \CallFire\Api\DocumentedClient::createClient("login", "password");
$request = $client->sendCalls();
$request->getOperationConfig()->setQueryParameters(array("campaignId" => 4050600003,
... | true |
95569f8f391b9af3f53829ef70eb1a5cda1db4b7 | PHP | VectorWen/lj | /LjHome/Lib/Action/LoginAction.class.php | UTF-8 | 1,058 | 2.5625 | 3 | [] | no_license | <?php
class LoginAction extends Action {
/**
* 登录
*/
public function login() {
//如果没有同时输入密码和账号,就是不登陆
if(!isset($_POST['username'])||!isset($_POST['password'])){
$this->display ();
exit();
}
$username = $_POST['username'];
$password = $_POST['password'];
$user=M('User');
$where['username']... | true |
a6d1805020c729b97562eb1f8abfcd0633781c54 | PHP | manudev91/eventtest | /app/Models/Event.php | UTF-8 | 909 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\User;
class Event extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
... | true |
873aaed829d954c802946e380fd38a4d37932f81 | PHP | SBU-BMI/PathDB | /quip/vendor/drupal/coder/coder_sniffer/DrupalPractice/Sniffs/FunctionCalls/InsecureUnserializeSniff.php | UTF-8 | 3,387 | 2.703125 | 3 | [
"GPL-2.0-only",
"BSD-3-Clause"
] | permissive | <?php
/**
* \DrupalPractice\Sniffs\FunctionCalls\InsecureUnserializeSniff
*
* @category PHP
* @package PHP_CodeSniffer
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
namespace DrupalPractice\Sniffs\FunctionCalls;
use PHP_CodeSniffer\Files\File;
use Drupal\Sniffs\Semantics\FunctionCall;
/**
* Chec... | true |
f900ea73b9dabeadb40e773d384dc081892e8434 | PHP | OmegaVersion/shadow | /test.php | UTF-8 | 578 | 2.53125 | 3 | [] | no_license | <?php
/**
*
*/
include "shadow.php";
$testClass = '';
if(!empty($argv)){
$testClass = $argv[1];
}elseif(!empty($_GET)){
$testClass = $_GET['test'];
}
if(empty($testClass)){
throw new SDException("Usage php test.php [test class name] OR test.php?test=[test class name]");
}
$test = new Test_Manage($testClass);
... | true |
a30448ab819194b4bb2c5fc394354a74280c53a8 | PHP | happycollision/CoronaPoint | /corona/printers/printer_action.php | UTF-8 | 1,636 | 2.609375 | 3 | [] | no_license | <?php
require_once('../initialize.php');
if(empty($_POST)) {
$session->message('Error PA005: Nothing was sent to the database. Apologies for needing to send you back to the list view. Please try again, though. If the problem persists, contact the application developer with the error number.','error');
redirec... | true |
906d9e6b6dfedd29a3570cbb20438acf95e50664 | PHP | kusabi/http | /tests/Exceptions/InvalidHttpStatusCodeExceptionTest.php | UTF-8 | 526 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kusabi\Http\Tests\Exceptions;
use Kusabi\Http\Exceptions\InvalidHttpStatusCodeException;
use Kusabi\Http\Tests\TestCase;
class InvalidHttpStatusCodeExceptionTest extends TestCase
{
/**
* @covers \Kusabi\Http\Exceptions\InvalidHttpStatusCodeException::__construct
*/
public function t... | true |
34b2780dc060333ee041344dfe44cc81b51f303e | PHP | inabahtrg/KalturaServerCore | /plugins/content_distribution/providers/verizon_vcast/lib/api/KalturaVerizonVcastDistributionProfile.php | UTF-8 | 1,316 | 2.6875 | 3 | [] | no_license | <?php
/**
* @package plugins.verizonVcastDistribution
* @subpackage api.objects
*/
class KalturaVerizonVcastDistributionProfile extends KalturaConfigurableDistributionProfile
{
/**
* @var string
*/
public $ftpHost;
/**
* @var string
*/
public $ftpLogin;
/**
* @var string
*/
... | true |
f99214af646534fdd2360dae93821f41a50fc93f | PHP | ProjetoESE/Thoth | /application/libraries/domain/Database.php | UTF-8 | 1,080 | 3.375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class to represent the Database;
*/
class Database
{
private $name;
private $link;
/**
* Database constructor.
*/
public function __construct()
{
}
/**
* Method to retrieve the database name.
* @return String name
*/
pu... | true |
7f4fb7da859b25ff26e307b1fa79d9dbb087dbcb | PHP | giordanolima/laravel-adminlte | /app/Models/Base/ImagensTrait.php | UTF-8 | 1,095 | 2.625 | 3 | [] | no_license | <?php
namespace App\Models\Base;
trait ImagensTrait {
private $thumbs = [];
public function getThumb($largura,$altura) {
if(!array_key_exists($largura.'X'.$altura, $this->thumbs))
$this->thumbs[$largura.'X'.$altura] = $this->filhos->whereLoose('imagem_largura',$largura)->whereLoose('i... | true |
5206e19f0ed13367acc222fee5f5157a49ae5d4c | PHP | nikhil-jayswal/cs50 | /pset7/public/sell.php | UTF-8 | 3,019 | 2.875 | 3 | [] | no_license | <?php
// configuration
require("../includes/config.php");
// if form was submitted
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
// validate submission
// share symbol not provides
if (empty($_POST["symbol"]))
{
apologize("You must provide... | true |
538191a7c82b805c0b775b448932fecda4be104f | PHP | devotronico/xml-study | /test.php | UTF-8 | 2,067 | 3.453125 | 3 | [] | no_license | <?php
class Causale extends BaseObjectToXML {
protected $causale;
public function __construct($testo) {
// return $causale;
$this->casuale = $testo;
}
public function toXML() {
return $this->casuale;
}
}
class Figlio extends BaseObjectToXML {
protected $name... | true |
dfa3e8e6e4786ce07fbb2daffca2ce59ba4514d4 | PHP | jameskane05/cs-story-map | /bin/import | UTF-8 | 888 | 2.609375 | 3 | [] | no_license | #!/usr/bin/env php
<?php
require(__DIR__ . "/../includes/config.php");
$filename = 'US.txt';
if (is_readable($filename))
{
$file = fopen("$filename", "r+");
if ($file != NULL)
{
$row_count = 0;
while (($row = fgetcsv($file, 0, "\t")) !== FALSE)
... | true |
3bbb6e9db1813dcccf33d3b3c417b90bf68f6389 | PHP | mg-code/yii2-auth | /filters/HttpSimpleAuth.php | UTF-8 | 2,776 | 2.890625 | 3 | [] | no_license | <?php
namespace mgcode\auth\filters;
use yii\base\InvalidParamException;
use Yii;
use yii\filters\auth\AuthMethod;
use yii\web\Request;
/**
* HttpSimpleAuth is an action filter that supports authentication via HTTP headers.
*
* You may use HttpSimpleAuth by attaching it as a behavior to a controller or module, li... | true |
46445f9bba64e00cdd70c4e092a7a571a9fe45b0 | PHP | zymish/AfterEvents | /includes/startup.php | UTF-8 | 1,494 | 2.5625 | 3 | [] | no_license | <?php
//Start the session if it's not set.
if(!isset($_SESSION)) session_start();
//Get and set our global configuration
require_once('config.php');
error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_include_path(SITE_PATH);
setlocale(LC_MONETARY, 'en_US');
//innitialize $errors and connect to MySQL database.
global ... | true |
6d337f5ca38e70c3843bddb119fa9da75d945f3b | PHP | kuuza/KuuzuCart | /Kuuzu/KU/Core/Site/Shop/Image.php | UTF-8 | 3,039 | 2.515625 | 3 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php
/**
* Kuuzu Cart
*
* @copyright (c) 2007 - 2017 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*
* @copyright Copyright c 2018 Kuuzu; https://kuuzu.org
* @license MIT License; https://kuuzu.org/mitlicense.txt
*/
namespace Kuuzu\KU\Core\Site\Shop;... | true |
b33dde315c37697d66c4de87069d3d5cd6e333eb | PHP | akelimad/survey | /src/Helpers/FormBuilder.php | UTF-8 | 21,165 | 2.75 | 3 | [] | no_license | <?php
/**
* FormBuilder
*
* @author mchanchaf
*
* @package app.helpers
* @version 1.0
* @since 1.5.0
*/
namespace App\Helpers;
use App\File;
class FormBuilder {
/**
* Unique name
*
* @access protected
* @var string
*/
protected static $name;
/**
* Model
*
* @access protecte... | true |
b5b4cb96ee48200d39139794cd77d575751bf071 | PHP | boygraceful/springbok | /src/Application/TicketBundle/Model/Ticket/Mapper.php | UTF-8 | 1,805 | 2.65625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Application\TicketBundle\Model\Ticket;
use Application\TicketBundle\Model\Ticket;
use Application\UserBundle\Model\User;
use Application\SpringbokBundle\Model\Mapper\MongoMapper;
/**
* Mapper
*
* Da... | true |
e80a1bc8e3f018c00aafb4d471a65939bfbf4321 | PHP | RaphOb/ApiMailer | /src/mail.php | UTF-8 | 1,302 | 2.734375 | 3 | [] | no_license | <?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
function sendMail(Request $request)
{
// $email = $request->getAttribute('email');
$data = $request->getParsedBody();
$email = $data['email'];
$type = $data['type'];
$subject = NULL;
... | true |
584bc6d51e47fc79a854a78fc27d92f1df2ee28f | PHP | thallisphp/backend-challenge-doc88 | /app/Models/Pastel.php | UTF-8 | 752 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Model de Pastel
*
* @property int $id
* @property string $nome
* @property float $preco
* @property string $foto
*
* @package App\Models
*/
class Pastel extends Model {
use SoftDel... | true |
e5c98fafbf99cde0cffb9c1da3626c371d53d647 | PHP | michaelmendoza/simple-mvc | /index.php | UTF-8 | 4,923 | 2.96875 | 3 | [] | no_license | <?php
/**
* Simple-MVC
*
* A simple php MVC framework created for BYU MRI Facility
*
* @package Simple-MVC
* @author Michael Mendoza
*/
define('Simple-MVC_VERSION', '0.0.1');
/**
*---------------------------------------------------------------
* APP and API Directory Names
*-------------------------------... | true |
7f0bc7dc5a002e47f63f720ae472cecd4f0440c7 | PHP | darkorsa/cordo-gateway | /core/UI/Http/Middleware/CacheMiddleware.php | UTF-8 | 1,462 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cordo\Gateway\Core\UI\Http\Middleware;
use GuzzleHttp\Psr7\Message;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Cordo\Gateway\Core\In... | true |
d237290b92e24d574a07ed23b9f7893b51474bd7 | PHP | ValRCS/PHP_Playground_11 | /public/updateSong.php | UTF-8 | 1,164 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
require_once '../src/db.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
//we need to add song to database
$song_id = $_POST['update'];
$title = $_POST['title'];
$artist = $_POST['artist'];
$length = $_POST['length'];
//for check boxes we only get the value when checkbox is checked!
... | true |
41d544754421f93daecba5870962cb7920d6e634 | PHP | bharatvarshney2022/cirqal | /vendor/nelexa/google-play-scraper/src/Scraper/PlayStoreUiRequest.php | UTF-8 | 4,337 | 2.546875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
/**
* @author Ne-Lexa
* @license MIT
*
* @see https://github.com/Ne-Lexa/google-play-scraper
*/
namespace Nelexa\GPlay\Scraper;
use GuzzleHttp\Psr7\Request;
use Nelexa\GPlay\Enum\SortEnum;
use Nelexa\GPlay\GPlayApps;
use Nelexa\GPlay\Model\AppId;
use Psr\Http\Message\Requ... | true |
700e4a9f69952691e911ca56138df5e3731810c1 | PHP | akiyamaSM/chibi | /src/core/ObjectManager/ObjectManagerInterface.php | UTF-8 | 444 | 3.046875 | 3 | [] | no_license | <?php
namespace Chibi\ObjectManager;
interface ObjectManagerInterface
{
/**
* Create new object instance
*
* @param string $classname
* @param array $args
* @return mixed
*/
public function create($classname, array $args = []);
/**
* Resolve object ins... | true |
cd3896468447aa489b59c3bf1d2f2f6fae25f97b | PHP | cedricblondeau/php-enigma2 | /src/Console/Handlers/DownloadCommandHandler.php | UTF-8 | 730 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace CedricBlondeau\PhpEnigma2\Console\Handlers;
use CedricBlondeau\PhpEnigma2\Bouquets\Files;
use CedricBlondeau\PhpEnigma2\Bouquets\Retriever;
use Webmozart\Console\Api\Args\Args;
use Webmozart\Console\Api\IO\IO;
class DownloadCommandHandler extends BaseCommandHandler
{
/**
* @param Args $args
... | true |
0c41f92479377ced9070f087d7d23ecc115120d2 | PHP | wxinheb/uenty | /vendor/aabcsoft/aabc2/db/ColumnSchema.php | UTF-8 | 2,084 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace aabc\db;
use aabc\base\Object;
class ColumnSchema extends Object
{
public $name;
public $allowNull;
public $type;
public $phpType;
public $dbType;
public $defaultValue;
public $enumValues;
public $size;
public $precisi... | true |
5aff43d8014f0f755d5c282651399948b6f13902 | PHP | satoriforos/adbox | /_tests/updatesettings.php | UTF-8 | 3,823 | 2.53125 | 3 | [] | no_license | <?php
/**
* drop a lock file
* edit /etc/network/interfaces
* change wpa-ssid "<ssid>"
* change wpa-psk "<password>"
* comment out static
* uncomment dhcp
* tell user that settings have changed
* kill hostapd
* restart networking
* if networking is not working
* switch back to static
* start hostapd
*
... | true |
5208ac04ed3b3519f4f6086c54fc63a9595f10ae | PHP | lukejsimonetti/hydrator-strategy-pattern | /src/Entity/Form/Fieldset.php | UTF-8 | 3,555 | 2.828125 | 3 | [] | no_license | <?php
namespace src\Entity\Form;
use src\Entity\EntityInterface;
use src\Entity\Field\Choices;
use src\Entity\Label;
use src\Entity\Field\Entity as Field;
use src\Entity\Value;
class Fieldset implements EntityInterface
{
/** @var string */
public $id;
/** @var string */
public $normalized;
/** @... | true |
603965e21da71b179b2af818af982e7c6efcdc86 | PHP | hannahnewsome/laravel-demo-app | /app/Http/Controllers/ProfilesController.php | UTF-8 | 1,983 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use App\Http\Requests;
use Illuminate\Support\Facades\Validator;
class ProfilesController extends Controller
{
/**
* Show the user's profile.
*
* @return \Illuminate\Http\Response
*/
public func... | true |
a71b754afe366091510ab272a00f54b6884f5e53 | PHP | rubyboyle/rubyboyle_cst336_19 | /labs/lab4/api/validatePwd.php | UTF-8 | 497 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
//API to check if the password contains the username in it. Will be invalid if it does.
$password = $_GET['password'];
$confirmpassword = $_GET['confirmpassword'];
//echo $username . "<br>";
//echo $password . "<br>";
$data = array();
if (stripos($password, $confirmpassword) !== false) {
// echo "Username i... | true |
d3774bdb77e38c97dd6a310f9b44ef9801150667 | PHP | miarau/phpmvc-project | /app/view/users/view.tpl.php | UTF-8 | 2,316 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
// Prepare info
$info = $user->getProperties();
$hash = md5(strtolower(trim( $info['email'])));
// Questions by user
$strQuestions = (empty($data['q'])) ? "Är inte frågvis" : "";
foreach ($data['q'] as $question) {
// Prepare tags, no of answers and comments
$strTags = "";
foreach ($questio... | true |
ddefa8adec920d3dbb566de40abc0d9782891ef7 | PHP | chYatima03/php-sample-router | /src/Pages/save-note.php | UTF-8 | 751 | 2.875 | 3 | [] | no_license | <?php
use App\Database;
$db = Database::getInstance()->getConnection();
$title = filter_input( INPUT_POST, 'title' );
$note = filter_input( INPUT_POST, 'note' );
$statement = $db->prepare( "INSERT INTO notes (title, content) VALUES (:title, :content)" );
$status = $statement->execute([
':title' => $title,
':cont... | true |
02f59821a23e8bea148bfed74e3be1361e66f8c8 | PHP | moufidfouadmoh/drmprj | /src/Event/Subscriber/SituationEvent.php | UTF-8 | 1,458 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Event\Subscriber;
use App\Entity\Situation;
use App\Utils\Type\Choice\SituationChoiceType;
use Symfony\Component\EventDispatcher\Event;
class SituationEvent extends Event
{
const ON_ADD_SITUATION ='user.add.situation';
/**
* @var Situation
*/
private $situation;
public... | true |
5069c208459261eb689c7f42d911a594598b6fda | PHP | jscarton/superlist-xml-export-suite | /includes/ftp.php | UTF-8 | 1,366 | 2.53125 | 3 | [] | no_license | <?php
function superlist_export_xml_to_SAP($order_xml,$order_id)
{
//check exports directory exists
$base_dir=superlist_export_xml_check_dir();
//write xml file to that directory
$timestamp=date("Y_m_d_H_i_s");
$filename="orders-export-".$timestamp."_$order_id.xml";
$local_filename=$base_dir."/".$filename;
$wri... | true |
90cdeb8d717a248985dbf33be5fa11512a4543fe | PHP | bori00/Bookstore | /server/add_one_book_to_cart.php | UTF-8 | 1,298 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include "database_connection.php";
$userId = $_SESSION["LoggedInUserId"];
$bookId = $_GET["bookId"];
$success = addOneBookToUsersCart($userId, $bookId, $conn);
$conn->close();
echo json_encode($success);
// **************************************************
... | true |
030c1ada9d4128effd75259e3ccc1b183f7619ac | PHP | ArnoldDev-coder/Mobwiser-IT-Academy | /src/Kernel/Renderer/Renderer.php | UTF-8 | 862 | 2.71875 | 3 | [] | no_license | <?php
namespace Kernel\Renderer;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
class Renderer
{
/**
* @return Environment
*/
public function getTwig(): Environment
{
return $this->twig;
}
private FilesystemLoader $loader;
private Environment $twig;
public func... | true |
80ec51aff1db8f52cc66c5d9c9e78042005d0626 | PHP | GETASEWTESFAW/websiteUsingPhp | /SEproject/php/signup.php | UTF-8 | 8,475 | 2.9375 | 3 | [] | no_license | <?php
require_once("util/connection.php");
//create short names for form variables
$email = trim($_POST['email']);
$password = $_POST['password'];
$gender = $_POST['gender'];
$screenName = trim($_POST['screenName']);
$name = trim($_POST['name']);
$ar... | true |
b1b0c06273813bff1983da044f1321a269b86dab | PHP | aoyama7/base_image_xssbot | /tests/index.php | UTF-8 | 133 | 2.59375 | 3 | [] | no_license | <?php
$name = isset($_GET['name']) ? $_GET['name'] : "";
echo "hello, $name";
file_put_contents("php://stdout","hello, $name\n");
| true |
9d7f4ff71482e828f5dcc018a972aab6b302dbef | PHP | simengphp/mvc | /extend/MemcachedExtend.php | UTF-8 | 985 | 2.734375 | 3 | [] | no_license | <?php
//namespace extend\MemcachedExtend;
/**
* Created by crazy
* User: crazy
* Date: 2018/3/2
* Time: 17:00
*/
class MemcachedExtend {
public function memTest(){
$mem = new Memcache();
$mem->connect("127.0.0.1",11211);
// $mem->set("string","刘柱");
// $string = $mem->get("stri... | true |
50ca82fe450f8ce73bfc05c1adf130fd17f6e472 | PHP | cube43/ebics-client | /src/KeyRing.php | UTF-8 | 6,387 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Cube43\Component\Ebics;
use JsonSerializable;
use RuntimeException;
use function array_key_exists;
use function is_file;
use function Safe\file_get_contents;
use function Safe\json_decode;
class KeyRing implements JsonSerializable
{
public function __construct(
... | true |
4a805712359799de8d1c56c6548cb8e04fb5df77 | PHP | GytisApinys/PHPsummer_GA | /SyllableApplication/Methods/ConsoleMsgOutput.php | UTF-8 | 1,773 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Gytis.Apinys
* Date: 7/20/2018
* Time: 10:48 AM
*/
namespace SyllableApplication\Methods;
class ConsoleMsgOutput
{
public static function workTypeMsg(): void
{
echo "\n|---------Word Syllabify---------|\n";
echo "| ... | true |
f3499d68ab0111e028d14e2f5588086892ec4288 | PHP | trsenna/clean202108 | /packages/events/src/Application/Dispatcher.php | UTF-8 | 305 | 2.59375 | 3 | [] | no_license | <?php
namespace Clean\Events\Application;
use Clean\Contracts\Events\Application\Dispatcher as ApplicationDispatcher;
use Clean\Contracts\Events\Application\Event;
final class Dispatcher implements ApplicationDispatcher
{
public function dispatch(Event $event)
{
event($event);
}
}
| true |
96c5318982697a738e8339998f68262df3cbce5e | PHP | Bee777/laoedu | /app/Responses/User/UserCredentials.php | UTF-8 | 2,246 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: BeeTimberlake
* Date: 2/27/2019
* Time: 10:29 AM
*/
namespace App\Responses\User;
use App\Http\Controllers\Helpers\Helpers;
use App\User;
use Illuminate\Contracts\Support\Responsable;
use Illuminate\Support\Facades\Hash;
use Laravel\Passport\Passport;
class UserCredenti... | true |
198f4ddb4e74140e493a0ee21a980757793ac5b4 | PHP | freimaurerei/yii2-service-client | /src/Exception/LogicalException.php | UTF-8 | 629 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Freimaurerei\ServiceClient\Exception;
class LogicalException extends \Exception implements RpcServiceClientException, RestServiceClientException
{
/**
* @var string[]
*/
private $errorData;
/**
* @return string[] Получает данные об ошибке
*/
public function getErro... | true |
0199daa320aabaf9568bb3a61c924d81dfbd8f4b | PHP | Jas-077/SE_Project | /Project/forget2.php | UTF-8 | 1,001 | 2.734375 | 3 | [] | no_license | <?php
require_once "db.php";
/* Attempt to connect to MySQL database */
$link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
/* If you installed PHPMailer without Composer do this instead: */
require 'PHPMailer-master/src/Excepti... | true |
496497085f1f294a526f800156536c45a73a026e | PHP | Ai0202/tdd_book | /Part1/Chapter9/Dollar.php | UTF-8 | 321 | 3.40625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Part1\Chapter9;
require_once 'Part1/Chapter9/Money.php';
class Dollar extends Money
{
/**
* @param int $multiplier
* @return Money
*/
public function times(int $multiplier): Money
{
return Money::dollar($this->amount * $multiplier);
}
}... | true |
3c5b12d25785629a3e1f3b7256a33583ebcf2725 | PHP | richard4s/PHP-Files | /Desktop/FORBES/myhtdocs/php_practice/43_creating_cookies_with_php.php | UTF-8 | 251 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>PHP Practice</title>
</head>
<body>
<?php
$time = time();
//setting cookie
setcookie('username', 'Alex', $time + 60);
//unseting cookie
setcookie('username', 'Alex', $time - 60);
?>
</body>
</html> | true |
1d372c1238e9e71b5f335a22e6f58a14c31c601f | PHP | dianedouglas/PHP-and-Friends | /php_basics1_setup_commentprint_variables.php | UTF-8 | 4,915 | 2.53125 | 3 | [] | no_license | PHP Basics 1
SETUP THE FILE
Give your files the .php extension to give them access to the whole PHP language.
When this file is read by the server, which is the master chef, you can telll her that you are using php code by using these opening and closing tags
<?php
Code happens here
?>
Everything ... | true |
9d2101b530d619920008c5f45cb8aa15ba837546 | PHP | edwinsentinel/bodabodasacco-app | /model/phone.class.php | UTF-8 | 1,967 | 2.78125 | 3 | [] | no_license | <?php
class phone extends db{
public $id=null;
public $member_id=null;
public $front_name=null;
public $detail=null;
public $data_public=1;
public function __construct($id='', $mem_id=''){
parent::__construct();
if(!empty($id)){
$table = 'phone';
$field_array = array('phone_id', 'member_id', 'phone_fr... | true |
603160aeb5d301f8d3e0c29e2188d30bc98322ff | PHP | abdullahaslam306/Lavish-Raffle | /index2.php | UTF-8 | 6,750 | 2.515625 | 3 | [] | no_license | <?php
include('SimpleXLSX.php');
$filename=""; $productName=""; $mytitle=""; $winner="";$imgContent="";$image="";
$imageName="";
if(isset($_POST['add']))
{ $imageName="";
$filename=""; $productName=""; $mytitle=""; $winner="";$imgContent="";
extract($_POST);
$filename=$_FILES['excel']['name'];
$mytitle=$title;
$che... | true |
adb9a1920280ae645329b2f0bf0f7e9b2b1a130f | PHP | edRibeiro/Qualitenis | /app/Http/Requests/FuncionarioRequest.php | UTF-8 | 1,459 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class FuncionarioRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
public function messages()
... | true |
0a8d64c0eb1b7f8b02397b7cbc737124f30f4201 | PHP | Ezhil-Language-Foundation/snowball | /website/demo.php | UTF-8 | 1,102 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
require "menu.inc";
displayHeader("Demo");
?>
<TR><TD>
<form method="POST" action="demo.php">
Enter some words to stem, using the English stemming algorithm, and then click on Submit:<br>
<textarea name="words" rows="10" cols="50"><?php
$words = $_POST['words'];
$tmp = preg_replace('|\\\\|', '', $words);
ech... | true |
86e8bd79d38542ef0298ae772e6a1b3730d951be | PHP | pnikhil/scroid | /protected/app/controllers/AdminPagesController.php.bak | UTF-8 | 2,299 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
class AdminPagesController extends AdminBaseController{
public function listPages(){
$pages = Page::all();
return View::make('admin/pages/view')->with(array(
'pages' => $pages
));
}
public function createEdit(){
$pageId = Input::get('pageId', null);
$pageData = Input::get('page', array());... | true |
502a08e4258cb2c11ebd9488b5e11ec7b52c81f6 | PHP | denis019/MatrixLogImporter | /tests/Unit/Infrastructure/Persistence/Doctrine/Repositories/MatrixLogRepositoryTest.php | UTF-8 | 1,962 | 2.65625 | 3 | [] | no_license | <?php
namespace Tests\Unit\Infrastructure\Persistence\Doctrine\Repositories;
use App\Domain\Entities\MatrixLog;
use App\Infrastructure\Persistence\Doctrine\Repositories\MatrixLogRepository;
use Tests\BaseTest;
/**
* Class MatrixLogRepositoryTest
* @package Tests\Unit\Infrastructure\Persistence\Doctrine\Repositorie... | true |
320171d531dcb2d8703863dfa35042a6abea4e5e | PHP | crshao/pbkk-final-project | /app/Services/EncodingQRService.php | UTF-8 | 770 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Endroid\QrCode\Builder\Builder;
use Endroid\QrCode\Encoding\Encoding;
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelHigh;
use Endroid\QrCode\Writer\PngWriter;
use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeMargin;
class EncodingQRService
{
public function ... | true |
90e63411a53023af6ad0ad22f80963f7bb1b73dd | PHP | Eliyas/ecommerce_app_in_laraval5.8 | /database/seeds/ProductTableSeeder.php | UTF-8 | 598 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Support\Str;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ProductTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$products = array('Nike','New Balance','Converse','Puma','Spa... | true |
f261209781149d79566988e9a03af135d16938f1 | PHP | jul6art/symfony-skeleton | /src/Twig/LocaleExtension.php | UTF-8 | 2,388 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by devinthehood.
* Project: symfony-skeleton
* User: Jul6art
* Date: 21/11/2019
* Time: 21:39.
*/
namespace App\Twig;
use Doctrine\ORM\NonUniqueResultException;
use Symfony\Component\HttpFoundation\RequestStack;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
/**
* Class Loca... | true |
7905c80faa9961bd1089ed2bd16ec4a5a8511f7e | PHP | grunk/Pry | /Pry/Config/Ini.php | UTF-8 | 7,204 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Pry Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
*
*/
namespace Pry\Config;
/**
* Classe permettant la lecture de fichier de config au format INI. Basée sur Zend_Config_Ini
* Il est possible de créer u... | true |
27e486cb868b6652c914d0459ddfb8d0dd9df598 | PHP | Keisuke-Takagi/PHP_framework | /bookapp/controllers/bookapp/users/login/login_controller.php | UTF-8 | 2,032 | 2.671875 | 3 | [] | no_license | <?php
// namespace Bookapp\users\index;
require_once(dirname(dirname(dirname(__FILE__))) . "\\application_controller.php");
class Logincontroller extends Applicationcontroller {
public function redirect_book_page(){
header('Location: http://localhost/bookapp/books/index/mainpage');
}
public function user_log... | true |
5211d96262def6c55b00924ecd75c0471ed2dbb0 | PHP | mohsinalimat/hosted-pdf | /app/Analytics/PdfCreated.php | UTF-8 | 683 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Analytics;
class PdfCreated
{
/**
* The type of Sample.
*
* Monotonically incrementing counter
*
* - counter
*
* @var string
*/
public $type = 'mixed_metric';
/**
* The name of the counter.
* @var string
*/
public $name = 'pd... | true |
e91e0c384fc2ce1e281055f5e5ef3394880b43fb | PHP | studio-404/flatsinbatumi.com | /job.php | UTF-8 | 622 | 2.75 | 3 | [] | no_license | <?php
// unlink($dir."/".$object);
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (is_dir($dir."/".$object)){
rrmdir($dir."/".$object);
}else{
$arr = explode... | true |
a38c1e7ca6ded491453781de5aef9c7f7d8ffb34 | PHP | Imsaho/ddd-workshops | /src/DomainModel/User/Event/UserActivatedEvent.php | UTF-8 | 704 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace TSwiackiewicz\AwesomeApp\DomainModel\User\Event;
/**
* Class UserActivatedEvent
* @package TSwiackiewicz\AwesomeApp\DomainModel\User\Event
*/
class UserActivatedEvent extends UserEvent
{
/**
* @return bool
*/
public function isActive(): bool
{
... | true |
780f9c1d9d42eeb576b065c368e963e6f1e98c2d | PHP | gokure/hyperf-settings | /tests/Cases/AbstractTestCase.php | UTF-8 | 3,729 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Gokure\Settings\Tests\Cases;
use Gokure\Settings\DatabaseStore;
use PHPUnit\Framework\TestCase;
abstract class AbstractTestCase extends TestCase
{
abstract protected function createStore(array $data = null);
protected function getStore(array $data = null)
{
... | true |
d08b725f47fc3ada0033ef58eb11beb991f76de7 | PHP | andreuramos/larabeers | /Larabeers/Services/SearchStyle.php | UTF-8 | 397 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Larabeers\Services;
use Larabeers\Domain\Beer\StyleRepository;
class SearchStyle
{
private $style_repository;
public function __construct(StyleRepository $style_repository)
{
$this->style_repository = $style_repository;
}
public function execute(string $style_name): arra... | true |
f66b3349a87c2c302bca4d558508005618bfba5e | PHP | Marionjouis/fund_my_project | /exos_php/test_exos.php | UTF-8 | 976 | 4.03125 | 4 | [] | no_license | <?php
class Person
{
private $lastname;
private $firstname;
private $birthdaydate;
public function setNameLastname ($lastname, $firstname){
$this->lastname =$lastname;
$this->firstname =$firstname;
}
public function getFullname(){
return $this->firstname." ".... | true |
c75a119237e69aab9acc56dc0078488ea2f235fb | PHP | rovast/design-pattern-talk | /src/Chapter7/v3/GiveGift.php | UTF-8 | 210 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Rovast\DesignPatternTalk\Chapter7\v3;
/**
* Class Proxy.
*/
interface GiveGift
{
public function giveDolls();
public function giveFlowers();
public function giveChocolate();
}
| true |
cfa8b911e7f986d23df61371ac605b340882bd5b | PHP | nabilelmoudden/2015 | /anaconda-project/businessCore/extensions/MailHelper.php | UTF-8 | 497 | 2.96875 | 3 | [] | no_license | <?php
/**
* Description of MailHelper
*
* @author JulienL
*/
class MailHelper
{
static public function sendMail( $to, $from, $subject, $message )
{
$headers = 'MIME-Version: 1.0'."\r\n";
$headers .= 'Content-type: text/html; charset=utf-8'."\r\n";
if( is_array($to) )
$headers .= 'To: '.implode( ', ', $... | true |
fac73b5e43c7f4ae3f8dfd230e064d2f8c0c684b | PHP | amphp/sync | /src/PosixSemaphore.php | UTF-8 | 7,839 | 2.9375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Amp\Sync;
use Amp\ForbidCloning;
use Amp\ForbidSerialization;
use function Amp\delay;
/**
* A non-blocking, inter-process POSIX semaphore.
*
* Uses a POSIX message queue to store a queue of permits in a lock-free data structure. This semaphore implementation
* is preferre... | true |
7dcb7833ddcc288643d68526ed3dd63639258da7 | PHP | RosarioBrancato/Hive | /Helper/ReportHelper.php | UTF-8 | 609 | 2.828125 | 3 | [] | no_license | <?php
namespace Helper;
use DTO\ReportEntry;
use Enumeration\Constant;
use Enumeration\ReportEntryLevel;
class ReportHelper
{
public static function AddEntry(ReportEntry $reportEntry)
{
if (isset($reportEntry)) {
if (!isset($_SESSION[Constant::SessionReport])) {
$_SESSION... | true |
ed743936a2d52c5b14c075081cf8e80e703e82e2 | PHP | naveenroy001/staticphpframework | /system/bootstrap.php | UTF-8 | 2,503 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
require "route.php";
$any = 0;
$url = url();
if ($url[strlen($url) - 1] != '/') $url = $url . '/';
foreach ($route as $key => $value) {
$method = "GET";
$array = explode(':', $key);
$regurl = $array[0];
if(isset($array[1])){
if($array[1]!=null)
$method = $array[1];
}
if (... | true |
7916db70882b1b94f5d4d827757c74764176d3d2 | PHP | Kingsum007/laravel-class | /app/Http/Controllers/CardController.php | UTF-8 | 2,744 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CardRequest;
use Illuminate\Http\Request;
use App\Card;
use Illuminate\Support\Facades\Validator;
class CardController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public... | true |
815b780c6689696292cdc44557ef6d6b96eea1c9 | PHP | yamags/commission-fee-calculation-test | /src/App/Models/TransactionBasket.php | UTF-8 | 2,660 | 2.9375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace CommissionTask\App\Models;
use Money\Converter;
use Money\Currency;
use Money\Money;
/**
* Class TransactionBasket.
*/
class TransactionBasket
{
/**
* list of transactions grouped by user id and operation type.
*
* @var array
*/
protected $trans... | true |
6bda93449fef7154b5a70f4e58fb3567c2828231 | PHP | chibuzoro/robot-arm-block | /app/Runner.php | UTF-8 | 957 | 3.046875 | 3 | [] | no_license | <?php
/**
* @author Chibuzor Ogbu <chibuzorogbu@gmail.com>
* @created 2021-04-27
* @copyright ©2021. All rights reserved.
*/
namespace App;
class Runner
{
/**
* @var Blocks
*/
private Blocks $blocks;
/**
* @var RobotArm
*/
private RobotArm $robot;
public function run($c... | true |
5cee97f14147f502c16a09edaf5e2f814fd4db33 | PHP | arashgit/imagelib | /image-lib/image_collection.php | UTF-8 | 1,318 | 3.125 | 3 | [] | no_license | <?php
// image-lib/image_collection.php
if ( ! defined('IMAGEAPI_ROOT'))
exit('No direct script access allowed');
include_once IMAGEAPI_LIBPATH.'image_item.php';
// this class is a collection of images
// you can add, delete images, running all existing effects on all files, and export all images
class ImageCollect... | true |
496b750a222a97052378c242e698ef1ff2b9f78a | PHP | conductorphp/conductor-application-orchestration | /src/Console/AppMaintenanceCommand.php | UTF-8 | 3,393 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @author Kirk Madera <kirk.madera@rmgmedia.com>
*/
namespace ConductorAppOrchestration\Console;
use ConductorAppOrchestration\Config\ApplicationConfig;
use ConductorAppOrchestration\Maintenance\MaintenanceStrategyInterface;
use ConductorCore\MonologConsoleHandlerAwareTrait;
use Psr\Log\LoggerAwareInterfa... | true |
d0fe5d63a51f8fa33bcd3e39f86c8e2218406fc9 | PHP | UsmanIftikhar881/ApiMaster | /database/factories/StockFactory.php | UTF-8 | 1,026 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use App\Models\Product;
use App\Models\Stock;
use Illuminate\Database\Eloquent\Factories\Factory;
class StockFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Stock::class;
/**
... | true |
e5ee0936c67cc47fb40010e1d73d39448084506f | PHP | jnatsa/laravel-vue-generators | /src/Commands/VueGeneratorsCommand.php | UTF-8 | 955 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace VueGenerators\Commands;
use VueGenerators\Paths;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use VueGenerators\Exceptions\ResourceAlreadyExists;
class VueGeneratorsCommand extends Command
{
use Paths;
/**
* Create path for file.
*
* @param Filesystem ... | true |
3c0687d1770c9ed60c645c094cdc0f43d8eb0f40 | PHP | wangchj/mdpx-web-ui | /protected/components/Controller.php | UTF-8 | 2,019 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Controller is the customized base controller class.
* All controller classes for this application should extend from this base class.
*/
class Controller extends CController
{
/**
* @var string the default layout for the controller view. Defaults to '//layouts/column1',
* meaning using a single colu... | true |
54f38bb18754e0a51139485a45c6a5a632b4d6c4 | PHP | hertar/weike | /advanced/backend/models/Skill.php | UTF-8 | 1,126 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use app\models\Industry;
/**
* This is the model class for table "wk_witkey_skill".
*
* @property integer $skill_id
* @property integer $indus_id
* @property string $skill_name
* @property integer $listorder
* @property integer $on_time
*/
class Skill extends \yii\db\Activ... | true |
4d55af015a883418893caa4dd74b5e6b6341639c | PHP | geo-pod/client | /data/Controller/Permalink.php | UTF-8 | 728 | 2.734375 | 3 | [] | no_license | <?php
class Controller_Permalink {
private $permalink;
public function __construct($param) {
$layers = explode(";", $param['layers']);
$layersName = explode(";", $param['lName']);
if (array_key_exists("key", $param)) {
$this->permalink = new Model_Permalink($param['lon'],... | true |
693c8389ff9822392dec570bf0803b3f8416463f | PHP | aone-id/WinTenBot | /Commands/UserCommands/Tagging/TagsCommand.php | UTF-8 | 2,285 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Azhe
* Date: 8/23/2018
* Time: 10:45 AM
*/
namespace Longman\TelegramBot\Commands\UserCommands;
use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException;
use WinTenDev\Handlers\ChatH... | true |
c43f0246ffc6249f42cbe7a5c802f5469d52862b | PHP | warma2d/BookAdmin | /root/tests/BookTest.php | UTF-8 | 4,242 | 2.59375 | 3 | [] | no_license | <?php
use App\Entity\Book as Book;
use App\Exception\ApplicationException;
use App\Service\Book\BookService;
require_once('./tests/BaseTestClass.php');
class BookTest extends BaseTestClass
{
public function testCreateBookWithInvalidIsbn()
{
$inputData = [
Book::NAME => 'Чистый код',
... | true |
a5b3cdf63f17851c16e3509f20873fa9617870c2 | PHP | MaximRSD/Agenda | /editaccounts.php | UTF-8 | 1,857 | 2.59375 | 3 | [] | no_license | <?php
include "include.php";
CheckLogin();
?>
<!DOCTYPE html>
<html>
<head>
<title>Account toevoegen voor klanten</title>
</head>
<body>
<ul>
<li><a href="customers.php">Klanten</a></li>
<li><a href="appointments.php">Afspraken</a></li>
<?php
if($_SESSION != false)
{
echo "<li style='float: right;... | true |
94ec5d20324d15f7205312f9df7c058e5af8ada1 | PHP | plamenpik/SoftUni-Education | /03-PHP-Web/01-PHP-Web-Development-Basics/03-Functions-Objects-and-Classes-Exercise/20. Date Modifier.php | UTF-8 | 613 | 3.484375 | 3 | [] | no_license | <?php
class DateModifier
{
private $date1;
private $date2;
public function __construct(string $date1, string $date2)
{
$this->date1 = $date1;
$this->date2 = $date2;
}
public function timeDiffrance() {
$datetime1 = new DateTime($this->date1);
$datetime2 = ne... | true |
1f302d36bc2b151f439ff5004ac3ffa07b38c6fe | PHP | HtetNaingLInn/Basic-OOP | /chapter_2/php_16_array_to_object.php | UTF-8 | 231 | 3.5 | 4 | [] | no_license | <?php
$b=["one"=>1,"two"=>2,"three"=>3,"four"=>"four"];
echo $b["three"];
echo "<hr>";
var_dump($b);
echo "<hr>";
$obj= (object) $b; // (object) keywords change array to object
var_dump($obj);
echo "<hr>";
echo $obj->three;
?> | true |
8ee5390946763b9bfad494dba5db3f0d44451922 | PHP | stephens2424/php | /testdata/fuzzdir/corpus/ext_mysqli_tests_mysqli_warning_unclonable.php | UTF-8 | 958 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
if (!mysqli_query($link, "DROP TABLE IF EXISTS tes... | true |