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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8160cf0e33b58c0422e1e8b128219331db8d9ebe | PHP | groovemen/honeyComb | /blog/app/models/db.php | UTF-8 | 781 | 3.078125 | 3 | [] | no_license | <?php
// Set DB configs
define("MySQL_USER", getenv('C9_USER'));
define("MySQL_PASSWORD", "");
define("MySQL_DB_NAME", "blog");
define("MySQL_HOST", getenv('IP'));
// DB Class used to open and set current db connection
// Use by all classes that manage db tables
class DB {
pr... | true |
9b92b41a96230cffadf7c07051e2a3bdc7131e3d | PHP | ketianlin/mymvc | /Framework/Lib/Upload.class.php | UTF-8 | 2,773 | 3.171875 | 3 | [] | no_license | <?php
namespace Lib;
class Upload{
private $path; //上传的路径
private $size; //上传的大小
private $type; //允许上传的类型
private $error; //保存错误信息
public function __construct($path,$size,$type){
$this->path=$path;
$this->size=$size;
$this->type=$type;
}
//返回错误信息
public func... | true |
f86bac89e920b62948cbe390e4bb30ac2c6467ec | PHP | Reinis/matchmaker | /app/Controllers/ImageController.php | UTF-8 | 2,106 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Matchmaker\Controllers;
use Matchmaker\Services\ImageService;
use Matchmaker\Services\ProfileService;
use Matchmaker\Views\Flash;
use Matchmaker\Views\View;
class ImageController
{
private View $view;
private ProfileService $profileService;
private ImageServic... | true |
238d6b6bb6f32b155b54bf7f0643aa0fd3873718 | PHP | teomneto/orientacao-objeto | /curso.php | UTF-8 | 219 | 3.859375 | 4 | [] | no_license | <?php
class Curso
{
public $nome;
public $sala;
}
$curso = new Curso();
$curso->nome = "Algoritimos em Java";
$curso->sala = "B05";
echo "Nome do curso: $curso->nome" . PHP_EOL;
echo "Sala : $curso->sala" . PHP_EOL;
| true |
cce258cb994d2f0d3b4740588ce03a8407b53ff5 | PHP | petercheon/tistory-openapi-example | /tistory/step1/callback.php | UTF-8 | 845 | 2.71875 | 3 | [] | no_license | <?
if (!isset($_REQUEST['code']) && isset($_REQUEST['error'])) {
echo "Error : " . $_REQUEST['error'] . '<br />';
echo "Error Description : " . $_REQUEST['error_description']; exit;
}
/**
* 티스토리로 부터 받은 code와 함께 access_token 요청을 합니다.
*/
$authorization_code = $_REQUEST['code'];
$client_id = '... | true |
0ab584600795fc34cb668fce57b83083b9d6ac77 | PHP | rohitsandhu/projecteChess | /src/Entity/Torneig.php | UTF-8 | 4,062 | 2.625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\TorneigRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TorneigRepository::class)
*/
class Torneig
{
/**
* @ORM\Id
* @ORM\Generated... | true |
d96f7e923bff22cefa3ebb9d8a2297bc968b64e6 | PHP | Kunstmaan/KunstmaanBundlesCMS | /src/Kunstmaan/SitemapBundle/Model/SitemapUrl.php | UTF-8 | 919 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kunstmaan\SitemapBundle\Model;
class SitemapUrl
{
/** @var string */
private $url;
/** @var \DateTimeImmutable */
private $lastModified;
/** @var float */
private $priority;
public function __construct(string $url, \DateTimeImmutable $lastModified, float $priority = 0.9)... | true |
db7ef3824af536ca3c0346c52205e235b90124fc | PHP | phamphuong1710/learnpress-sortable | /templates/answer.php | UTF-8 | 3,590 | 2.53125 | 3 | [] | no_license | <?php
/**
* Template for displaying answer of fill-in-blank question.
*
* This template can be overridden by copying it to yourtheme/learnpress/addons/fill-in-blank/content-question/answer.php.
*
* @author ThimPress
* @package LearnPress/Fill-In-Blank/Templates
* @version 3.0.1
*/
/**
* Prevent loading th... | true |
570ca6e6ab843df7e63864f4e97b68c9dbac0892 | PHP | Tacsiazuma/PPPChat | /Controller/HTTPController.php | UTF-8 | 1,853 | 2.53125 | 3 | [] | no_license | <?php
namespace PPPChat\Controller;
use PPPChat\UI\Admin;
use PPPChat\UI\ChatFrame;
use PPPChat\UI\SideBar;
use PPPChat\User\UserMapper;
use PPPChat\Message\MessageMapper;
// avoid direct script access
defined('ABSPATH') or die("No script kiddies please!");
class HTTPController {
public funct... | true |
ef00e7e685ec71a309ebb3859a2519fa215653ce | PHP | shuvrow/phpCoding | /assignmentOperator.php | UTF-8 | 256 | 2.984375 | 3 | [] | no_license | <?php
$a=5;
$b='5';
if(5 === $a)
{
echo "hlw";
echo "<br/>";
}
if(5==$a)
{
echo "hi";
echo "<br/>";
}
echo "****************************************";
echo "<br/>";
if(5==$b)
{
echo "hi";
echo "<br/>";
}
if(5===$b)
{
echo "hlw";
echo "<br/>";
}
?> | true |
6c316158661419fd03b375181d212bc378611480 | PHP | axoquen/tt780 | /__examples/configuration_array/c4.php | UTF-8 | 233 | 2.53125 | 3 | [] | no_license | <?php
class c4 extends handler_class {
function method_01($parameters) {
return "<p><b>components_04.method_01</b></p>";
}
function main($parameters) {
return "<p><b>components_04.main</b></p>";
}
} | true |
c98a22b1cd875bab135a3ef0fabb1ce7833de15e | PHP | thomasttvo/pendulum | /protected/Yii.php | UTF-8 | 1,603 | 2.671875 | 3 | [] | no_license | <?php
/**
* Date: 3/1/13
* Class: Yii
* Description:
*
*/
class Yii extends YiiBase
{
public static function createComponent($config) {
if(is_string($config))
{
$type=$config;
$config=array();
}
elseif(isset($config['class']))
{
$type=... | true |
19ea2759701abb518795612984bcb8f1bc5bffbe | PHP | thanhblm/blm | /modules/mod_common/common/persistence/base/mapping/TemplateMapping.php | UTF-8 | 5,136 | 2.53125 | 3 | [] | no_license | <?php
namespace common\persistence\base\mapping;
use common\persistence\base\vo\TemplateVo;
use core\database\InsertBuilder;
use core\database\QueryBuilder;
use core\database\SqlStatementInfo;
use core\database\UpdateBuilder;
class TemplateMapping {
final public function selectByKey(TemplateVo $templateVo) {
try ... | true |
a31b688955e3c607154afee03dfcc19052de73f9 | PHP | DeyaaMaali/oop-php-project | /view/categories/categoryHome.php | UTF-8 | 1,885 | 2.765625 | 3 | [] | no_license | <?php
include "../../database/Database.php";
include "../layout/header.php";
include "../../model/Product.php";
include "../../model/Category.php";
$conn = new Database();
$connection = $conn->connect();
if (isset($_POST['submit'])) {
echo "Deleted";
Category::deleteCategory($connection, $_POST['id']);
}
?... | true |
ae74840f2179602a6ec4f18c29e04df62ff68ba0 | PHP | chimeraphp/routing | /src/Handler/ExecuteAndFetch.php | UTF-8 | 1,170 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Chimera\Routing\Handler;
use Chimera\ExecuteCommand;
use Chimera\ExecuteQuery;
use Chimera\Routing\HttpRequest;
use Lcobucci\ContentNegotiation\UnformattedResponse;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\Serv... | true |
96c363f4805df249142fb63b33afff36444a0188 | PHP | foobarz076/DiceRobot | /src/Interfaces/Fragment.php | UTF-8 | 385 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DiceRobot\Interfaces;
/**
* Interface Fragment
*
* Describe a fragment (aka single message) of Mirai message chain.
*
* @package DiceRobot\Interfaces
*/
interface Fragment
{
/**
* Convert fragment to single message of Mirai message chain.
*
* @return ... | true |
486869fe2e52e6522a7b060880afdd2b23ca44e0 | PHP | fykosak/fksdb | /app/Models/Tasks/StudyYearsFromXML.php | UTF-8 | 3,611 | 2.71875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace FKSDB\Models\Tasks;
use FKSDB\Models\ORM\Models\TaskCategoryModel;
use FKSDB\Models\ORM\Services\StudyYearService;
use FKSDB\Models\ORM\Services\TaskCategoryService;
use FKSDB\Models\Pipeline\Stage;
use Fykosak\Utils\Logging\MemoryLogger;
use Fykosak\Utils\Logging\Message;
us... | true |
9b669efc15c60a604801bd62b6490e7626d30026 | PHP | dung1004/buy_books | /admin/modules/admin/add.php | UTF-8 | 6,948 | 2.59375 | 3 | [] | no_license |
<?php
// Load file autoload chua database
$open = "admin";
require_once __DIR__. "/../../autoload/autoload.php";
// tạo mảng để insert dữ liệu
$data =
[
"name" => postInput('name'),
"username" => postInput('username'),
... | true |
fb763d7e62e8a56e2583c6677d902abd8747aa87 | PHP | andrelupus1/QuizApp | /www/application/models/Questoes_model.php | UTF-8 | 12,819 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
* Model de Gerenciamento de Usuários
* Autor: ARTE DESIGN PA
* Webite: www.artedesignpa com br
*/
class Questoes_model extends CI_Model{
public function getQuestoes(){
$this->db->order_by('anoQuestao', 'asc');
re... | true |
acdcda1d075498d0ab069db642cf5211888e6de2 | PHP | cristianeto/PortalCimogsys | /app/respaldo/models/User.php | UTF-8 | 1,135 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;
/**
* The database table used by t... | true |
f407f614c6dec1fc689ed42a94e8a6c67a75d832 | PHP | sleleko/PortalApp | /core/src/Middlewares/Auth.php | UTF-8 | 1,701 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Middlewares;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Vesp\Helpers\Jwt;
use Vesp\Models\User;
use Vesp\Services\Eloquent;
class Auth
{
protected $eloquent;
protected $mod... | true |
3250853e4b06fb1c1550b4729ed5c71318ee0c25 | PHP | rishabharyal/couchya | /app/Repos/MovieRepo.php | UTF-8 | 2,024 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repos;
use App\Models\Genre;
use App\Models\Movie;
class MovieRepo
{
public function getFromDB($page, $genre, $range_start, $range_end): array
{
// $genreModel = Genre::where('name', $genre)->first();
// if (!$genreModel) return [];
return Movie::inRandomOrder()->take(17)->get()->toArray... | true |
1a459dfe098ce64fe4ccd3d4984f417cc5fb4a08 | PHP | Naviyaa/Blogsite | /includes/functions.php | UTF-8 | 2,631 | 2.515625 | 3 | [] | no_license | <?php require_once("includes/db.php") ?>
<?php
function redirect_to($new_location){
header("Location:".$new_location);
exit;
}
function userNameExistanceCheck($username){
global $connectingDB;
$sql="SELECT username FROM admins WHERE username='$username' ";
$stmt=$connectingDB->prepare($sql);
$stmt->bindV... | true |
e3fa861ca001e421c97c8ee0064ad963bd99f5a0 | PHP | svilborg/guzzle-encoding-com | /src/Gencoding/Guzzle/Encoding/EncodingClient.php | UTF-8 | 2,256 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Gencoding\Guzzle\Encoding;
use Guzzle\Service\Client;
use Guzzle\Service\Inspector;
use Guzzle\Common\Collection;
use Guzzle\Service\Description\ServiceDescription;
class EncodingClient extends Client
{
/**
* Client constructor
*
* @param string $baseUrl
* Base URL ... | true |
f334dacec03e8f98dd8b1a9c28b205328586aeb5 | PHP | linran2017/zuoye | /7-12/Controller.php | UTF-8 | 590 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | <?php
//创建一个父级类,便于多种类可以继承
class Controller{
//创建一个受保护的函数,左右它本身和子集可以调用,并且传入两个参数
protected function success($msg,$url){
//定义一个定界符变量,定界符的代码可以在页面中原样输出
//用js代码弹出第一个参数$msg的值,任何跳转到第二个参数$url值的页面
$str=<<<str
<script>
alert('{$msg}');
location.href="{$url}";
</script>
str;
//在页面中输出变量$str,让... | true |
b4c290dfd01b44bbb9e875da6236f6ff754167d4 | PHP | Devorshi/Spoon-Knife | /task/delta web dev task 2/upload.php | UTF-8 | 779 | 2.640625 | 3 | [] | no_license | <html>
<body>
<?php
session_start();
$x=$_SESSION["user_rollno"];
if ($_FILES["file"]["type"] != "image/png")
{echo"invalid file format!should be in .png!";
}
else if (($_FILES["file"]["size"]/1024) > 2048)
{echo "file size larger than 2mb!!";}
else if (file_exists("C:/xampp/htdocs/www/".$x.".png"))
{
echo "image... | true |
9cc8c8b1a093d73eead883eab5df0156cf869db7 | PHP | rizkypbc/AksesBLKSamarinda | /blki/pencari.php | UTF-8 | 3,093 | 2.640625 | 3 | [] | no_license | <?php require_once("PDOConnection.php");?>
<?php
// include("PDOConnection.php");
//Define some value
define("ACTION_ADD_USER", "add");
// define("ACTION_LOGIN", "login");
define("RESULT_SUCCESS", 0);
define("RESULT_ERROR", 1);
define("RESULT_USER_EXISTS", 2);
$action = $_POST["action"];
$result = RESULT_ERROR;
if(i... | true |
bce7108e1ed746497ac62d34165fddfe96867e40 | PHP | marcfeather/app-frameworks-php | /Unity/Form/Framework.php | UTF-8 | 1,526 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace PHPfox\Unity\Form;
/**
* Class Form
* @package PHPfox
*
* @method Input text($name)
* @method Input email($name)
* @method Input file($name, $title)
* @method Textarea textarea($name, $title)
*/
class Framework extends \PHPfox\Unity\Objectify\Framework {
private static $_html = '';
protecte... | true |
708060e6284afb9b195b4e309454137a4d778f1a | PHP | denilson157/apiMarketPrices | /app/Http/Controllers/UserController.php | UTF-8 | 1,313 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
class UserController extends Controller
{
function store (Request $request){
$request->validate([
'email' => 'required|email|unique:users',
'name' => 'requi... | true |
6835e317416b82ca42b632e9f034379efb872cb7 | PHP | kei1111/restaurants_search_line_bot | /app/Services/Gurunavi.php | UTF-8 | 643 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use GuzzleHttp\Client;
class Gurunavi
{
private const RESTAURANTS_SEARCH_API_URL = 'https://api.gnavi.co.jp/RestSearchAPI/v3/';
public function searchRestaurants(string $word): array
{
$client = new Client();
$response = $client
->get(self::RESTAURAN... | true |
7fddc3f0fe558c65f5ff9d59dcc91f5d1e14c57a | PHP | TomaIvanovTomov/yii2-order | /migrations/m180416_103406_create_currency_table.php | UTF-8 | 2,443 | 2.546875 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Handles the creation of table `currency`.
*/
class m180418_082719_create_currency_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('currency', [
'id' => $this->primaryKey(),
'default... | true |
6f91e5b745126cbba336c0492dc9064778e717f3 | PHP | jdavisonc/yuppgis | /yuppgis/core/db/criteria2/yuppgis.core.db.criteria2.SelectValue.class.php | UTF-8 | 652 | 2.9375 | 3 | [] | no_license | <?php
/**
* Clase que representa que un atributo selecionado en una consulta geografica (@link GISQuery), es un valor
*
* @package yuppgis.core.db.criteria2
*
* @author Jorge Davison
* @author Martin Taruselli
* @author Emilia Rosa
* @author German Schnyder
*/
class SelectValue extends SelectItem {
priva... | true |
22fb9caf0b4086de7fb79831a1a0e88dd6990102 | PHP | NataliMamedova2/parser_csv | /src/Reader.php | UTF-8 | 5,251 | 3.09375 | 3 | [] | no_license | <?php
namespace Parser\Csv;
use Iterator;
use Parser\Csv\Exceptions\ParserException;
use InvalidArgumentException;
class Reader extends AbstractCsvFile implements Iterator
{
const DEFAULT_ESCAPED_BY = "";
/**
* @var string
*/
private $escapedBy;
/**
* @var int
*/
private $ski... | true |
d300d1f073335ceff608a71845e490019b33aeaa | PHP | hyunkoes/E-Library | /changemail.php | UTF-8 | 2,685 | 2.671875 | 3 | [] | no_license | <?php
session_start();
$tns="
(DESCRIPTION =
(ADDRESS_LIST = (ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
(CONNECT_DATA = (SERVICE_NAME=XE))
)
";
$dsn = "oci:dbname=".$tns.";charset=utf8";
$username = 'c##tp';
$password = '1234';
$searchword = $_GET['searchword'] ?? '';
try{
$conn = new ... | true |
fa4dabd70ea8b963cb5afb154a521739e25e1d50 | PHP | muncherpuncher/THEPAL4C3 | /application/modules/users/controllers/users.php | UTF-8 | 11,888 | 2.578125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Users extends MX_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this c... | true |
76f37743af6db9561afdf84764caedf7c30ac769 | PHP | suimie/PHPProject_TheFoodPitStop | /TheFoodPitStop/contents/payment.php | UTF-8 | 16,483 | 2.625 | 3 | [] | no_license | <?php
/**
* payment.php
*
* content for the payment page
*
* @version 1.0 2018-04-19
* @package The Food Pit Stop
* @copyright (c) 2018, Anita Mirshahi, Suim Park, Valini Rangasamy
* @license
* @since Release 1.0
*/
//^([a-zA-Z]{2,}\s[a-zA-z]{1,}'?-?[a-zA-Z]{2,}\s?([a-zA-Z]{1,})?)
//^(0[1-9]|1[0-2])$
/*
... | true |
346dce1394a14ff9442288f30cf6034ea3c45a9a | PHP | hookover/symfony3exercise | /src/Blogger/BlogBundle/Twig/Extensions/BloggerBlogExtension.php | UTF-8 | 1,678 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: apple
* Date: 16/2/25
* Time: 上午8:42
*/
namespace Blogger\BlogBundle\Twig\Extensions;
class BloggerBlogExtension extends \Twig_Extension
{
public function getFilters()
{
// return array(
// 'created_ago'=>new \Twig_Filter_Method($this,'createdAgo... | true |
6bbc14fbd0032534b12a3dff79e8af9232e40040 | PHP | szymach/talesweaver | /src/Application/Event/AuthorRegisteredSubscriber.php | UTF-8 | 610 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Talesweaver\Application\Event;
use Talesweaver\Application\Bus\EventSubscriberInterface;
use Talesweaver\Application\Mailer\AuthorActionMailer;
final class AuthorRegisteredSubscriber implements EventSubscriberInterface
{
/**
* @var AuthorActionMailer
*/
pri... | true |
13e3804e8bf29138532e0c2dcf32ec22b77340f2 | PHP | igorw/Ratchet | /src/Ratchet/Component/WAMP/WAMPServerComponent.php | UTF-8 | 5,992 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ratchet\Component\WAMP;
use Ratchet\Component\WebSocket\WebSocketComponentInterface;
use Ratchet\Resource\ConnectionInterface;
use Ratchet\Resource\Command\Composite;
use Ratchet\Resource\Command\CommandInterface;
use Ratchet\Resource\Command\Factory as CmdFactory;
use Ratchet\Component\WAMP\Command\Act... | true |
53c71baa4fb0b86e61002149c659d36bd0987ab4 | PHP | ajoshi116/notice-new | /admin/manage_users.php | UTF-8 | 780 | 2.65625 | 3 | [] | no_license | <?php
$q=mysqli_query($conn,"select * from user ");
?>
<script>
function DeleteUser(id)
{
if(confirm("You want to delete this record ?"))
{
window.location.href="delete_user.php?id="+id;
}
}
</script>
<h2 style="color:#00FFCC"><a href="index.php?page=addusers">Add Users</a></h2>
<table class="table table-b... | true |
39892e71cb7d85e9fdf4f20275852f87e0ce41d6 | PHP | carolinetmbrito/SitApTecNot2014 | /application/controllers/noticias.php | UTF-8 | 5,450 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class noticia extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('mnoticia');
//Definir o timezone - Fuso Horário
date_default_timezone_set('America/Sao_... | true |
e202b79c2c7c62ffefc15a1268ba5b1d9ec8f658 | PHP | NMathias59/Projet-n-3 | /model/Admin.php | UTF-8 | 376 | 2.859375 | 3 | [] | no_license | <?php
class Admin {
private $userName;
private $password;
public
function getuserName() {
return $this->userName;
}
public
function setuserName( $userName ) {
$this->userName = $userName;
}
public
function getpassword() {
return $this->password;
}
public
function setpassword(... | true |
7a56f0a2acb628119e0a5f63ae0f26472bcdc2ed | PHP | wisenick/calc | /app/Calc/Test.php | UTF-8 | 317 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Calc;
use Closure;
class Test
{
private $demand;
private $function;
public function __construct(Demand $demand, Closure $closure)
{
$this->demand = $demand;
$this->function = $closure;
}
public function run(): int
{
return (int)call_user_func($this->function, $this->demand);
}
}
| true |
61157642ad2c07930740e4d12e5ca5f048826323 | PHP | Camilla223/Tesina | /home.php | UTF-8 | 1,637 | 2.65625 | 3 | [] | no_license | <html>
<head>
<title>Riepilogo</title>
<link rel="stylesheet" href="style2.css">
</head>
<body>
<h1>ORTO IDROPONICO</h1>
<h1>Riepilogo dati.</h1>
<?php
$db = mysqli_connect("localhost","root","","toso");
$query = "SELECT data,temperatura, ph, cond_elettr FROM giornata, parametri WHERE giorn... | true |
a421ddeac0911a8f1b766cba06658cb7a09ba5f2 | PHP | IET-OU/moodle-backup-parser | /lib/SectionsParser.php | UTF-8 | 2,337 | 2.671875 | 3 | [] | no_license | <?php namespace Nfreear\MoodleBackupParser;
/**
* Parser for 'section.xml' files within a Moodle backup MBZ.
*
* @copyright © Nick Freear, 13 May 2016.
* @copyright © 2016 The Open University.
*/
class SectionsParser
{
const SECTION_XML_FILE= '/section.xml';
protected $input_dir;
protected $sections... | true |
e6c0b3a9e6570f9e50ab00d1fd9eeabb2e03930f | PHP | contributte/rabbitmq | /src/Queue/Queue.php | UTF-8 | 507 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Contributte\RabbitMQ\Queue;
use Contributte\RabbitMQ\Connection\IConnection;
final class Queue implements IQueue
{
private string $name;
private IConnection $connection;
public function __construct(
string $name,
IConnection $connection
) {
$this->name = $name;
... | true |
0277d71aa7598663a9b5a8cb6ce623e5fb6f427c | PHP | nadavkav/RTL-BIDI-Hebrew-Moodle-Plugins | /course/format/project/backuplib.php | UTF-8 | 32,022 | 2.53125 | 3 | [] | no_license | <?php
/**
* Moodleから呼び出されるバックアップモジュール
*
* @param stream $bf
* @param object $preferences
* @return bool
*/
function project_backup_format_data($bf,$preferences) {
$status = true;
// コースセクション一覧を読み込む
// $preferences->sectionが設定されている場合は1つのタイトルのみ
if ( $sections = get_all_sections($p... | true |
1a6ca605cfce3d074fc3f5a10614decaa5fa7b67 | PHP | menasd/Collector_trial_types | /multipleChoiceGrader/display.php | UTF-8 | 1,486 | 2.875 | 3 | [] | no_license | <!--- AUTHOR: Tyson Kerr -->
<?php
/**
* To use this trial type, use multiple entries in the Text column of the
* procedure file to create the question and the possible responses.
*
* For example, if your text column contains:
* Which choice is best?|First|Second|Third
* participa... | true |
00a3b151c6f500b086dac59ff1ba112b350d5eb6 | PHP | AlexanderInHUST/cs2102_project | /model/Project.php | UTF-8 | 4,543 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: tangyifeng
* Date: 2018/3/3
* Time: 下午9:35
*/
class Project {
public $id;
public $title;
public $description;
public $start_date;
public $duration;
public $key_words;
public $categories;
public $funding_sought;
public $funding_now;
p... | true |
f410d75e918df5e45f9269d29f48181400c7e342 | PHP | cosmocode/dokuwiki-plugin-issuelinks | /helper/util.php | UTF-8 | 2,898 | 2.640625 | 3 | [] | no_license | <?php
/**
* DokuWiki Plugin Issuelinks (Helper Component)
*
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
* @author Andreas Gohr <dokuwiki@cosmocode.de>
*/
class helper_plugin_issuelinks_util extends DokuWiki_Plugin
{
/**
* Parse the link header received by DokuHTTPClient
*
* @par... | true |
dfef25cd9b552afe935ec14ffa24e44fac3d9876 | PHP | avassilenko/breadcrumbs | /src/Middleware/BreadcrumbsMiddleware.php | UTF-8 | 679 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Crumby\Breadcrumbs\Middleware;
use Crumby\Breadcrumbs\Breadcrumbs as Breadcrumbs;
use Closure;
class BreadcrumbsMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public functi... | true |
29774fdbd77747b60198cd0f2eb7ea174071b234 | PHP | bennami/introsymfony | /src/Controller/AboutMeController.php | UTF-8 | 807 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Routing\Annotation\Route;
class AboutMeController extends AbstractController
{
/**
* @Route("/aboutme", name="about_me")
*/
p... | true |
0e98514beba7ba69d5672c6d42388a8bc6bd599a | PHP | QuentinVB/Bloggin | /controlers/msgmanager.php | UTF-8 | 884 | 2.53125 | 3 | [] | no_license | <?php
$msg = "";
if(isset($_GET['msg']) && $_GET['msg'] == 0)
{
switch ($_GET['msg']) {
case 'add':
$msg = "Ajout réussi !";
break;
case 'delete':
$msg ="Suppression réussie !";
break;
case 'edit... | true |
4441da67da92ccd26467550809b4cab2f7453242 | PHP | AulisInternational/Aulis | /core/ViewEntry.php | UTF-8 | 1,171 | 2.546875 | 3 | [] | no_license | <?php
/*
|| Aulis
|| Organisation: Aulis International
|| Website: http://germanics.org/aulis
|| Developed by: Robert Monden
Thomas de Roo
|| License: MIT
|| Version: 0.01
|| * File information *
|| -> viewblog.php
| -> // This file contains the logic for the blog view
|| -> Last change: July, 2015
*/... | true |
8090e076a5776d62d10f1f0558f4e9a82b793832 | PHP | AriaAv/PHP-Samples | /chap10/chap10_sample26.php | WINDOWS-1250 | 359 | 3.4375 | 3 | [
"MIT"
] | permissive | <?php
class simpleclass
{
public $var=simpleclass;
public function displayvar() {
echo $var;
}
}
//************************************
class extendclass extends simpleclass
{
function displayvar()
{
echo "Extending class\n";
}
}
$extended = new extendclass();... | true |
7340c32bfc176e437693d96434c853f021f64a7b | PHP | tectronics/openpublisher | /modules/link/actions/ActionLinkAddKeyword.php | UTF-8 | 2,412 | 2.78125 | 3 | [] | no_license | <?php
// ---------------------------------------------
// Open Publisher CMS
// Copyright (c) 2006
// by Armand Turpel < opublisher@gmail.com >
// http://code.google.com/p/openpublisher//
// ---------------------------------------------
// LICENSE LGPL
// http://www.gnu.org/licenses/lgpl.html
// -----------------------... | true |
6cf9de9718081b0a1ef663c9ec48442842a157dc | PHP | SamiProAccount/Projets-Web | /BDD/biblio/updatebiblio.php | UTF-8 | 843 | 2.5625 | 3 | [] | no_license | <?php
include "../includes/database"
$servname="localhost";
if(@$_POST['id_bibliotheque']!=""){
$id_bibliotheque = $_POST['id_bibliotheque'];
$nom=$_POST['nom'];
$adresse=$_POST['adresse'];
$telephone=$_POST['telephone'];
try{
$dbco = new PDO("mysql:host=$servername;dbname=$dbname",$dbuser,$dbpass);
... | true |
4351d15c3af6cd820d2404866e923b08aa3c585e | PHP | Guiseven/Estudos-PW2 | /formulario corrigido/dadosfunc.php | UTF-8 | 444 | 2.546875 | 3 | [] | no_license |
<?php
$name = $_POST['nome'];
$idade= $_POST['idade'];
$estadocivil= $_POST['estadocivil'];
$cargo= $_POST['cargo'];
$salario= $_POST['salario'];
echo "Seu nome é: ".$name. "<br>";
echo "Sua idade é: ".$idade. "<br>";
echo "Seu estado civil é: ".$estadocivil. "<br>";
echo "Seu cargo é:".$cargo."<br>";
echo "Seu sa... | true |
da8dcf998a93a7052bcd47a734d1284167f6547a | PHP | Techies-Africa/devpilot_laravel | /src/Traits/Commands/ScriptTrait.php | UTF-8 | 1,570 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace TechiesAfrica\Devpilot\Traits\Commands;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableCell;
use Symfony\Component\Console\Helper\TableSeparator;
use TechiesAfrica\Devpilot\Traits\Commands\Errors\ErrorHandlerTrait;
trait ScriptTrait
{
use ErrorHandlerTrait;
... | true |
144582fa338f0af76d57c8838163fbcb543c2fbe | PHP | WPezBoilerStrap/wp-ezboilerstrap-uno | /setup/uno/class-wp-ezboilerstrap-add-image-size.php | UTF-8 | 6,225 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
if (! class_exists('Class_WP_ezBoilerStrap_Add_Image_Size') ) {
class Class_WP_ezBoilerStrap_Add_Image_Size{
public function __construct(){
add_action('init', array($this, 'ezbs_add_image_size') );
}
/**
* Note: If the "default" Modl changes then how we get the menu_args might also c... | true |
dbbbd3422dcc26b577c1f61d594bf2f3e375c367 | PHP | dianabalan/ticketing-petolio | /application/models/PoUsersCategories.php | UTF-8 | 1,312 | 2.734375 | 3 | [] | no_license | <?php
require_once('MainModel.php');
/**
* Add your description here
*
* @author Riffcode
* @copyright Riffcode
* @license http://riffcode.eu
*/
class Petolio_Model_PoUsersCategories extends MainModel
{
protected $_Id;
protected $_Name;
protected $_ParentId;
function __construct() {
$this->se... | true |
50a11ae2dd5bf5cdc403c8c4d913e579988a84e0 | PHP | Ryangr0/headfirst-design-patterns-php | /src/FactoryPattern/PizzaIngredientFactory.php | UTF-8 | 590 | 2.765625 | 3 | [] | no_license | <?php
namespace HeadFirst\FactoryPattern;
use HeadFirst\FactoryPattern\Ingredients\Cheese;
use HeadFirst\FactoryPattern\Ingredients\Clams;
use HeadFirst\FactoryPattern\Ingredients\Dough;
use HeadFirst\FactoryPattern\Ingredients\Pepperoni;
use HeadFirst\FactoryPattern\Ingredients\Sauce;
interface PizzaIngredientFacto... | true |
f3868d4848c0e88c668c8438a444a7c588757ca4 | PHP | Ab-Alselwi/tranzware-payment-gateway | /src/requests/PaymentGatewayHTTPClientResult.php | UTF-8 | 768 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ab\TranzWarePaymentGateway\Requests;
/**
* Class PaymentGatewayHTTPClientResult
*
* @package Ab\TranzWarePaymentGateway\Requests
*/
class PaymentGatewayHTTPClientResult implements PaymentGatewayHTTPClientResultInterface
{
private $info;
private $output;
/**
* PaymentGatewayHTTPCl... | true |
735e3aa120ca51d1c1fba72dc6e577f9903d875d | PHP | Gousto/replay | /src/RetryLogicException.php | UTF-8 | 962 | 2.96875 | 3 | [] | no_license | <?php
namespace Gousto\Replay;
use Exception;
/**
* Class RetryLogicException
*
* @package Gousto\Replay
*/
class RetryLogicException extends Exception
{
/**
* @var Exception
*/
protected $original_error;
/**
* @var Replay
*/
protected $replay;
/**
* RetryLogicExcep... | true |
9a84811a670b9386263ac7541acccfc5ca0fc43e | PHP | itbdw/restudy-php | /langref/code/namespace.php | UTF-8 | 368 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: zhaobinyan
* Date: 2018/7/22
* Time: 下午8:14
*/
namespace China;
class People {
public static $color = ['yello'];
}
/*------------*/
namespace USA;
class People {
public static $color = ['yello', 'white', 'black'];
}
var_dump(\China\People::$color);
var_dump(\USA... | true |
7bc1e04ad644bae9de429241b2d964bbe0149f01 | PHP | fesavali/school-system | /includes/logic/userSignup.php | UTF-8 | 1,504 | 2.53125 | 3 | [
"LicenseRef-scancode-other-permissive"
] | permissive | <?php
include 'config.php';
session_start();
$username = "";
$email = "";
$errors = [];
// SIGN UP USER
if (isset($_POST['signup_btn'])) {
$username= mysqli_real_escape_string($conn,htmlspecialchars($_POST['username']));
$password_1= mysqli_real_escape_string($conn,htmlspecialchars($_POST['password']));
$password_2= ... | true |
601294d2e741e92d304a2015adc1d9ba3f57c44b | PHP | svick/Wikipedia-cleanup-listing | /pub/Index.php | UTF-8 | 1,821 | 2.5625 | 3 | [] | no_license | <?php
//Svick
//PD October 2010
//Version .1
//For Cleanup Listing
require_once 'TableWriterFactory.php';
$ts_pw = posix_getpwuid(posix_getuid());
$ts_mycnf = parse_ini_file($ts_pw['dir'] . "/.my.cnf");
$con = mysql_connect('enwiki-p.userdb.toolserver.org', $ts_mycnf['user'], $ts_mycnf... | true |
4474846d844e5d83bc791e577b1a67f821762ffa | PHP | Yeab5ira/Exam-Taking-Tool-For-Schools | /includes/signin.incl.php | UTF-8 | 1,407 | 2.5625 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST["signin"])){
include_once "db.incl.php";
$username = mysqli_real_escape_string($conn, $_POST['un']);
$password = mysqli_real_escape_string($conn, $_POST['pass']);
// empty field check
if(empty($username) || empty($password)){
// echo "Please fill in... | true |
c9f4373517e3abc1d139a72b6e4cfc0f0607d911 | PHP | mastercba/cerexserver | /backend/admin/inicia.php | UTF-8 | 2,866 | 2.640625 | 3 | [] | no_license | <?php
require("../config.php");
//recupero variables
//creo variables
// At the top of the page we check to see whether the user
if(empty($_SESSION['usuario'])){ //is logged in or not
// If they are not, we redirect them to the login page.
header("Location: /cerexserver/formlogin.h... | true |
4a5ef199d869d4564d9f9d7743f63e0538e37872 | PHP | vucongthanh92/Amely-API | /classes/services/AdvertiseService.php | UTF-8 | 5,626 | 2.515625 | 3 | [] | no_license | <?php
/**
*
*/
class AdvertiseService extends Services
{
protected static $instance = null;
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new self();
}
return self::$instance;
}
public function __construct()
{
$this->table = "amely_advertisements";
... | true |
e439fad5d342293f702b558e3989ee4fdf130360 | PHP | sapnabohra/ShopGadgets | /index.php | UTF-8 | 662 | 2.53125 | 3 | [] | no_license | <?php
try
{
$pdo = new PDO('mysql:host=localhost;dbname=lsmarketplace', 'root', 'root123');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec('SET NAMES "utf8"');
}
catch (PDOException $e)
{
$error = 'Unable to connect to the database server.';
include 'error.html.php';
exit();
}
... | true |
6ed3596c37a17c85170ef1ea5b55ac28c259d098 | PHP | lightsalt9610/game_minesweeper | /game_minesweeper/mine/tem.php | UTF-8 | 334 | 2.78125 | 3 | [] | no_license | <?php
include "minesweeper_setupsquare.php";
include "minearray.php";
setup_square(10,10);
for ($i = 0; $i < count($number); $i++) {
if ($i % 10 == 0) {
echo "\n";
}
echo $number[$i] . " ";
usleep(20000);
}
$test = search_around(10,3,10,3,22);
var_du... | true |
f0a48959ec0f687c28dba53784e2808a970a29fe | PHP | gabix/Pruebas | /tirameLaGoma/natuGraf/epc/app/Console/Abm/helper/ModelCreator.php | UTF-8 | 2,407 | 2.796875 | 3 | [] | no_license | <?php
class ModelCreator {
protected $table_name;
protected $fields = array();
protected $validations = array();
public function __construct($table_name) {
$this->table_name = $table_name;
}
public function addField(array $field) {
if($field['name'] !== $this->table_name.'_id'){
if ($field... | true |
fd2e876477dcd25312a52e38354a25ab534e6f62 | PHP | mumingv/php | /syntax/class_object/final/final_test1.php | UTF-8 | 1,043 | 3.015625 | 3 | [] | no_license | <?php
/***********************************************************
* FileName: final_test1.php
* Desc: final关键字使用示例
* Author: Jie Yin
* Email: mumingv@163.com
* HomePage: https://github.com/mumingv
* Version: 0.0.1
* LastChange: 2016-03-24 16:09:08
* History:
**********... | true |
87be74793acde6f8796a21fd2a4994f069213920 | PHP | themayukhbasu/collegepodium | /votetest.php | UTF-8 | 2,842 | 2.65625 | 3 | [] | no_license | <?php
include 'database.php';
if ($_GET['vote']==1) {
$stmt = $connection->prepare("SELECT vote_val FROM votedata WHERE user_id = ? AND post_id = ?");
$stmt->bind_param('si',$user, $pid);
$user = $_GET['user'];
$pid = $_GET['id'];
$stmt->bind_result($vote_val);
$flag = 1;
$stmt->execute();
if ($s... | true |
fbc8c4b14669cb6b6082fb05f50b3333a1d32e39 | PHP | humanmade/vip-mu-plugins-public | /shared-plugins/livepress/php/livepress-template.php | UTF-8 | 4,888 | 2.53125 | 3 | [] | no_license | <?php
/**
* LivePress template
*/
/**
* LivePress template.
*
* @param bool $auto Optional. Auto. Default false.
* @param int $seconds_since_last Optional. Seconds since last update. Default 0.
* @return mixed|string
*/
function livepress_template( $auto = false, $seconds_since_last = 0 ) {
glo... | true |
adef8429aeb0321e7dbcdec1d867572148540a2f | PHP | exonet/securemessage | /tests/SecureMessageTest.php | UTF-8 | 3,881 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Exonet\SecureMessage\tests;
use Exonet\SecureMessage\SecureMessage;
use PHPUnit\Framework\TestCase;
/**
* @internal
*/
class SecureMessageTest extends TestCase
{
public function testWipeKeysFromMemory()
{
$secureMessage = new SecureMessage();
$secureMessage->setDatabaseKey('... | true |
d8680960512261335637cda64a3b8d5f9eb0239d | PHP | setevn/light-tips | /dataStructure/LinkedList/LinkedList.php | UTF-8 | 7,926 | 3.75 | 4 | [
"MIT"
] | permissive | <?php
namespace DataStructure\LinkedList;
/**
* Class LinkedList
* @package DataStructure\LinkedList
* |------------------------------------
* | |----|----| |----|----| |----|
* | | 12 | ---> | 24 | ---> | |
* | |----|----| |----|----| |----|
* |------------------------------------
*/
clas... | true |
296422a7a8c79797132dbdc332e9926fc0bfbf73 | PHP | nguyenducduy/multi-product-ecommerce | /classes/core/backend/class.newslettertask.php | UTF-8 | 7,872 | 2.65625 | 3 | [] | no_license | <?php
/**
* Quan ly viec goi newsletter cho 1 email
*/
Class Core_Backend_NewsletterTask extends Core_Backend_Object
{
public $nid = 0;
public $id = 0;
public $sendcount = 0;
public $issent = 0;
public $issentsuccess = 0;
public $toname = '';
public $toemail = '';
public $touserid = 0;
public $datecreated = 0... | true |
2cac605295022ae782d1bc7545b9309d5dbf5121 | PHP | xuguotao/spider | /app/Services/BaseService.php | UTF-8 | 1,041 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
class BaseService
{
protected function curlPost($url, $postData, $headers)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setop... | true |
e3b92866900aef4d155d8a07a6e61f48c3454700 | PHP | kimaditiya/klinik_sehat | /common/components/AmbilKeycodeComponent.php | UTF-8 | 2,105 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\components;
use Yii;
use yii\base\Component;
// models obat
use backend\master\models\Obat;
use backend\stock\models\StockObatheader;
use backend\master\models\Pasien;
use backend\master\models\RekamHeader;
class AmbilKeycodeComponent extends Component {
/**
*@author wawan
*genera... | true |
e0b828bf6cf0d92e1a05cee886b885420b750640 | PHP | europeana/EuropeanaCopeBolt | /extensions/bundles/europeana/zohoimport/src/Console/ZohoImportCommand.php | UTF-8 | 3,586 | 2.6875 | 3 | [] | no_license | <?php
namespace Bolt\Extension\Europeana\ZohoImport\Console;
use Bolt\Nut\BaseCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Nut command for t... | true |
d4caec70a6f966f10a74a17aa89beea37bc9b8df | PHP | olgaaape/Mini-Proyecto | /Ejercicios04/04procesa.php | UTF-8 | 1,177 | 3 | 3 | [] | no_license | <?php
$nombre = $_REQUEST["nombre"];
$clave= $_REQUEST["contraseña"];
$semaforo= $_REQUEST["color"];
if(isset($_REQUEST["publicidad"]) == "on"){
$publicidad = "Publicidad SI";
} else {
$publicidad=" NO publicidad";
}
$solucion = " ";
$ingles="Ingles,"; $frances = "Frances,"; $aleman="Aleman";
if( i... | true |
0ec65a6bf4cff15b3d62aa587aed978e415c06b8 | PHP | johnwanjema/students-dashboard | /app/Http/Controllers/StudentController.php | UTF-8 | 3,577 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Student;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class StudentController extends Controller
{
public function index()
{
$students = Student::orderBy('firstName','DESC')->get();
return api_response(true,null, ... | true |
660320ea1727cd6de550260326dfca2b4f457b68 | PHP | david1792/helirep | /listarProductos.php | UTF-8 | 1,960 | 2.546875 | 3 | [] | no_license | <?php
session_start();
require('DAO/ProductoDAO.php');
require('util/Conexion.php');
if(isset($_SESSION['rol']) || $_SESSION['rol'] === 1){
$productoDAO = new ProductoDAO();
$listarProductos = $productoDAO->listarProductos();
?>
<!DOCTYPE html>
<html>
<head>
<?php include("template/tem... | true |
fa015f2853111c8102a8b6af91799d96b4ecdb87 | PHP | phpmywave/phpMyWave | /phpmywave/library/phpMyWave/BlipContent/Abstract.php | UTF-8 | 1,185 | 3.171875 | 3 | [] | no_license | <?php
/**
* An abstract class that models a blip content.
*
* @author Frank Ruske <frank.ruske@mayflower.de>
*
*/
abstract class phpMyWave_BlipContent_Abstract
{
/**
* constructor
*/
public function __construct() {
}
/**
* Returns the textual representation of of this blip content,... | true |
1d195d45cefad961af559205a341231d9a340dd3 | PHP | JozamProject/JOZAM | /JOZAM_PROJECT/Calendar/RecurringEvent.php | UTF-8 | 9,035 | 3.4375 | 3 | [] | no_license | <?php
use Collections\ArrayCollection;
require_once ('Collections/ArrayCollection.php');
require_once ('CalendarDate.php');
require_once ('CalendarEvent.php');
require_once ('CalendarTime.php');
/**
* A RecurringEvent is a way to generate recurring events
* such as weekends, lunch breaks, morning and aftern... | true |
ab4f8dfd3532a1f7f31b3cc0bfd761d9bcdf2b58 | PHP | choccybiccy/decision | /tests/Factor/ComparisonFactorTest.php | UTF-8 | 1,487 | 2.75 | 3 | [] | no_license | <?php
namespace Choccybiccy\Decision\Factor;
use Choccybiccy\Decision\TestCase;
/**
* Class ComparisonFactorTest.
*/
class ComparisonFactorTest extends TestCase
{
/**
* Test score works as expected
*/
public function testScore()
{
$value = mt_rand(1, 100);
$comparisonValue = m... | true |
d93d6b5072325178041ea037940c7bb4790b1c25 | PHP | Sophie36/gourmandisesarl | /include/executeRequete.php | UTF-8 | 318 | 2.71875 | 3 | [] | no_license | <?php
function executeRequete($cnx, $sql, $parametre=NULL){
if($parametre==NULL){
// requete simple
$idRequete=$cnx->query($sql);
} else {
// requete preparé
$idRequete = $cnx->prepare($sql);
$idRequete->execute($parametre);
}
return $idRequete;
}
| true |
306caa4a6e6cae97529f460a0db3bd62580ee342 | PHP | MajdaNaf/Neo4J-REST-PHP-API-client | /tests/GraphDatabaseServiceTest.php | UTF-8 | 7,859 | 2.625 | 3 | [] | no_license | <?php
require_once 'Neo4jRestTestCase.php';
use Neo4jRest\GraphDatabaseService as GraphDatabaseService;
use Neo4jRest\Neo4jRest_HttpException as Neo4jRest_HttpException;
use Neo4jRest\Neo4jRest_NotFoundException as Neo4jRest_NotFoundException;
class GraphDatabaseServiceTest extends Neo4jRestTestCase
{
... | true |
f19bf5fa62771c0eff3e517c63ca977b9a23e02f | PHP | fitnessshopweb/produit | /BACKPRODUIT/core/userC.php | UTF-8 | 2,721 | 2.625 | 3 | [] | no_license | <?PHP
include "../views/config.php";
class UserC {
function afficherUsers(){
$sql="SElECT * from users";
$db = config::getConnexion();
try{
$liste=$db->query($sql);
return $liste;
}
catch (Exception $e){
die('Erreur: '.$e->getMessage());
}
}
function userStat(){
$sql="SE... | true |
c629b3c03560c8c9b71c00dc3b59eccbf1a86565 | PHP | federfelipe/parlamentojuvenil | /app/Data/Entities/School.php | UTF-8 | 303 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Data\Entities;
use App\Base\Model;
class School extends Model
{
protected $table = 'schools';
public function state()
{
return $this->belongsTo(City::class);
}
public function subscriptions()
{
return $this->hasMany(Subscription::class, 'school', 'name');
}
}
| true |
cf33f8bd8e403d095a30e476a460b44b45916aa5 | PHP | chuy873/sigii | /control/EditarModelo.php | ISO-8859-1 | 8,000 | 2.578125 | 3 | [] | no_license | <?php
/*
* Control editarModelo
* Editar los modelos verticales y horizontales y registrarlos en la base de datos.
*/
//Verificar si el usuario tiene acceso
include "../clases/Usuarios.php";
session_start();
//Verificar si el usuario tiene permiso para visualizar esta página
$usuariologueado = new Usuarios();
$usuario... | true |
05d53348bcf0e410ddae2c988643e3aaabc6bf84 | PHP | conorsmith/hoarde | /src/Domain/LocationTemplate.php | UTF-8 | 536 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace ConorSmith\Hoarde\Domain;
final class LocationTemplate
{
/** @var Location */
private $location;
/** @var iterable */
private $entities;
public function __construct(Location $location, iterable $entities)
{
$this->location = $location;
... | true |
06d686cc66729e3ea61d0a91b0fe8fb533482488 | PHP | kvngcheerio/bookstore | /app/Api/V1/Traits/HasPictures.php | UTF-8 | 2,467 | 2.875 | 3 | [] | no_license | <?php
namespace App\Api\V1\Traits;
use App\Api\V1\Models\Picture;
use Exception;
trait HasPictures
{
protected $uploadDir = null;
protected $maxPictures = 5; //maximum number of pictures a good item is allowed
public function pictures()
{
return $this->belongsToMany('App\Api\V1\Models\Pictu... | true |
7b84d7db8dd62304afb4022597d534ad88654f1f | PHP | breatheco-de/api | /api/src/handlers/ProfileHandler.php | UTF-8 | 5,693 | 2.71875 | 3 | [] | no_license | <?php
use Slim\Http\Request as Request;
use Slim\Http\Response as Response;
use Helpers\BCValidator;
use Helpers\ArgumentException;
class ProfileHandler extends MainHandler{
protected $slug = 'Profile';
public function getSingleProfile(Request $request, Response $response) {
$profileId = $request->g... | true |
ceb5e9c92f95616a2be455693342f0e51264e9f2 | PHP | dredom/jenandjane | /jewel/ProductController.class.php | UTF-8 | 1,866 | 2.578125 | 3 | [] | no_license | <?php
class ProductController extends BaseController2 {
public $productDataManager;
public $function;
public function handle() {
switch ($this->function) {
case 'getPurchasePageData':
$this->getPurchasePageData();
break;
}
return $this->template;
}
private function getPurchasePageData(){
//e... | true |
b8efcf1da0cdc6304e971069cdb21c58a53216aa | PHP | malakaton/ActivityItineraryManagement | /symfony/tests/Student/Application/EvaluateActivity/EvaluateActivityCommandMother.php | UTF-8 | 1,618 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Academy\Tests\Student\Application\EvaluateActivity;
use Academy\Activity\Domain\ActivityId;
use Academy\Evaluation\Domain\EvaluationAnswer;
use Academy\Evaluation\Domain\EvaluationInvertedTime;
use Academy\Itinerary\Domain\ItineraryUuid;
use Academy\Student\Application\Evalua... | true |
b4328b407511ff903c43759c63a3f1037c6b89c1 | PHP | abrs/charity | /app/Models/Notification.php | UTF-8 | 1,285 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Notification
{
public static function sendToUser($token, $title, $body, $data)
{
$fcmUrl = 'https://fcm.googleapis.com/fcm/send';
$notification = [
'title' => $title,
'body' => $body,
... | true |
a35c9797bebb7e5ccc72ad4204512b3b77555d14 | PHP | detkhan/apk | /โรงเลื่อย/โรงเลื่อย API และ Backend/app-for-management-api/app/Http/Requests/UtilityRequest.php | UTF-8 | 627 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class UtilityRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
*... | true |