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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
47eb7310ec60a5ce2e4a31f54aece09c6ce935fe | PHP | gabimanea/php-mvc-framework | /system/Router.php | UTF-8 | 2,380 | 2.921875 | 3 | [] | no_license | <?php namespace System;
class Router
{
protected $request;
protected $route;
protected $routes = [];
protected $urlPattern;
protected $basePath;
protected $match = [];
protected $params = [];
public function __construct(Request $request, RouteCollection $route, $basePath)
{
$this->request = $request;
$t... | true |
58df024300bc900a36738c132b248e6a525d6393 | PHP | MuradHRo/talkguide | /handlers/data.php | UTF-8 | 13,728 | 2.984375 | 3 | [] | no_license | <?php
class dataFetch{
private $connection;
private $tableName;
private $page;
private $limit;
public function __construct($connection,$tableName,$limit,$page){
$this->connection = $connection;
$this->tableName = $tableName;
$this->page= $page;
$this->limit= $limit;
... | true |
4afb30a75e81456323f5876118a6de8589f9e06a | PHP | jcscott2015/various_code_samples | /php/Pager.php | UTF-8 | 3,978 | 3.4375 | 3 | [] | no_license | <?php
/**
* Script Name: Pager.php
* Author: John C. Scott
* Copyright 2005 Scott Communications
* Created: 4/17/05
* Modified: 2/15/08
*
* Description:
* PHP 5 class for building multiple page links. Assumes mySQL database.
*
* TODO:
* Probably should consolidate this more. Make use of __destruct?
*/
cl... | true |
3e93a8c64b126aa685a1545c218ca7ca5d0323a4 | PHP | nataliabrzeska/TechnologieMultimedialneBrzeskaBulsiewiczLupina | /apache2/www/krzys/serv.php | UTF-8 | 599 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
require 'class.PHPWebSocket.php';
// Funkcja będzie wywoływana przy każdej przychodzącej wiadomości
function wsOnMessage($clientID, $message, $messageLength, $binary) {
global $Server;
// wypisujemy w konsoli to, co przyszło
printf("Client %s sent: %s\n",$clientID,$message);
// odsyłamy wi... | true |
d986f258c930e1617838040b33177607639b7e29 | PHP | mikanyman/home_heli-legacy | /www/rockart3/hallinta/includes/func_gallery.php | UTF-8 | 4,098 | 2.96875 | 3 | [] | no_license | <?php
/* func_gallery.php
Gallerian funktiot
*/
function image_information($original_file)
{
// Ottaa tarkistettavan tiedoston nimen ja tarkistaa sen tiedostopaatteen valittamatta tiedostonimesta, toimii kuville
$type = getimagesize($original_file);
$filesize = filesize($original_file);
// Tarkistet... | true |
365b04dab69a8a61137b08cc0be78afbbace8028 | PHP | dinevillar/epesi-telemarketing | /console/SearchClearCommand.php | UTF-8 | 1,631 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Epesi\Console;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
class SearchClearCommand extends... | true |
fa616ca9d3e2f25a5a9759e1efa1a42f253a943b | PHP | Glenn332/GlennMVC | /App/Handlers/ControllerHandler.php | UTF-8 | 411 | 3.078125 | 3 | [] | no_license | <?php
namespace App\Handlers;
class ControllerHandler{
public $ControllerName;
public $Arguments;
public function __construct($controllerName, $arguments){
$this->ControllerName = $controllerName;
$this->Arguments = $arguments;
}
public function ... | true |
9d4e03a2a953decac11e7dd9b2679d95a44d57b2 | PHP | advocaite/syscrack | /src/Views/BaseClasses/Middleware.php | UTF-8 | 1,717 | 2.953125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Framework\Views\BaseClasses;
/**
* Lewis Lancaster 2017
*
* Class Middleware
*
* @package Framework\Views\BaseClasses
*/
use Framework\Application\Render;
use Framework\Application\Settings;
use Framework\Views\Structures\Middleware as Structure;
/**
* C... | true |
2deb50483ee0b67e8ede37f277dc8bdf12682983 | PHP | edevaldo99/mvc_simples_ | /Controller.php | UTF-8 | 302 | 2.609375 | 3 | [] | no_license | <?php
require 'Model.php';
require 'View.php';
class Controller{
public function index(){
$model = new Model();
$view = new View();
$view->mostrar($model->bemVindo());
}
public function erro(){
$model = new Model();
$view = new View();
$view->mostrar($model->error404());
}
}
?> | true |
e5282e577c378bbfa4776eebcc911945995ea262 | PHP | valentynvalikov/globe_news_oop | /includes/database.class.php | UTF-8 | 1,638 | 3.078125 | 3 | [] | no_license | <?php
require_once(LIB_PATH . DS . "config.php");
class MySQLDatabase
{
public $connection;
public function __construct()
{
$this->openConnection();
}
public function openConnection()
{
$this->connection = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
if (mysq... | true |
1a0042d5c7d34be656f3ce5f6f92a80bf169255d | PHP | AllanBaron/test-loginfo | /config/Migrations/20190815143557_Itens.php | UTF-8 | 1,794 | 2.765625 | 3 | [] | no_license | <?php
use Migrations\AbstractMigration;
class Itens extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()
{
... | true |
bc8bdf05ed30081f9eafe422325ddd646e9fddd2 | PHP | mpoiriert/nucleus | /src/Nucleus/View/BaseExtensionRenderer.php | UTF-8 | 1,512 | 2.65625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Nucleus\View;
use \Nucleus\IService\View\ITemplateRendererService;
/**
* Description of BaseExtensionRenderer
*
* @author Martin
*/
abstract class BaseExtensionRenderer implements ITemplateRendere... | true |
f5ed7f91f7a65ee81f6330a070a72217e1a3a330 | PHP | solvecase/telenorbulksms | /src/TelenorMessage.php | UTF-8 | 1,575 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace SolveCase\TelenorBulkSms;
class TelenorMessage {
public $payload = [];
public static function create($content = ''){
return new static($content);
}
public function __construct($content = ''){
$this->content($content);
$this->payload['sender'] = [
... | true |
c2c528324ab78a3b944058d419c7847e87ccc2c1 | PHP | deza395/diypackaging | /app/Http/Controllers/UserController.php | UTF-8 | 2,465 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Auth;
use App\Product;
use Illuminate\Http\Request;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
public function show... | true |
e0f37a12d3e08d641a740d4d1d37a29aa670c987 | PHP | yvoyer/backlog-velocity | /tests/Agile/Domain/Builder/BacklogBuilderTest.php | UTF-8 | 2,266 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php declare(strict_types=1);
namespace Star\BacklogVelocity\Agile\Domain\Builder;
use PHPUnit\Framework\TestCase;
use Star\BacklogVelocity\Agile\Domain\Model\Project;
use Star\BacklogVelocity\Agile\Domain\Model\Sprint;
use Star\BacklogVelocity\Agile\Domain\Model\TeamModel;
final class BacklogBuilderTest extends Te... | true |
342d58714d6ab73dfa62175963ea0648cddbff15 | PHP | ifl-geovis/her-fort | /aufbereitung.php | UTF-8 | 14,897 | 2.546875 | 3 | [] | no_license | <?php
$sourceFolder = "sourcedata/";
$outputFolder = "importdata/";
require_once './lib/PHPExcel/PHPExcel/IOFactory.php';
require_once( './sourcedata/formate.php');
require("phar://lib/neo4jphp.phar");
//require_once('./lib/XLS.php');
/*
// Zur Zeit deaktiviert
use Everyman\Neo4j\Client,
Everyman\Neo4j\Index\... | true |
2067baede2e3c420d91d434da8b8caa18d544dad | PHP | vinyogaesh/BirthRegis | /admin/login.php | UTF-8 | 788 | 2.546875 | 3 | [] | no_license | <?php
// Inialize session
session_start();
// Include database connection settings
include('conf.inc');
// Retrieve username and password from database according to user's input
$login = mysql_query("SELECT * FROM users WHERE (username = '" .$_POST['username'] . "') and (password = '" . md5($_POST['password']) . "')... | true |
4cfb436beb5f162d15b04fb61aa9da36bd481337 | PHP | nekoTheGreat/CustomerMgt | /app/Models/Customer.php | UTF-8 | 279 | 2.609375 | 3 | [
"MIT"
] | permissive | <?
namespace App\Models;
class Customer extends User{
protected $hidden = ['type'];
protected $required_values = ['type'=>'customer'];
public function __construct(array $attributes = []){
parent::__construct($attributes);
$this->forceFill($this->required_values);
}
} | true |
6f8cc8928202aab99c7e84314c64e6fda3920681 | PHP | steph/user | /src/Black/Component/User/Infrastructure/Password/Encoder.php | UTF-8 | 698 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Black\Component\User\Infrastructure\Password;
/**
* Class Encoder
*
* @author Alexandre Balmes <${COPYRIGHT_NAME}>
* @license ${COPYRIGHT_LICENCE}
*/
final class Encoder
{
/**
* @param $password
* @param $salt
*
* @return bool|string
*/
public static function enco... | true |
22c15c7ad059ff72cfeadb4c856afa40a1e990b4 | PHP | eyebug/itearoa-i_iam | /application/library/convertor/Ascott.php | UTF-8 | 4,004 | 2.515625 | 3 | [] | no_license | <?php
/**
* 雅士阁生活数据转换器
*/
class Convertor_Ascott extends Convertor_Base {
/**
* 标签列表转换器
* @param array $list
* @return array
*/
public function typeListConvertor($list) {
$data = array(
'code' => intval($list['code']),
'msg' => $list['msg']
);
... | true |
7e55e24ffc6c44d05397ec1712aa9623326e152c | PHP | etime/Edian | /edian/application/views/bgUserList.php | UTF-8 | 1,625 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>用户的列表</title>
</head>
<style type="text/css" media="all">
table{
border-spacing:0;
width:100%;
}
td{
padding:5px;
text-align:center;
}
</style>
<?php
$si... | true |
a0dca9f641322409e1a46fa0f8385f80afc2aad5 | PHP | MrMaceke/Xitsonga-Web-maste | /Xitsonga-Web/php/ActivationEntity.php | UTF-8 | 1,333 | 2.9375 | 3 | [] | no_license | <?php
require_once 'DbTable.php';
/**
* Entity for table "activations"
*
* @Author Sneidon Dumela <sneidon@tsongaonline.co.za>
* @version 1.0
*/
class ActivationEntity extends DbTable{
private $userId;
private $activationKey;
private $activationStatus;
... | true |
de851fdbf0842a7132e1fa5d6350fc7277fc63b8 | PHP | EwaldJa/ProjetLaravel | /app/Http/Controllers/EngagementController.php | UTF-8 | 4,149 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\InsertionEngagementRequest;
use App\Http\Requests\SuppressionImageEngagementRequest;
use App\Metier\Image;
use App\Metier\Engagement;
use App\Modeles\EngagementDAO;
class EngagementController extends Controller
{
//Selection de tous les Engagements
... | true |
a88967cd2dfa9d5684cd9c961c85eb94a3fb0e43 | PHP | Nayeem1996/tripsCoursework | /app/Http/Controllers/TripCoordinatorController.php | UTF-8 | 3,150 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\TripCoordinator;
use Illuminate\Http\Request;
class TripCoordinatorController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth:tripCoordinator')... | true |
23a90fc97d79677a60b67184d4b88d52c57914ff | PHP | wilrona/WhatMissOrangina | /framework/app/Controllers/PhaseController.php | UTF-8 | 3,410 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Models\Phase;
use TypeRocket\Controllers\WPPostController;
class PhaseController extends WPPostController
{
protected $modelClass = Phase::class;
public function update($id = null)
{
$this->validation = [
'statut' => 'required',
'l... | true |
80d961ae73608a36e3c51a2d9ca7ff92824ecf52 | PHP | kirillwebdeveloper/Investment | /app/Service/Manager/Contact/ContactMessageManager.php | UTF-8 | 1,499 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Service\Manager\Contact;
use App\Entity\ContactMessage;
use App\Http\Requests\ContactRequest;
use App\Repository\Contact\ContactMessageRepository;
use App\Service\Repository\BaseRepository;
class ContactMessageManager
{
/**
* @var BaseRepository
*/
protected $baseRepository;
... | true |
1156000f712cf885e30a47c3214d25f9599500f3 | PHP | dragosprotung/stc-strava | /src/API/Authentication.php | UTF-8 | 4,436 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace SportTrackerConnector\Strava\API;
use GuzzleHttp\Client;
use GuzzleHttp\Cookie\CookieJarInterface;
final class Authentication
{
private const URL_LOGIN_GET = 'https://www.strava.com/login';
private const URL_LOGIN_POST = 'https://www.strava.com/session';
priv... | true |
62b6043461d59c812c32211ac27b1be575cc5846 | PHP | WordPress/wordpress.org | /wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/tools/class-stats-report.php | UTF-8 | 16,543 | 2.5625 | 3 | [] | no_license | <?php
namespace WordPressdotorg\Plugin_Directory\Admin\Tools;
use WordPressdotorg\Plugin_Directory\Template;
use WordPressdotorg\Plugin_Directory\Clients\HelpScout;
/**
* All functionality related to Stats_Report Tool.
*
* @package WordPressdotorg\Plugin_Directory\Admin\Tools
*/
class Stats_Report {
/**
* Fetc... | true |
f307c88ad31ff76302965b7a311cb25b1d8eda88 | PHP | Emitsu55/bienes_raices_MVC | /models/vendedor.php | UTF-8 | 1,296 | 3.328125 | 3 | [] | no_license | <?php
namespace Model;
class Vendedor extends ActiveRecord {
protected static $columnasDB = ['id', 'nombre', 'apellido', 'telefono'];
protected static $tabla = 'vendedores';
//Atributos
public $id;
public $nombre;
public $apellido;
public $telefono;
//constructor
public functio... | true |
e9989848c4c6cdbfd1e44eba88b6674bac19e811 | PHP | ChildressAgency/jaxsonpoint | /functions/button-shortcode.php | UTF-8 | 2,386 | 2.84375 | 3 | [] | no_license | <?php
/*
* This custom shortcode creates a bootstrap button.
*
* The type can be one of: (1, 2), which will determine
* primary/secondary.
*/
function button_function( $atts, $content = null ) {
extract(shortcode_atts(array(
'link' => '#',
'type' => '1'
), $atts));
$return_string = '<a href=... | true |
ab3c0e7ae8eef6b58b7ee4a30e362c3034dc2d83 | PHP | tripleddd21/nhan2000 | /dao/gallery.php | UTF-8 | 1,040 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
function gallery_insert($tengallery,$hinhanhgallery){
$sql = "INSERT INTO gallery(Ten_gallery,Hinh_anh) VALUES(?,?)";
pdo_execute($sql,$tengallery,$hinhanhgallery);
}
function gallery_update($magallery,$tengallery,$hinhanhgallery){
$sql = "UPDATE gallery SET Ten_gallery=?,Hinh_anh=? WHERE Ma_gallery=?"... | true |
80d5e2b81495044a079b00c84528a37f8902d6bd | PHP | mangati/php-ldap | /src/Mangati/Ldap/Entry/Entry.php | UTF-8 | 2,480 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Mangati\Ldap\Entry;
use Mangati\Ldap\Attribute\Attribute;
use Mangati\Ldap\Attribute\AttributeCollection;
use Mangati\Ldap\Attribute\TextAttribute;
/**
* Entry
*
* @author Rogério Lino <rogeriolino@gmail.com>
*/
class Entry
{
/**
* @var string
*/
private $dn;
/**
... | true |
c94c886631b20c211d7614de4c4f683ab5275a73 | PHP | jqhph/neta-server | /src/kernel/ORM/DB/Mongo.php | UTF-8 | 2,540 | 2.796875 | 3 | [] | no_license | <?php
namespace NetaServer\ORM\DB;
class Mongo
{
private $host;
private $port;
private $user;
private $pwd;
private $db;
private $mongo;//数据库连接
private $mongoDB;//选择数据库
private $collection;
public function __construct(array $dbinfo = null)
{
ini_set('default_socket_tim... | true |
24744a07916a7d3697990204411c91f8ba5f8e0b | PHP | dtomasch/electric-construction-tingalls | /functions/enqueue-scripts.php | UTF-8 | 10,314 | 2.5625 | 3 | [] | no_license | <?php
//--------------------------------------------------------------
//--------------------------------------------------------------
//
//
// *** Use ACF to create a ACF Style Sheet ***
// https://www.designly.net/dynamic-css-in-wordpress-with-advanced-custom-fields/
//
//
//----------------------------------------... | true |
b6dc6a1ee722bcb0d80bfe63603d240cf0887503 | PHP | rockyfangchao/yii2-smart-rbac | /models/Auth.php | UTF-8 | 2,109 | 2.6875 | 3 | [] | no_license | <?php
namespace smart\rbac\models;
use Yii;
/**
* This is the model class for table "smart_auth".
*
* @property int $auth_id 权限id
* @property string $auth_name 权限名称
* @property string $auth_desc 描述
* @property string $action_ids 多个actionId用逗号分隔
* @property int $create_at 创建时间
* @property int $update_at 更新时间
... | true |
bb68391a7c9be58a03f0a3da40e1cd571f165f55 | PHP | dalianmuch/IT-Forum | /cs5200-project-master/banlist.php | UTF-8 | 1,040 | 2.515625 | 3 | [] | no_license | <?php
session_start();
include 'connect.php';
include 'header.php';
if ($_SESSION['user_id'] == 1) {
$sql = "select ban_user_id, ban_category_id, user_name from ban join users on ban_user_id = user_id";
}
else {
$sql = "select ban_user_id, ban_category_id, user_name from ban join users on ban_user_id = user_i... | true |
d14210d0f405b7bfcf2f98ad0699ee4b4d6f68d3 | PHP | pusachev/design_patterns | /src/MageNet/DesignPatterns/Creational/AbstractFactory/JsonText.php | UTF-8 | 310 | 2.53125 | 3 | [] | no_license | <?php
/**
* @author Pavel Usachev <webcodekeeper@hotmail.com>
* @copyright Copyright (c) 2018, Pavel Usachev
*/
namespace MageNet\DesignPatterns\Creational\AbstractFactory;
class JsonText extends Text implements TextInterface
{
/** {@inheritdoc} */
public function getText()
{
return json_encode... | true |
3f760941718a09106bb10aaa96fe4308acbd6720 | PHP | dhruvnpatel/web_mini_project | /WebProject7thSem(updated)/contact.php | UTF-8 | 460 | 2.609375 | 3 | [] | no_license | <?php
require 'navbar.php';
require 'connect.php';
$query="SELECT * FROM contacts";
$result= mysqli_query($conn, $query);
echo '<table><th>Name</th><th>Designation</th><th>Phone</th><th>Email</th>';
while($row= mysqli_fetch_array($result))
{
echo '<tr><td>'.$row['name'].'</td>';
echo '<td>'.$row['designation']... | true |
f1af050151e751dcf0f15d41d89295853d355097 | PHP | pritom-dip/toiree-restaurant | /inc/class-short-code.php | UTF-8 | 1,463 | 2.640625 | 3 | [] | no_license | <?php
/**
* Class ShortCode
*/
class TRT_shortCode
{
/**
* ShortCode constructor.
*/
public function __construct()
{
add_shortcode('trt_social_page_link', array($this, 'render_trt_social_page_link'));
add_shortcode('tr_gallery', array($this, 'render_tr_gallery'));
}
/... | true |
cf9d5be9692b43c313c697fe2824966ec813ced9 | PHP | jquerygeek/gpweb | /src/Application/GpBundle/Event/Observer.php | UTF-8 | 1,831 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Application\GpBundle\Event;
use Doctrine\ORM\EntityManager;
use Symfony\Components\EventDispatcher\EventDispatcher;
use Symfony\Components\EventDispatcher\Event;
use Symfony\Components\HttpFoundation\Session;
class Observer
{
/**
* @var EntityManager
*/
protected $em;
/**
... | true |
b872381dc7e205fcd377b48d69023de7be2a983d | PHP | rafrsr/crypto | /tests/CryptoTest.php | UTF-8 | 1,962 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Crypto package.
*
* (c) RafaelSR <https://github.com/rafrsr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Rafrsr\Crypto\Tests;
use Rafrsr\Crypto\Crypto;
use Rafrsr\Crypto\Encrypt... | true |
a8db716e3028fee57a57ab62cffe720abb37d623 | PHP | kristiannissen/laravel-quickpay | /src/Changelog/Changelog.php | UTF-8 | 1,094 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*
*/
namespace QuickPay\Changelog;
use QuickPay\Changelog\Contracts\ChangelogInterface;
use GuzzleHttp\Client;
use QuickPay\Changelog\Changes;
class Changelog implements ChangelogInterface
{
/**
* Sends a GET request to the ping endpoint
*
* @return object $model
*/
public f... | true |
76687fbdc488d76eb4db8064c285195f47db420c | PHP | Belendor/Grazus | /artur_dymchanka_5.php | UTF-8 | 9,925 | 3.3125 | 3 | [] | no_license | <?php
// 1.
echo '1 Uzduotis';
echo '<br>';
$doubleArray = [];
for($i = 0; $i< 10; $i++){
$doubleArray[$i] = [];
for($j = 0; $j< 5; $j++){
$randomNumber = rand(5, 25);
array_push($doubleArray[$i], $randomNumber);
}
}
echo json_encode($doubleArray);
echo '<br>';
echo '<br>';
// 2.
echo '... | true |
75fe49c1b88922c0ce8989cf78c389e455ad4488 | PHP | magedevel/datetime-utils | /DateTimeUtils.php | UTF-8 | 1,090 | 3.078125 | 3 | [] | no_license | class DateTimeUtils
/**
* @param string $from
* @param string $to
* @param string $interval
* @return array
* @throws \Exception
*/
public function getDateIntervals(string $from, string $to, string $interval = 'P1M'): array
{
$slides = [];
$ret = [];
$p... | true |
ceb0ce18aa275f2df15d87d0dec8544099990040 | PHP | Masoumeh-Hashemi/auth-idea | /auth.php | UTF-8 | 876 | 3.015625 | 3 | [] | no_license | <?php
// ========================
// Webpage which requires auth
// ========================
// token generated based on login (from database)
$token = 'abc';
// login mode (client 2 server)
if (isset($_GET['username']))
{
if ($_GET['username'] == "admin" && $_GET['password'] == "123")
{
echo "login:... | true |
83f89e2fdc104c8ca9a18f7535a357906f753471 | PHP | pabichw/shop-php | /shop-management/src/Model/Entity/ProductPurchase.php | UTF-8 | 903 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* ProductPurchase Entity
*
* @property int $id_product_purchase
* @property int $id_product
* @property string $product_quantity
* @property float $total_price
* @property int $order_id
*
* @property \App\Model\Entity\Order $order
*/
class ProductPu... | true |
afcc057dcaa0fe99ed1c50d55e3f2d1c13d6d59c | PHP | Ahmet01100/ETSIM_2_0 | /etsim/includes/back/functions_game.back22112015.php | UTF-8 | 949 | 2.5625 | 3 | [] | no_license | <?php
include_once 'psl-config.php';
function createTableGame($mysqli, $sql_query) {
$stmt = $mysqli->prepare($sql_query);
$stmt->execute();
$result = $stmt->get_result();
echo '<option value="$game" selected>Select game!</option>';
while($row = $result->fetch_assoc()) {
$game = $row['id_etsim_game'].' | '.$r... | true |
06b41079ccfe4f3b747c8402e84ecc68721e6795 | PHP | mollie/mollie-api-php | /src/Resources/Subscription.php | UTF-8 | 4,889 | 2.59375 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php
namespace Mollie\Api\Resources;
use Mollie\Api\MollieApiClient;
use Mollie\Api\Types\SubscriptionStatus;
class Subscription extends BaseResource
{
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $customerId;
/**
* Either "live" or "test" depending on ... | true |
e0fdccec0f5ad66ea6a358eb2d2ae035582ba384 | PHP | andersonfantw/bs4_iii | /plugin/tag/libs/TagSearch.class.php | UTF-8 | 8,609 | 2.546875 | 3 | [] | no_license | <?PHP
class TagSearch{
var $_condition = array();
//var $_tagid = array();
//var $_tagkey = array();
//var $_tagval = array();
//var $_tagkeyword = array();
var $_return_columns = array();
var $_pkey = array();
var $tags = array();
var $enableTagCols=false;
function enableTagCols($enable){
$this->enableTagC... | true |
0988cc1a041236c92ff69566afb075ff23e74c05 | PHP | luigif/WsdlToPhp | /samples/jmdata-movieapp/Notification/JmDataMovieAppServiceNotification.php | UTF-8 | 1,783 | 2.578125 | 3 | [] | no_license | <?php
/**
* Class file for JmDataMovieAppServiceNotification
* @date 10/07/2012
*/
/**
* Class JmDataMovieAppServiceNotification
* @date 10/07/2012
*/
class JmDataMovieAppServiceNotification extends JmDataMovieAppWsdlClass
{
/**
* Method to call NotificationRegistration
* Meta informations :
* - documenta... | true |
b25d6f975363f7f4d7bd823ec7c0945d6df1d8c5 | PHP | TommyRachmadiono/TA | /kelasController.php | UTF-8 | 2,554 | 2.703125 | 3 | [] | no_license | <?php
session_start();
include 'config/connectdb.php';
$act = $_POST["act"];
if ($_SESSION['login'] == true) {
switch ($act) {
case 'add_kelas':
$jenjang_kelas = mysqli_real_escape_string($conn, $_POST["jenjang_kelas"]);
$jurusan = mysqli_real_escape_string($conn, $_POST["jurusan"]);
$nama_kelas = mysqli_re... | true |
906879bfa7b4a08badb47d33bc51f792133b2a3d | PHP | lekevinbm/web-backend-oplossingen | /opdracht-looping-statements-while/opdracht-looping-statements-while-deel2.php | UTF-8 | 365 | 3.015625 | 3 | [] | no_license | <?php
$boodschappenlijstje = array("koek","nutella","brood");
?>
<!DOCTYPE html>
<html>
<body>
<ul>
<?php
$teller = 0;
?>
<?php while( isset( $boodschappenlijstje [ $teller ] ) ): ?>
<li><?= $boodschappenlijstje [ $teller ] ?></li>
<?php $teller++ ?>
<?php ... | true |
fcffacdbecae7523166a5e6e778f25d54f627f96 | PHP | grimsonmarc/lz-string-php | /test/index.php | UTF-8 | 13,938 | 2.578125 | 3 | [] | no_license | <?php
require_once '../src/LZString.php';
$codeChecks = 10;
$rows = 5;
$digits = 5;
$set = array();
for ($i = 0; $i < $rows; $i++) {
$str = '';
for ($j = 0; $j < $digits; $j++)
$str.=LZString::utf8_chr(rand(34, 123));
$set[] = $str;
}
$test = array_key_exists('testString', $_POST) ? $_POST['testStr... | true |
8e11cb1cb02605bee3284baaac6be7fb53c3597c | PHP | StellaQ/message_board | /dataphp/signin.php | UTF-8 | 1,120 | 2.640625 | 3 | [] | no_license | <?php
require 'config.php';
$email= isset($_POST['email'])?$_POST['email']:'';
$password=isset($_POST['password'])?$_POST['password']:'';
//Q1:password如何加密传输,加密验证以及加密写入数据库待研究
$query="SELECT uid,email,password,name FROM users WHERE email='$email'";
$result = $conn->query($query);
//mysql_query() 仅对 SELECT,SHOW,EXPLAI... | true |
9e329902e0cda7d31e2ac36bb8edfdc60f39cf68 | PHP | loyating/IMI | /src/Components/kafka/tests/Queue/BaseQueueTest.php | UTF-8 | 1,265 | 2.546875 | 3 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-mulanpsl-1.0-en",
"MulanPSL-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Imi\Kafka\Test\Queue;
use Imi\Kafka\Queue\KafkaQueueDriver;
use Imi\Queue\Driver\IQueueDriver;
use Imi\Queue\Model\Message;
use PHPUnit\Framework\TestCase;
abstract class BaseQueueTest extends TestCase
{
/**
* @return KafkaQueueDriver
*/
abstract protected ... | true |
1c66f775f851d996e9b253a51b277e19be59a4dc | PHP | ir-one/kloter-3 | /2.php | UTF-8 | 574 | 3.53125 | 4 | [] | no_license | <?php
$kalimat = "Programer";
$a = strlen($kalimat);
$vocal = 0;
$jumlah = 0;
for($i=0; $i<=$a-1; $i++){
if($kalimat[$i]=='a'||$kalimat[$i]=='i'||$kalimat[$i]=='u'||$kalimat[$i]=='e'||$kalimat[$i]=='o'){
$vocal = $vocal+1;
}
elseif($kalimat[$i]==''... | true |
f340b3a2bc50ac56ea61aa55ae69bf467e6ca34c | PHP | witooh/cgbullion | /admin/protected/extensions/template/Pagemenu.php | UTF-8 | 1,008 | 2.765625 | 3 | [] | no_license | <?php
class Pagemenu extends CWidget
{
public $items;
/**
* Initializes the menu widget.
* This method mainly normalizes the {@link items} property.
* If this method is overridden, make sure the parent implementation is invoked.
*/
public function init()
{
}
/**
* Cal... | true |
49e412c30a3b610220344ca827b858a166837ad0 | PHP | hoaibac/dasvn | /Plugin/user/_templates/users.php | UTF-8 | 1,347 | 2.53125 | 3 | [] | no_license | <?php
include('_includes/functions.php');
//include('_templates/header.php');
?>
<b>SVN Manager - Users</b>
<br>
<br>
<?php
if(isset($_REQUEST['username']) && isset($_REQUEST['action']) && $_REQUEST['action'] == "delete") {
$username = $_REQUEST['username'];
if ($svnAdmin->htpasswd->deleteUser($userna... | true |
9ae48b2a49285b52e5c224d60fc1dbeeb27ef265 | PHP | CesarHenriqueRamos/Saite_Imovel_tempoReal | /painel/pages/cadastrar-empreendimento.php | UTF-8 | 2,520 | 2.625 | 3 | [] | no_license | <?php
verificaPermissaoPagina(2);
if(isset($_POST['acao'])){
$nome = $_POST['nome'];
$tipo = $_POST['tipo'];
$imagens = array();
$imagensForm = count($_FILES['imagens']['name']);
$sucesso = true;
if($_FILES['imagens']['name'][0] != ''){
for($i = 0; $i < $imagensForm; $i++){
... | true |
8ed7cc9691dd6ff5e154f4b3fad15011f52b10dc | PHP | justbecauseph/taskloan-web | /app/Http/Requests/TaskRequest.php | UTF-8 | 912 | 2.578125 | 3 | [] | no_license | <?php
namespace TaskLoan\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use TaskLoan\User;
class TaskRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
/** @var User $user ... | true |
88a6c419d1137a418bd8dac1368b2f7838eb5604 | PHP | iluxa-com/fcoffice | /2012-02/alice/core/framework/manual/Memcached.php | UTF-8 | 10,663 | 2.640625 | 3 | [] | no_license | <?php
/**
* Memcached类声明文件,用于代码智能提示
*
* @link http://php.net/manual/en/book.memcached.php
* @author xianlinli@gmail.com
* @package Alice
*/
class Memcached {
/**
* The operation was successful.
*/
const RES_SUCCESS = 0;
/**
* The operation failed in some fashion.
*/
const RES_... | true |
21c00d61e5eef8b8c90a8916ea1a201817189fcb | PHP | webignition/php-stripe-models | /tests/PeriodTest.php | UTF-8 | 2,543 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace webignition\Tests\Model\Stripe;
use webignition\Model\Stripe\Period;
class PeriodTest extends AbstractBaseTest
{
/**
* @dataProvider getPeriodPropertiesDataProvider
*
* @param array $periodData
* @param array $expectedPeriodProperties
*/
public function testGetPeriodP... | true |
47ca23f5e2f34bfbdb744895c8520d61eb20ddcd | PHP | sarabaghery76/Final-Project-of-PHP | /Models/messageadmin.php | UTF-8 | 649 | 2.5625 | 3 | [] | no_license | <?php
class messageadmin extends Model
{
function __construct()
{
parent::__construct();
}
public function edit($table,$id,$message)
{
return $this->update($table,$id,$message);
}
public function get_message($table,$id)
{
... | true |
c9ecca8caf3e3b59d5677b0684c9691b392bf3ae | PHP | KirylJazzSax/brainstorm_tasks | /charter_1/task_7.php | UTF-8 | 492 | 4.03125 | 4 | [] | no_license | <?php
function compareNumber(int $n, int $compareValue): bool
{
while (true) {
if ($n < 1) return false;
if ($compareValue == $n % 10) return true;
$n = (int)($n / 10);
}
}
function hasSameNumbers(int $n): bool
{
if ($n < 0) return false;
while (true) {
if ($n < 1) retu... | true |
5a3585bc8c4b6d143b593a3219a45126e98c5af5 | PHP | microsoftgraph/msgraph-beta-sdk-php | /src/Generated/Financials/Companies/Item/Vendors/Item/VendorItemRequestBuilderGetRequestConfiguration.php | UTF-8 | 1,738 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsoft\Graph\Beta\Generated\Financials\Companies\Item\Vendors\Item;
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
use Microsoft\Kiota\Abstractions\RequestOption;
/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
class VendorItemRequestB... | true |
d0192850fecd0c053000c6ff33faf21f398eeda6 | PHP | joaopaulojpos/TalentsWeb | /view/carregamentos/carrega_dados_cadastro_empresa.php | UTF-8 | 504 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
$cnpj = $_POST['cnpj'];
//criando o recurso cURL
$cr = curl_init();
//definindo a url de busca
curl_setopt($cr, CURLOPT_URL, "https://www.receitaws.com.br/v1/cnpj/".$cnpj);
//definindo a url de busca
curl_setopt($cr, CURLOPT_RETURNTRANSFER, true);
//definindo uma variável para receber o conteúdo da página..... | true |
a979405c810f8eb77026c89df726dff244c7534f | PHP | bgaluszka/mbank | /examples/mt940_report.php | UTF-8 | 969 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Fetch MT940 report file
*/
require_once 'vendor/autoload.php';
use bgaluszka\Mbank\Mbank;
const MBANK_LOGIN = 'YOUR-LOGIN';
const MBANK_PASSWORD = 'YOUR-PASSWORD';
const MBANK_IBAN = 'ACCOUNT-IBAN';
const MBANK_DFP = 'ACCOUNT-DFP';
const MBANK_COOKIE8 = 'ACCOUNT-COOKIE8';
try {
$mbank = new Mbank();
... | true |
fba3f4dbafb43804a21de7418eea7cc4f7b9f6c2 | PHP | m-arfian/wholesale-glorious | /protected/models/SubGambar.php | UTF-8 | 4,200 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This is the model class for table "sub_gambar".
*
* The followings are the available columns in table 'sub_gambar':
* @property integer $SUB_GAMBAR_ID
* @property integer $GAMBAR_LARGE
* @property integer $GAMBAR_MEDIUM
* @property integer $GAMBAR_SMALL
* @property integer $GAMBAR_ICON
* @property... | true |
d9062a8e4e560ad026c57e9f2cfbd3f420ff37dd | PHP | pushpa66/firstAppServerSide | /src/AppBundle/Entity/Salary.php | UTF-8 | 2,436 | 2.515625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Salary
*
* @ORM\Table(name="salary")
* @ORM\Entity
*/
class Salary
{
/**
* @var string
*
* @ORM\Column(name="month", type="string", length=20, nullable=false)
*/
private $month;
/**
* @var integer
... | true |
3bd092b0ac01f1964ea817f30ec2b02cb7b4f8c4 | PHP | alecorguill/projet_sgbd | /web_local/ajouteringredientrecette.php | UTF-8 | 2,422 | 2.65625 | 3 | [] | no_license | <html>
<head>
<meta charset="utf-8">
<title>Les recettes gourmandes - Ajout</title>
</head>
<body>
<?php
$nb_ing = $_GET['nb_ing'];
$nom_recette = $_GET['nom_recette'];
echo("<form name=\"add_ingredients\" method=\"post\" action=\"\">");
for($i = 1; $i<=$nb_ing; $i++){
echo("Ingredient $i: <input type=\"t... | true |
0f486fca7c5bd31ba8239a9e5c7ee4faa2600d59 | PHP | asgrim/book-library | /test/AppTest/Entity/BookTest.php | UTF-8 | 1,429 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace AppTest\Entity\Exception;
use App\Entity\Book;
use App\Entity\Exception\BookAlreadyStocked;
use App\Entity\Exception\BookNotAvailable;
use PHPUnit\Framework\TestCase;
use Ramsey\Uuid\Uuid;
/**
* @covers \App\Entity\Book
*/
final class BookTest extends TestCase
{
public ... | true |
6080b89a5bfad4dbcb279ebe0d1128c8ed96cef5 | PHP | IDCI-Consulting/ColorSchemeBundle | /Model/Color.php | UTF-8 | 4,796 | 3.25 | 3 | [] | no_license | <?php
/**
*
* @author: Gabriel BONDAZ <gabriel.bondaz@idci-consulting.fr>
* @license: GPL
*
*/
namespace IDCI\Bundle\ColorSchemeBundle\Model;
use IDCI\Bundle\ColorSchemeBundle\Exceptions\InvalidColorException;
class Color implements ColorInterface
{
protected $colorValue;
protected $colorObject = nul... | true |
f10d241d5a166bf1b92e203a74c7183c4ef8c7d2 | PHP | etsatsko/jira-php | /migrations/m300617_035631_add_work_cost.php | UTF-8 | 1,736 | 2.515625 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Class m300617_035631_add_work_cost
*/
class m300617_035631_add_work_cost extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%work_cost}}', [
'id' => $this->primaryKey(),
'task_id' => $thi... | true |
f496c8df2c740f552ed7a8c05aa88d32d3761a61 | PHP | mcdonald-ra/old-work | /HW5.php | UTF-8 | 1,497 | 3.703125 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HW5 - PHP Loops and Functions</title>
<?php
function mathTable($func){
echo "<div>\n\n";
switch($func){
case "/":
echo "\t<h1>Division</h1>\n\n";
break;
case "*":
echo "\t<h1>Multiplication</h1>\n\n";
break;
... | true |
62345239e21bb019cb6be3fc8e9bca181e5395b3 | PHP | PHP-DI/Invoker | /tests/Mock/ArrayContainer.php | UTF-8 | 774 | 2.875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Invoker\Test\Mock;
use Psr\Container\ContainerInterface;
/**
* Simple container.
*/
class ArrayContainer implements ContainerInterface
{
private $entries;
public function __construct(array $entries = [])
{
$this->entries = $entries;
}
/** {@inh... | true |
6da5a032d2139f535d54342f2740ff189a60b448 | PHP | zlikavac32/beanstalkd-lib | /src/Runner/AutoTouchRunner.php | UTF-8 | 1,871 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Zlikavac32\BeanstalkdLib\Runner;
use Zlikavac32\AlarmScheduler\AlarmHandler;
use Zlikavac32\AlarmScheduler\AlarmScheduler;
use Zlikavac32\BeanstalkdLib\AlarmHandler\TouchJobAlarmHandler;
use Zlikavac32\BeanstalkdLib\Client;
use Zlikavac32\BeanstalkdLib\JobHandle;
use Zlikavac... | true |
b0f40f7a2422662268186977e1444c393bee710b | PHP | nelson6e65/php_nml | /tests/DataProviders/PropertiesHandlerTestProvider.php | UTF-8 | 5,941 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* PHP: Nelson Martell Library file
*
* Copyright © 2016-2021 Nelson Martell (http://nelson6e65.github.io)
*
* Licensed under The MIT License (MIT)
* For full copyright and license information, please see the LICENSE
* Redistributions of files must retain the above copyright notice.
*
* @copyright 20... | true |
65529846c42b2e0baf62de5a6277939c9ae475a8 | PHP | name-aniket/navigus-assignment | /api/User/canViewDoc.php | UTF-8 | 1,081 | 2.640625 | 3 | [] | no_license | <?php
session_start();
require_once '../../config/database.php';
$query = "SELECT name, avatar FROM userViewLog WHERE status = 'View' AND username <> ?";
$stmt = mysqli_prepare($link, $query);
mysqli_stmt_bind_param($stmt, 's', $_SESSION['user_detail']['username']);
if (mysqli_stmt_execute... | true |
03dd953f109864e0fda7ce0e8c6c075020d32c78 | PHP | Giannisduke/loukia-v2 | /site/web/app/plugins/woocommerce-bookings/includes/admin/views/html-booking-availability.php | UTF-8 | 9,252 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="bookings_availability" class="panel woocommerce_options_panel">
<div class="options_group">
<?php
$min_date = $bookable_product->get_min_date_value( 'edit' );
$min_date_unit = $bookable_product->get_min_date_unit( 'edit' );
$max_date = 0 === ... | true |
87d68caae896b7a3e71d729d7d712804383713d0 | PHP | DabeerRaza/final-project | /accounts/server.php | UTF-8 | 7,900 | 2.625 | 3 | [] | no_license | <?php
/**************************************** CONNECTION ****************************************/
$server_name="localhost";
$username="root";
$password="";
$DataBase="registration";
$conn = mysqli_connect($server_name, $username, $password, $DataBase);
/********************************** USER AND ADMIN SIGNUP ****... | true |
3a8e042476b80fa133cced9e2a2bf71c602664f3 | PHP | tarikakbay/ShareAndLike | /api/v1/Silinecek/entity/DeviceCommand.php | UTF-8 | 2,865 | 2.796875 | 3 | [] | no_license | <?php
include_once '../libraries/Common.php';
class DeviceCommand extends Common
{
// database connection
private $db;
// object properties
public $Id;
public $DeviceId;
public $Tag;
public $StyleColor;
public $StyleIcon;
... | true |
5a22fd198c2bbb05da9f31788432ea727d84c841 | PHP | telmoricardo/imobiliaria_paulo | /app/DAL/ImovelDAO.php | UTF-8 | 32,019 | 2.671875 | 3 | [] | no_license | <?php
require_once ('Banco.php');
class ImovelDAO {
private $pdo;
private $debug;
public function __construct() {
$this->pdo = new Banco();
$this->debug = true;
}
/**********************************PAINEL ADMIN******************************************************/
publi... | true |
8f27dd83a5de511dd858faac349bee423fa368ea | PHP | dcuesta1/auto | /app/Http/Controllers/Api/Customers/StoreCustomerController.php | UTF-8 | 1,051 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api\Customers;
use App\Company;
use App\Customer;
use App\Http\Controllers\Controller;
use Auth;
use Illuminate\Http\Request;
// SAMPLE: CONTROLLER-SAMPLE
class StoreCustomerController extends Controller
{
public function __invoke(Request $request, $id = null)
{
/... | true |
18feb2810e192aba952f0dde1074285c06e0c684 | PHP | analistauteg04/asgard | /modules/marketing/models/Interes.php | UTF-8 | 2,584 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\marketing\models;
use Yii;
/**
* This is the model class for table "interes".
*
* @property int $int_id
* @property string $int_descripcion
* @property string $int_nombre
* @property string $int_estado
* @property string $int_fecha_creacion
* @property string $int_fecha_modificaci... | true |
7fcba7b7e4937c54fa5da78096258185eaedbae0 | PHP | Anderson-Alan-Sauberlich/Web-Feralten | /Module/Application/Model/DAO/Permissao.php | UTF-8 | 3,223 | 2.6875 | 3 | [] | no_license | <?php
namespace Module\Application\Model\DAO;
use Module\Application\Model\OBJ\Permissao as OBJ_Permissao;
use Module\Application\Model\Common\Util\Conexao;
use \PDO;
use \PDOException;
use \Exception;
class Permissao
{
function __construct()
{
... | true |
e7f9151a19818a86194ffdbc7c7f8c07a1d7106a | PHP | Lukasz93P/asynchronous-tasks-queue | /src/outbox/exceptions/TasksAddingFailed.php | UTF-8 | 462 | 2.578125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Lukasz93P\tasksQueue\outbox\exceptions;
use Throwable;
class TasksAddingFailed extends OutboxException
{
private const MESSAGE = 'Adding tasks to outbox failed';
public static function reasonNotKnown(): self
{
return new self(self::MESSAGE);
}
... | true |
8977a31dd914cf3b594f3b980161c96a3cba4b2a | PHP | ashur/tinyskylines | /lib/Skylines/Element/Building.php | UTF-8 | 560 | 3.046875 | 3 | [] | no_license | <?php
/*
* This file is part of Skylines
*/
namespace Skylines\Element;
use Huxtable\Core\Utils;
abstract class Building extends Element
{
/**
* Randomly generate building dimensions and margin
*/
public function __construct()
{
$this->height = rand( 8, 21 );
$this->width = rand( 7, 13 );
/* Left Mar... | true |
a7d93b4097806766ecd4d543e0c14ceb0d8fd282 | PHP | TRowbotham/PHPDOM | /tests/dom/nodes/NodeRemoveChildTest.php | UTF-8 | 2,532 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Rowbot\DOM\Tests\dom\nodes;
use Rowbot\DOM\Exception\NotFoundError;
use Rowbot\DOM\Tests\dom\DocumentGetter;
use Rowbot\DOM\Tests\TestCase;
use stdClass;
use TypeError;
/**
* @see https://github.com/w3c/web-platform-tests/blob/master/dom/nodes/Node-removeChild.html
*/
clas... | true |
652bbeebd42b0eb8462f5b9125a33e213740ffce | PHP | marshmallow-packages/nova-cards-help | /src/Help.php | UTF-8 | 1,653 | 2.71875 | 3 | [] | no_license | <?php
namespace Marshmallow\Cards\Help;
use Laravel\Nova\Card;
use Marshmallow\Cards\Help\HelpItem;
class Help extends Card
{
/**
* The width of the card (1/3, 1/2, or full).
*
* @var string
*/
public $width = 'full';
public function fromConfig()
{
$config = config('nova-... | true |
6c28ff08400c49ebe9417227c338ff49c68a196e | PHP | butlerbryanc/tlex | /wp-content/plugins/wp-scss/class/class-wp-scss.php | UTF-8 | 7,676 | 2.796875 | 3 | [
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"GPL-3.0-only",
"MIT"
] | permissive | <?php
include_once( WPSCSS_PLUGIN_DIR . '/scssphp/scss.inc.php' );
use Leafo\ScssPhp\Compiler;
class Wp_Scss {
/**
* Compiling preferences properites
*
* @var string
* @access public
*/
public $scss_dir, $css_dir, $compile_method, $scssc, $compile_errors, $sourcemaps;
/**
* Set values for Wp_... | true |
cc6cd2c404d1f051b81e8377958e1305ed7561c1 | PHP | cardonamaturana/SeminarioActualizacion | /app/ListaPacientes.inc.php | UTF-8 | 2,437 | 2.578125 | 3 | [] | no_license | <?php
include_once 'app/Conexion.inc.php';
include_once 'app/Paciente.inc.php';
include_once 'app/Paciente.inc.php';
class ListaPacientes {
public static function listar_pacientes() {
$pacientes = Paciente :: obtener_pacientes(Conexion :: obtener_conexion());
if (count($pacientes)) {
... | true |
d5ea8f3a7ed13f715d67b4c88e647e2d7feaa869 | PHP | Alanxumeng/agent | /app/Http/Requests/users_updateRequest.php | UTF-8 | 2,321 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class users_updateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* G... | true |
9cf14e244160cd5ef02e6af90c7f2c4c3fda1a6c | PHP | GiovanniVictorio/Desarrollo-Web-Avanzado | /Framework BOOTSTRAP/Clases Pag Tacos/configPhp/UserController.php | UTF-8 | 4,285 | 2.75 | 3 | [] | no_license | <?php
include_once "config.php";
include_once "ConectionController.php";
if ( isset($_POST) && isset($_POST['action']) ) {
$userController = new UserController();
switch ( $_POST['action'] ) {
case 'store':
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$password = ... | true |
73f865e45af38cb7db94982090f6b971d5230f0a | PHP | Gustavo218/3DAW | /AV1/av1_Criar_Disciplina.php | UTF-8 | 2,278 | 2.8125 | 3 | [] | no_license | <?php
session_start();
$conn= mysqli_connect("localhost","root","","av1");
if ($conn->connect_error){
die("Conexão com erro: " . $conn->connect_error);
}
if (isset($_POST['Inserir'])){
$nome = $_POST['nome'];
$periodo = $_POST['periodo'];
$... | true |
a2db27f1b47e27078dc5c6d6e24ca9887d36cd82 | PHP | unim21/kubernetes-api-php-client | /src/KubernetesAPIClient/Client.php | UTF-8 | 7,275 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* PHP CLient for Kubernetes API
*
* Copyright 2014 binarygoo Inc. All rights reserved.
*
* @author Faruk brbovic <fbrbovic@devstub.com>
* @link http://www.devstub.com/
* @copyright 2014 binarygoo / devstub.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this... | true |
b46005d4cd14861157bada4eefd9f09c25d8f574 | PHP | cindyastina/skripsi-acf | /app/Http/Controllers/ZoneController.php | UTF-8 | 2,415 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Zone;
use Illuminate\Http\Request;
class ZoneController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
$pageName = "Daerah";
... | true |
123c467d5bb2f385545106c2e9425c0ba7851c4e | PHP | Ballkar/MobilnaLaravel | /app/Services/NotificationService.php | UTF-8 | 1,001 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Models\User\Notification;
class NotificationService
{
public static $NOTIFICATION_TYPE_INFO = 'INFO';
public static $NOTIFICATION_TYPE_WARNING = 'WARNING';
public static $NOTIFICATION_TYPE_ERROR = 'ERROR';
public function __construct()
{
}
public... | true |
227052501d5b6032dfa32968fde327551f53b98d | PHP | zidnawa/phpunit1 | /MatematikaTest.php | UTF-8 | 896 | 3.0625 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
require_once "./Matematika.php";
class MatematikaTest extends TestCase
{
/*
* Menguji pangkat bilangan positif, positif
*
*/
public function testPositifSemua()
{
$hasilPangkat = Matematika::pangkatBilangan(2, 3);
$this->assertEquals(8, $hasilPangkat);
}
/*
* Menguji... | true |
2ed5f3be97a7542f0fc44def3e26ddfc09c94c24 | PHP | rom1119/english-learn | /src/Langs/pages/QuizPage.php | UTF-8 | 5,580 | 3.078125 | 3 | [] | no_license | <?php
namespace App\Langs\pages;
use App\Langs\AllLangs;
use App\Langs\Page;
class QuizPage extends Page {
protected $method = null;
protected $questionIndex = null;
protected $questionText = null;
protected $answer = null;
protected $answerType = null;
protected $levelType = null;
protec... | true |
4898aef571dedd1720653d4900cecd8fcc1fb271 | PHP | mongodb/mongo-php-driver | /tests/bson/bson-dbpointer-001.phpt | UTF-8 | 912 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | --TEST--
MongoDB\BSON\DBPointer #001
--FILE--
<?php
require_once __DIR__ . '/../utils/basic.inc';
$tests = array(
MongoDB\BSON\toPHP(MongoDB\BSON\fromJSON('{ "dbref": {"$dbPointer": {"$ref": "phongo.test", "$id" : { "$oid" : "5a2e78accd485d55b405ac12" } }} }')),
);
foreach($tests as $n => $test) {
echo "Tes... | true |