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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
be5d49ef25942ea07e777a65ff13f7412a55af8b | PHP | nicolaskassalias/orientacao-objetos | /salvaClienteMeu.php | UTF-8 | 1,196 | 3.0625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
require 'Cliente01.php';
$cliente=new Cliente01();
$cliente->nome = $_POST['nome'];
$cliente->email = $_POST['email'];
//
$string01=mysqli_connect('localhost','root','senh... | true |
a32421afbb1c1065dc1b4c88a96e45f26914f373 | PHP | andy-parinas/sales-reporting | /database/seeds/ProductSeeder.php | UTF-8 | 750 | 2.625 | 3 | [] | no_license | <?php
use App\Product;
use App\ProductType;
use Illuminate\Database\Seeder;
class ProductSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
collect(['Carpet', 'Item'])->each(function($type){
if($type === 'Car... | true |
7ee72bf2abdafa57fb61f7de54d691d7bb5a1442 | PHP | mawshen/resume-builder | /app/database/migrations/2014_12_16_023132_add_resume.php | UTF-8 | 691 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddResume extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::table('resume')->insert(array(
'firstName'=>"Tommy Yeap",
'lastName'=>"Maw Shen",
'email'=>"... | true |
b65de44174968afb2d8aa0abfbcd1559df24b5e7 | PHP | zfbjk/ss-panel-v3-mod | /app/Utils/Response.php | UTF-8 | 214 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Utils;
class Response
{
public static function redirect($response,$to){
$newResponse = $response->withStatus(302)->withHeader('Location',$to);
return $newResponse;
}
} | true |
c09e67b808396f4367ba6ac71ffedcb014bd3e6c | PHP | zAN41k/php | /book/chapter12/home1.php | UTF-8 | 119 | 2.71875 | 3 | [] | no_license | <?php
$name = 'Umberto';
function say_hello() {
global $name;
print 'Hello, ';
print $name;
}
say_hello();
?>
| true |
e139fb93313554326ad42c5856e9146a28dad922 | PHP | danielMensah/CodeAnalyser | /backend/src/Models/ResponseModel.php | UTF-8 | 1,292 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: MrDan
* Date: 08/02/2018
* Time: 11:37
*/
require_once __DIR__ . "/ClassModel.php";
class ResponseModel {
/** @var string */
private $response;
/** @var int*/
private $errorLine;
/** @var bool */
private $valid;
/** @var ClassModel */
priv... | true |
feebf7f86fcfebe3c95abdfc950707ed097f3b48 | PHP | jmurowaniecki/8bitvape | /app/Models/User.php | UTF-8 | 1,192 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'username... | true |
cb8074512eec900dee89945beaf746d6eda81c34 | PHP | LzrBim/blank | /app/src/Model/User.php | UTF-8 | 12,338 | 2.78125 | 3 | [] | no_license | <?
/*-----------------------------------------------------------------------------
* SITE:
* FILE: /models/User.php
----------------------------------------------------------------------------- */
namespace App\Model;
class User extends BaseModel {
//CORE ATTRIBUTES
public $_title = 'User';
public $_id = 'us... | true |
94812b9ae1b7f433413fcb5cff5baea1e756c2d3 | PHP | gg00xiv/Accelerator | /Controller/Controller.php | UTF-8 | 2,936 | 2.96875 | 3 | [] | no_license | <?php
namespace Accelerator\Controller;
use Accelerator\View\Helper\ResponseHelper;
/**
* The base class for all Controller specified classes.
*
* @author gg00xiv
*/
abstract class Controller {
/**
*
* @var \Accelerator\View\View
*/
protected $view;
/**
*
... | true |
5c3c7b3e002f10866078a6951972b0aa9e93f86f | PHP | DominicWatts/OrderHistory | /Api/HistoryAddressRepositoryInterface.php | UTF-8 | 1,799 | 2.59375 | 3 | [] | no_license | <?php
namespace Xigen\OrderHistory\Api;
/**
* Interface HistoryAddressRepositoryInterface
*/
interface HistoryAddressRepositoryInterface
{
/**
* Save HistoryAddress
* @param \Xigen\OrderHistory\Api\Data\HistoryAddressInterface $historyAddress
* @return \Xigen\OrderHistory\Api\Data\HistoryAddress... | true |
ff7c9f4d545b8fa7339b866d977e2eb4ebefa06b | PHP | enjelhpg/cek-sound123 | /pemdas[array].php | UTF-8 | 1,645 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | <!DOCTYPE html>
<head>
<title>BELAJAR ALGORITMA PEMDAS</title>
</head>
<body>
<h1>LIST NAMA HARI</h1>
<!--struktur tabel data dimulai-->
<?php $hari = array ("SENIN","SELASA","RABU","KAMIS","JUMAT","SABTU","MINGGU"); ?>
<table border="1">
<tr>
<td>NO</td>
<td>N... | true |
4c80aa666203ecfde46dccfd04e175003dcad76a | PHP | tempestwf/tempest-tools-skeleton | /app/Console/Commands/ControllerMakeCommand.php | UTF-8 | 2,636 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Input\InputArgument;
class ControllerMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected /** @noinspection ClassOverridesFieldOfSup... | true |
20719527675059718c972a7a3d95b06ab88d00b9 | PHP | andredebrito/phpviacep | /src/ViaCepApi.php | UTF-8 | 4,891 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace AndreDeBrito\PHPViaCep;
/**
* Class ViaCepApi
*
* @author André de Brito <https://github.com/andredebrito>
* @package AndredeBrito\PHPViaCep
*/
abstract class ViaCepApi {
/** @var string */
private $apiUrl;
/** @var string */
private $endpoint;
/** @var string */
priva... | true |
fad17080314bc562801f38b494315c37b83fd80d | PHP | johnfasou/wordpress-activitypub | /includes/class-rest-activitypub-outbox.php | UTF-8 | 3,590 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* ActivityPub Outbox Class
*
* @author Matthias Pfefferle
*/
class Rest_Activitypub_Outbox {
/**
* Register routes
*/
public static function register_routes() {
register_rest_route(
'activitypub/1.0', '/users/(?P<id>\d+)/outbox', array(
array(
'methods' => WP_REST_Server::READABLE,
... | true |
0b413ba31ea91d114cb18963a2a5ab75de0a3496 | PHP | udeth/wprc_tp | /Application/Lib/.svn/text-base/Page.class.php.svn-base | UTF-8 | 9,230 | 2.546875 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
// +---------------------------------------------------... | true |
8b6426c4e901abfccc42631392624e723ce1db22 | PHP | w4817/laravel_test | /app/Http/Controllers/NewsController.php | UTF-8 | 873 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Intervention\Image\Facades\Image;
use App\Models\News;
class NewsController extends Controller
{
public function index(){
$news = News::all();
foreach ($news as $post){
$imageUrl = !empty($post->image) ? $post->imag... | true |
97bbe3d25414de0391196d328d990767b58a1256 | PHP | amanjolly1994/Vegvendors2016 | /android/complain.php | UTF-8 | 624 | 2.703125 | 3 | [] | no_license | <?php
require_once "dbConfig.php";
if( $_POST )
{
$userId = $_POST["uid"];
$complain = $_POST["complain"];
try {
$stmt = $db_con->prepare("INSERT INTO complain(`uid`, `complain`,`date`) VALUES(:uid, :complain,:time)");
$stmt->bindParam(":uid", $userId);
$stmt->bindParam(":complain... | true |
77cbfb7d3973aee4c8c25e4fdccfd0505870b594 | PHP | bavix/advanced-html-dom | /demo/simpleWithCache.php | UTF-8 | 1,035 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
include dirname(__DIR__) . '/vendor/autoload.php';
// test 1
$mt = microtime(true);
$dom = new \Bavix\AdvancedHtmlDom\AdvancedHtmlDom();
$dom->setCache(new \Bavix\AdvancedHtmlDom\CacheSystem\CacheStatic());
$dom->loadFile('https://babichev.net/portfolio');
$dom->loadFile('https://babichev.net/portfolio');
$do... | true |
92cc463b82bba17b1fdc9e415012c51c341b386e | PHP | Rastusik/ci-assignment | /src/AppBundle/Model/DBAL/Type/StringArray.php | UTF-8 | 1,018 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author mfris
*/
namespace AppBundle\Model\DBAL\Type;
/**
* Point object for spatial mapping
*/
final class StringArray
{
/**
* @var string[]
*/
protected $data;
/**
*
* @param array $data
*/
public function __construct(array $data)
{
$this->data... | true |
b467ed4bd21f36f20cf6bd241845bf9ffd01970e | PHP | carol8421/swf-slf4php | /src/util/TextUtil.php | UTF-8 | 4,188 | 3.609375 | 4 | [] | no_license | <?php
namespace swf\util;
class TextUtil {
const EMPTY_STRING = "";
const VARIABLE_PLACEHOLDER = "{}";
private function __construct() {}
/**
* The given string might contain placeholders "{}" which will be replaced by
* string representation of data provided in the given array<p>
*
* Number of placeho... | true |
a5f1b98ae406b3ffba6ca8e9c446b1121b2fefb7 | PHP | Mdhesari/design-patterns | /app/Factory/Transport/Transports/Ship.php | UTF-8 | 398 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Factory\Transport\Transports;
use App\Factory\Transport\Illuminate\TransportInterface;
use App\Factory\Transport\Illuminate\Transports\SeaInterface;
class Ship implements TransportInterface, SeaInterface
{
public function deliver($place)
{
return $place;
}
public func... | true |
4476b875d022161f13427345b9aef2f2ed7b03d2 | PHP | anaelleltd/safepetsinc | /anaellel_safepetsinc/includes/db.inc.php | UTF-8 | 425 | 2.625 | 3 | [] | no_license | <?php
try
{
$pdo = new PDO('mysql:host=localhost;dbname=anaellel_safepetsinc', 'anaellel_k9', 'xxxx');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec('SET NAMES "utf8"');
echo '<p id="success">Database connection established.</p>';
}
catch (PDOException $e)
{
$error = '<p ... | true |
75335daca0ef6e7e0cf5ca8cd71975c2589e3b03 | PHP | LesAL2012/php-task-1 | /core/function.php | UTF-8 | 4,323 | 2.734375 | 3 | [] | no_license | <?php
// Подключение к БД с установкой кодировки utf8
function connect_db(){
$conn = mysqli_connect(SERVERNAME, USERNAME, PASSWORD, DBNAME);
mysqli_set_charset($conn, "utf8");
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
return $conn;
}
functi... | true |
dfd362ceb837b4274f78debab7493221ccd4c857 | PHP | nfangxu/laravel-for-api | /app/Traits/ApiResponse.php | UTF-8 | 3,188 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Traits;
use Symfony\Component\HttpFoundation\Response as FoundationResponse;
trait ApiResponse
{
/**
* @var int
*/
protected $statusCode = FoundationResponse::HTTP_OK;
/**
* @return int
*/
public function getStatusCode()
{
return $this->statusCode;... | true |
a2488197c747aaae68c5f63854c00feb9306e994 | PHP | mariyaschulezhko/skillup | /homework/2020.10.19/form.php | UTF-8 | 1,993 | 2.90625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
$messages = [];
$file = fopen(__DIR__ . '/storage', 'rb');
while ($line = fgets($file, 1024)) {
$messages[] = json_decode(trim($line), true, 512, JSON_THROW_ON_ERROR);
}
fclose($file);
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
... | true |
ae65e5d78749a070ef5a8a3e865a69f5a08d96f6 | PHP | Chavjoh/ChavBootstrapPHP | /app/src/Utils/Logger/Logger.php | UTF-8 | 1,241 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Utils\Logger;
/**
* Logger for message to the user and error backup
*
* @package Utils\Logger
* @author Johan Chavaillaz
* @since 1.0.0
*/
class Logger
{
/**
* Log a message to show to the user
*
* @param LoggerMessage $message Message to show
*/
public static function logMessage(Logger... | true |
ad47d58db87f3d9f7dacfc4a1b07a67d9a10f4f9 | PHP | LpKID/Animal-AID-2016 | /Project/AnimalAID/app/Http/Controllers/AnimalController.php | UTF-8 | 5,869 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Request;
use Illuminate\Support\Facades\Input;
use App\Animal;
use App\Repositories\AnimalRepositoryInterface;
use App\Repositories\DonationTypeRepositoryInterface;
class AnimalController extends Controller
{
protected $AnimalRepository;
protected $DonationTypeReposit... | true |
2da9179b35d76a50d8c5efb1ca87de731a3ad2fd | PHP | lolibrary/lolibrary | /web.sakura/database/migrations/0050____fuzzy_text_search.php | UTF-8 | 1,803 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use Illuminate\Database\PostgresConnection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class FuzzyTextSearch extends Migration
{
/**
* Run the migrations.
*
* @return void
... | true |
c34ece13c7a93d4650785bc8fdc4ecd27bc7f491 | PHP | Whisky2017/PHPExercise | /shoppingcart/output_fns.php | UTF-8 | 5,216 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: wskyt
* Date: 2017/3/16
* Time: 10:34
*/
function do_html_header($title = ''){
//注册会话变量
if ($_SESSION['items']){
$_SESSION['items'] = '0';
}
if ($_SESSION['total_price']){
$_SESSION['total_price'] = '0.00';
}
?>
<html>
<h... | true |
80e15fc4b5326488ef70d7dcd4c0642375101944 | PHP | neogazebo/panel | /components/extensions/aws/sqs/SqsCreateQueue.php | UTF-8 | 640 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components\extensions\aws\sqs;
class SqsCreateQueue extends BaseSqsClient implements SqsWorkerInterface
{
private $new_queue_name;
private $new_queue_attr;
public function __construct($attributes, $name)
{
parent::__construct();
$this->new_queue_attr = $attributes;
$this->n... | true |
802091d518ec575c29c02c2419c5915eda7c5c8f | PHP | NirajDragon1/DragonFrames-Admin | /admin/webservice/web_service/system/library/classes/iphonePushNotify.cls.php | UTF-8 | 2,136 | 2.546875 | 3 | [] | no_license | <?php
//iphonePushNotify.cls
//////////////////////////////////////////////////////////
# This Class will be use to send push notification to iPhone device.
//////////////////////////////////////////////////////////
class NicIphonePushNotify {
private $apnPath;
private $authId;
function __construct(... | true |
91b88a30c41605e5850dd1f78c281186df658f3c | PHP | rafaelEncinas/brainsoft | /HolaMundo.php | UTF-8 | 391 | 2.8125 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of HolaMundo
*
* @author encinas
*/
class HolaMundo {
function __construct() {
... | true |
1ab681945867f81718d8f303efecbcd7fd529326 | PHP | otherworld-pbbg/testworld | /_private/class_project_type.inc.php | UTF-8 | 9,622 | 2.6875 | 3 | [] | no_license | <?php
class ProjectType {
private $mysqli;
public $uid=0;
public $pre_uid = 0;
public $pre_name = 0;
public $max_multi = 0;
public $movable = 0;
public $ap = 0;
public $gen_type = 0;
public $category = 0;
public $side_pro = 0;
public $side_wt = 0;
public $place = 0;
public $end_weight = 0;
public $second... | true |
883882a51c363b07aff82d4d7e01aa357bbffac7 | PHP | thelia-modules/Selection | /Loop/SelectionContentRelated.php | UTF-8 | 3,114 | 2.515625 | 3 | [] | no_license | <?php
namespace Selection\Loop;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\Join;
use Selection\Model\Map\SelectionContentTableMap;
use Selection\Model\SelectionContent;
use Selection\Model\SelectionContentQuery;
use Thelia\Core\Template\Element\BaseLoop;
use Thelia\Core\Template\Element\L... | true |
dd75f8e624c012c449ba835f77d1622df1e469cf | PHP | nellytadi/restful-countries-1 | /app/Http/Controllers/StateController.php | UTF-8 | 2,572 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Country;
use App\State;
use Illuminate\Http\Request;
class StateController extends Controller
{
public function states($country){
$states = State::whereCountryId($country)->orderBy("name","ASC")->get();
$country = Country::whereId($country)->first();
... | true |
c14b995f2eba17943c443f6275cdd043a7e1469f | PHP | webusaurio/ceutils | /src/Validate/AuxiliarFolios13/Base/NumOrden.php | UTF-8 | 523 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace PhpCfdi\CeUtils\Validate\AuxiliarFolios13\Base;
use PhpCfdi\CeUtils\Validate\Common\BaseNumOrden;
/**
* Valida el atributo NumOrden en relación con el atributo TipoSolicitud (AF o FC)
*
* AUXFOL13NOR01 - El número de orden es requerido cuando el tipo de solicitud
* ... | true |
21402747cd4aa81514985e528988ed71454aafdc | PHP | juancavaplatas/alpadiatest | /alpadiatest/tests/Functional/GamesTest.php | UTF-8 | 6,893 | 2.515625 | 3 | [] | no_license | <?php
namespace Tests\Functional;
class GamesTest extends BaseTestCase
{
public $baseUrl = "/games";
public function testDelete()
{
// Mock 405 request
$response = $this->runApp('DELETE', $this->baseUrl);
$this->assertEquals(405, $response->getStatusCode());
}
public func... | true |
9bf80538a32ebf933ef5de410d1688b03917cfe4 | PHP | 749/webuntis | /src/Models/Students.php | UTF-8 | 2,972 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Webuntis\Models;
use JMS\Serializer\Annotation as Serializer;
use JMS\Serializer\Annotation\SerializedName;
use Webuntis\Models\Interfaces\AdministrativeModelInterface;
use Webuntis\Models\Interfaces\CachableModelInterface;
/**
* Students Model
* @author Tobias Franek <tobi... | true |
241eb17ffb4b72fca714d5038a4e87a50a90cd66 | PHP | soyaaron/pagina-prestamo | /model/Calculadora_Model.php | UTF-8 | 617 | 2.609375 | 3 | [] | no_license | <?php
require_once 'Conection_BD.php';
class Calculadora_Model extends Conection_BD{
//Seleccioname los porcentajes del usuario
public function TasaInteres($identificador){
$connection = parent::conectar();
try {
$query = "SELECT porcentaje FROM tasa WHERE... | true |
825da29e55b0efb2ac4e4dd429451ff111aa0849 | PHP | Spavacz/zGrid | /server.php | UTF-8 | 1,262 | 2.78125 | 3 | [] | no_license | <?php
// sort helpers
function sortme_desc($a, $b) {
if ($a->sort == $b->sort) {
return 0;
}
return ($a->sort < $b->sort) ? -1 : 1;
}
function sortme_asc($a, $b) {
if ($a->sort == $b->sort) {
return 0;
}
return ($a->sort > $b->sort) ? -1 : 1;
}
// default values
$page = !empty($_GET[... | true |
6b5bae473b51fbf97bf221712ed2706d116edc8b | PHP | pharsadi/banananana | /app/Repositories/Transaction.php | UTF-8 | 6,447 | 2.9375 | 3 | [] | no_license | <?php namespace App\Repositories;
use App\Item;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Transaction implements RepositoryInterface
{
/** @var Model */
protected $model;
protected static $defaultPurchasePrice = 0.20;
protected static $defaultSellPrice = 0.35;
... | true |
bfd3e20d17d6fe626bc591ee21edbc64488f66bb | PHP | Arcoders/Advanced-Chat | /database/seeds/FriendsTableSeeder.php | UTF-8 | 992 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class FriendsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(\App\Friendship::class)->create([
'requester' => 2,
'requested' => 1,
'status' ... | true |
5b070dacec7ec2e907c6560dbcfc1c65ab5c99ac | PHP | HellPat/php-options | /src/Option.php | UTF-8 | 1,585 | 2.921875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace HellPat\Enum;
use function assert;
/**
* @psalm-immutable
*/
abstract class Option
{
/** @var array<string, self> */
private static $enumRegistry = [];
/** @var string */
private $optionId;
/**
* @param mixed ...$args
*/
protected functi... | true |
09d62c97f6e6f39507dced115b2ae12770650986 | PHP | ashiviraji/utrance-railway | /models/ViewModel.php | UTF-8 | 16,010 | 2.53125 | 3 | [] | no_license | <?php
include_once "../classes/core/Model.php";
class ViewModel extends Model
{
public $from;
public $to;
public $when;
public $resultsArr;
public $train_id;
public $dest_station;
public $start_station;
public $result_array;
public $station_value_set;
public $s... | true |
0921577bdf17ffd454654ae9f5bcf3c88b79b110 | PHP | josemiguel-spain/Estado | /leer_ultimos.php | UTF-8 | 1,130 | 2.859375 | 3 | [] | no_license | <?php
// echo LeerUltimos::leer();
class LeerUltimos {
public static function leer() {
//
$resultado = '<div class="login">';
$resultado = $resultado . '<h1>Últimas actualizaciones</h1>';
$configuracion = parse_ini_file(dirname($_SERVER['DOCUMENT_ROOT']) . "/configuracion.ini");
define ('SERV... | true |
6b5eac018d8b5827763fbb2ff20eac1992777e79 | PHP | AlphaT7/billsplit2 | /public/php/init.php | UTF-8 | 378 | 2.84375 | 3 | [] | no_license | <?php
include "conn.php";
$conn = connectDB($user, $pass);
function connectDB($user, $pass)
{
try {
$conn = new PDO("mysql:host=localhost;dbname=application", $user, $pass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (exception $e) {
$conn = false;
... | true |
a1457dd7e2048144ff51075f6b58c5417c187ae3 | PHP | LivingLogic/LivingLogic.PHP.ul4 | /com/livinglogic/ul4/EvaluationContext.php | UTF-8 | 5,179 | 2.515625 | 3 | [] | no_license | <?php
namespace com\livinglogic\ul4;
include_once 'com/livinglogic/ul4/ul4.php';
use \com\livinglogic\utils\MapChain as MapChain;
class EvaluationContext implements \com\livinglogic\utils\Closeable, \com\livinglogic\utils\CloseableRegistry, UL4Repr
{
protected $buffer;
protected $variables;
/**
* A list of c... | true |
490adc708d699ad05a95acd9a541f65ab2405967 | PHP | trikoder/jsonapibundle | /src/Config/UpdateConfig.php | UTF-8 | 888 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Trikoder\JsonApiBundle\Config;
use Trikoder\JsonApiBundle\Contracts\Config\UpdateConfigInterface;
/**
* Class UpdateConfig
*/
final class UpdateConfig implements UpdateConfigInterface
{
/**
* @return array|null
*/
private $allowedFields;
/**
* @return array|null
*/
... | true |
890edac5de1300eb546acc9d3c4cceee9bb92f03 | PHP | rastislavkopal/WEBTECH2_6-api | /api/models/Database.php | UTF-8 | 1,650 | 3.203125 | 3 | [] | no_license | <?php
class Database
{
private $db_pass;
private $db_name;
private $server_name;
function __construct()
{
require_once '/home/xkopalr1/public_html/config.php';
if (empty($username) || empty($password) || empty($servername))
echo "Cannot be empty string.";
$t... | true |
350574552389cf2973c28932e72271ef0d1d6e99 | PHP | gandhe20/Login | /data2.php | UTF-8 | 1,174 | 2.84375 | 3 | [] | no_license | <?php
include("connect2.php");
include("function2.php");
$error="";
if(isset($_POST['submit']))
{
$firstName = ($_POST['fname']);
$lastName = ($_POST['lname']);
$email = ($_POST['email']);
$password = $_POST['password'];
$passwordConfirm = $_POST['passwordConfirm'];
if(strlen($firstName) < 3)
{
... | true |
8ec93e3403df007d36f387245b3ed66ff4bd43a8 | PHP | loretog/parser | /tests/Expression/NamedTest.php | UTF-8 | 6,193 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace PeterVanDommelen\Parser\Expression;
use PeterVanDommelen\Parser\Expression\Alternative\AlternativeExpression;
use PeterVanDommelen\Parser\Expression\Concatenated\ConcatenatedExpression;
use PeterVanDommelen\Parser\Expression\Constant\ConstantExpression;
use PeterVanDommelen\Parser\Expression\Named\G... | true |
14151e1697053af0e7e530e3a80466fa486534d5 | PHP | intrallect/intraLibrary-PHP | /src/IntraLibrary/Service/XSearchRequest.php | UTF-8 | 1,582 | 2.765625 | 3 | [] | no_license | <?php
namespace IntraLibrary\Service;
use \IntraLibrary\IntraLibraryException;
/**
* An XSearch request, pointed at the /IntraLibrary-XSearch endpoint.
*
* @package IntraLibrary_PHP
* @author Janek Lasocki-Biczysko, <j.lasocki-biczysko@intrallect.com>
*/
class XSearchRequest extends AbstractSRURequest
{
pr... | true |
92ff0aca3405915c67ec7d17fc04ce097f732f7b | PHP | Mikearaya/smart_school | /application/controllers/api/Users.php | UTF-8 | 3,538 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Users extends API
{
function __construct($config = 'rest')
{
parent::__construct($config);
$this->load->model('Users_model');
}
public function index_get($id = NULL) {
$result['result'] = $this->Users_model->get_users($id);
$result['columns']=[];
if(... | true |
37c3fb073f21764111c60f442ef6d224f29596f5 | PHP | Shamourai47/ce-monde-est-cruel | /src/Game/PlayerIA/PalanhiPlayer.php | UTF-8 | 949 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Hackathon\PlayerIA;
use Hackathon\Game\Result;
/**
* Class PalanhiPlayers
* @package Hackathon\PlayerIA
* @author SHAM KAZEMI-JOESTANI
* J'ai voulu tenter le tout pour le tout.
* De base je voulais faire une chose obscure et au final je me suis juste dit que je prendrais le dernier coup de l'aut... | true |
05e734cca494213f312eaab502c004c6a0ed0fb6 | PHP | UnionOfRAD/lithium | /analysis/Debugger.php | UTF-8 | 6,583 | 2.640625 | 3 | [] | permissive | <?php
/**
* li₃: the most RAD framework for PHP (http://li3.me)
*
* Copyright 2009, Union of RAD. All rights reserved. This source
* code is distributed under the terms of the BSD 3-Clause License.
* The full license text can be found in the LICENSE.txt file.
*/
namespace lithium\analysis;
use ReflectionClass;
... | true |
c88582122a391158b394c6a918ffdb72234f4c3b | PHP | ohSaputra/homie | /framework/master/libraries/gallery.php | UTF-8 | 4,651 | 2.8125 | 3 | [] | no_license | <?php
// Theme Name: Theme Master
// Version: 1.0
// Modified: March 24, 2016
namespace ThemeOptions;
// Generates an image gallery from the [gallery] shortcode
class Gallery {
public function __construct() {
add_action('init', array($this, 'init'));
}
/**
* Registers a hook into wp ... | true |
469e40d2644fbff39d874aa789c4cf9705343a8c | PHP | miguel5fv/patterns | /src/Patterns/Facade/Shape.php | UTF-8 | 836 | 3.0625 | 3 | [] | no_license | <?php
namespace Patterns\Facade;
class Shape
{
protected $shapes;
public function drawTriangle($size)
{
return $this->drawShape('triangle', $size);
}
public function drawRectangle($size)
{
return $this->drawShape('rectangle', $size);
}
public function drawCircle($size... | true |
a359816ce25e088c3b7d98aabdad7d3f6c7e3672 | PHP | made/blog | /package/made/blog-engine/src/Service/ThemeService.php | UTF-8 | 3,864 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* The MIT License (MIT)
* Copyright (c) 2020 Made
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, ... | true |
c22eea4e9718a7727b2f1e7baae1add4c8e5f633 | PHP | QwErTyY1/final | /application/class/Pagination.php | UTF-8 | 807 | 3.265625 | 3 | [] | no_license | <?php
class Pagination
{
private $start;
private $num;
private $total;
private $page;
public function __construct($page = 1, $num = 25, $count)
{
$this->num = $num;
$this->total = intval(($count - 1) /$num)+1;
$this->page = intval($page);
if (empty($... | true |
8bbd42d39ec755527ac3eaf618363b2ba2b44980 | PHP | bhakhri/Syenergy | /Library/NumToWord.class.php | UTF-8 | 4,828 | 3.6875 | 4 | [] | no_license | <?php
//-------------------------------------------------------
// Purpose: To generate integer value to words
// functionality
//
// Author : Rajeev Aggarwal
// Created on : (02.09.2008 )
// Copyright 2008-2000: syenergy Technologies Pvt. Ltd.
//
//--------------------------------------------------------
class Number... | true |
79bad30fd74929c837ed2cb681ca6c75442df0ef | PHP | xiaoshitou-xiaoshitou/ex | /ex-server/common/models/Article.php | UTF-8 | 1,573 | 2.53125 | 3 | [] | no_license | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "jl_start_page".
*
* @property int $id
* @property string $title 标题
* @property string $img 图片路径
* @property string $url 链接
* @property int $status 启用状态,默认0未启用,1启用,2已删除
* @property int $add_time 添加时间
*/
class Article extends \yi... | true |
dd74cffcf5dc4ab7de7624c874ae62cc40e1ff2c | PHP | LaravelRUS/laravel.su | /app/Application/Console/Commands/DocsDiffCommand.php | UTF-8 | 4,540 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Application\Console\Commands;
use App\Domain\Documentation\Documentation;
use App\GitHub\BranchInterface;
use App\GitHub\FileInterface;
use Illuminate\Support\Enumerable;
/**
* Вычисление диффа (количества изменений) между оригиналом и переводом.
*
* Чтобы Laravel вид... | true |
0f18196c8acf08ab68c29c9eccf9b69ceb67a51a | PHP | sandoche/BreakingOut-website | /pages/hall_of_fame.php | ISO-8859-1 | 7,328 | 2.953125 | 3 | [
"MIT"
] | permissive | <? session_start();
include("db.php");
?>
<style type="text/css">
<!--
.Style2 {
font-size: 11px;
}
.style44{
color:#ffe7b7;
}
-->
</style>
<p class="Style2">Le meilleur prisonnier est <?
$reponse1 = mysql_query("SELECT * FROM table_user WHERE statut='Prisonnier' ORDER BY carac_force+carac_intelligence+carac_agili... | true |
27e464001ec9c742e5d2c87fd27b4dc53f60da6a | PHP | XemoTangch/yii2-basic-study | /data/php-basic/dependency-injection.php | UTF-8 | 809 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Author: jiangm
* Email: jmphper@foxmail.com
* Date: 2017/10/23
* Time: 15:30
* Desc: 依赖注入
*/
// 数据库类
class Database
{
protected $adapter;
// 高耦合,不能更换适配器
/*public function __construct()
{
$this->adapter = new MySqlAdapter;
}*/
public function __con... | true |
37793e58737c7180853d4ea64d1ce24ffd0d81b1 | PHP | MateusGT063/viacao_asteroide_oficial | /cms/controller/funcionario_controller.php | UTF-8 | 4,553 | 2.6875 | 3 | [] | no_license | <?php
/*
autor: Gabriel de Melo Marcondes.
data: 05/04/2018
controller: controle de funcionários.
*/
class funcionarioController{
public function Novo($idEnd){
// Istancia a classe "Funcionario" do arquivo "funcionario_class".
$funcionario = new Funcionario();
// G... | true |
13b22f5de3aeec41ed96df3d38e1d36b1b847f0f | PHP | huxiaohe/api-framework | /app/library/Rudder/Mvc/ResponseApi.php | UTF-8 | 1,724 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Rudder\Mvc;
use Phalcon\Http\Response;
use Rudder\Mvc\Messages;
/**
*
* Class ResponseApi
* @package Rudder\Mvc
*/
class ResponseApi {
/**
* @param null $body
* @param string $message
*/
public static function sendOk($body = '', $message = '') {
if(is_object($mes... | true |
ac2721f6f785de942ec5eaa9c47ed078b28733da | PHP | AfricasTalkingLtd/africastalking-php | /src/SMS.php | UTF-8 | 1,790 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace AfricasTalking\SDK;
class SMS extends Service
{
protected $content;
public function __construct($client, $username, $apiKey, $content)
{
parent::__construct($client, $username, $apiKey);
$this->content = $content;
}
public function send($options)
{
if (empty($options['to']) || empty($opti... | true |
3b37e7bce1ed9a8771c6a1d95b33406d4188939c | PHP | karlsve/Lima-City-PHP-API | /php/homepage.php | ISO-8859-1 | 3,753 | 2.515625 | 3 | [] | no_license | <?php
function getHomepage($xml, $sid) {
global $url_homepage;
$homepage = get_request_cookie($url_homepage, "sid=$sid");
$doc = phpQuery::newDocument($homepage);
$config = getHomepageConfiguration($homepage);
$data = array(
'content' => $homepage,
'config' => $config,
'hasthreads' => false
);
if(
(... | true |
9459cf387e73590f320c2bf3c8aa3e2eca0ca84c | PHP | abdallahmaali/powerorm | /model/fields/RelationObject.php | UTF-8 | 1,441 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace powerorm\model\field;
/**
* Act a buffer for Relation Fields, to help avoid issues with
*
* @package powerorm\model
* @since 1.0.0
* @author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
*/
class RelationObject{
public $model_name;
public $model;
public function __con... | true |
db0f92414f0752ded715362f04e41ff0f4524f52 | PHP | ahbaqdadi/mehdi | /app/Application/State/Product/IsProductTypeRegrigrator.php | UTF-8 | 683 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Application\State\Product;
use App\Application\DTO\Product\UpdateProductRequest;
use App\Mocks\Product;
class IsProductTypeRegrigrator
{
public function __invoke($payload)
{
/**
* @var UpdateProductRequest $productRequest
*/
$productRequest = $payload['... | true |
d216c30d8d86c9aab58d3359b481d1eb73885055 | PHP | GruppoMeta/Movio | /src/application/classes/movio/modules/sharingButtons/views/SharingButton.php | UTF-8 | 501 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class movio_modules_sharingButtons_views_SharingButton
{
CONST REGISTRY_SHAREBUTTONS = '/shareButtons';
public static function getSharingButtonList()
{
return unserialize(org_glizy_Registry::get(__Config::get('BASE_REGISTRY_PATH').self::REGISTRY_SHAREBUTTONS, ''));
}
public static fu... | true |
51fd70cf98a1e17aeeba3bc36a5e1aeba21f250d | PHP | johnenes/cms | /database.php | UTF-8 | 5,314 | 2.578125 | 3 | [] | no_license |
<?php
define("DB_HOST", 'localhost');
define('DB_USER', 'root');
define("DB_PASS", '');
define("DB_NAME", 'icyber_');
$dataBaseConnection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if (!$dataBaseConnection) {
die('Fail Connection ' . mysqli_connect_error());
}
function fetchRecord($re... | true |
629c76f7295d3763ecfed9be7069210b18a9f8f9 | PHP | rooslunn/supreme-webmasters | /src/Page/FilePageReader.php | UTF-8 | 563 | 2.953125 | 3 | [] | no_license | <?php declare(strict_types=1);
/**
* Created by PhpStorm.
* User: russ
* Date: 12.07.17
* Time: 8:26
*/
namespace App\Page;
class FilePageReader implements PageReader
{
protected $pageFolder;
public function __construct(string $pageFolder)
{
$this->pageFolder = $pageFolder;
}
publi... | true |
ec45f079a5590cbb2551a19f769b6fe7da3351cd | PHP | edmmss/daily | /algorithm/菱形形状.php | UTF-8 | 906 | 3.859375 | 4 | [] | no_license | <?php
/**
* 输出菱形形状
*
* $max 菱形的行数(需要单数)
* $num 空格的数量
* $starNum 星星的数量
* $flag 上面还是下面
*/
$str = '';
$max = 7;
$num = floor($max / 2);
$flag = 1;
for ($i = 1; $i <= $max; $i++)
{
$tmp = $num;
$starNum = $max - ($num * 2);
for ($j = 1; $j <= $max; $j++)
{
if ($num > 0)
... | true |
c53c1bbd7148c9a7f885f121c569d6c62d91615d | PHP | meorajrul/php-aws-iot-manager | /src/CertificateHelper.php | UTF-8 | 930 | 2.578125 | 3 | [] | no_license | <?php
namespace Fruitcake\AwsIot;
class CertificateHelper
{
public static function generateKeypair()
{
$config = array(
'digest_alg' => 'sha512',
'private_key_bits' => 4096,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
);
$res = openssl_pkey_new($conf... | true |
d2d746b3b06211eba9a356d6f00124714ad77984 | PHP | dammy001/maplerad-laravel | /src/Responses/Wallet/HistoryResponse.php | UTF-8 | 2,084 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Maplerad\Laravel\Responses\Wallet;
use Maplerad\Laravel\Contracts\ResponseContract;
final class HistoryResponse implements ResponseContract
{
public function __construct(
public readonly string $transactionId,
public readonly string|null $relatedTransacti... | true |
9fa5c4b7719d7dd7658f2bb5db5bca2419b484d8 | PHP | Diwamoto/masaraframework | /lib/Core/functions.php | UTF-8 | 453 | 3.421875 | 3 | [] | no_license | <?php
/**
* htmlspecialchars()の省略形
*/
function h($string){
return htmlspecialchars($string);
}
/**
* スネークケース→キャメルケースへ変換
*/
function toCamel($string) {
return str_replace(' ', '', ucwords(str_replace('_', ' ', $string)));
}
/**
* キャメルケース→スネークケースへ変換
*/
function toSnake($string) {
return strtolower(pr... | true |
140d20d9d2e3245271dc9aecc54580d559f4b696 | PHP | jimmybengtsson/1DV610-L2 | /controller/ImageController.php | UTF-8 | 1,330 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jimmybengtsson
* Date: 2017-10-13
* Time: 10:27
*/
namespace Controller;
class ImageController
{
private $targetDir = 'uploads/';
private $validate;
/**
* Handle image upload
*/
public function run()
{
$this->validate = new \Model\... | true |
2ed79b32e98f60adcfdb2fc7a5f3c6ce9c043cbf | PHP | samizdam/PhamilyFramework | /tests/traits/FullFamilyFixtureTrait.php | UTF-8 | 3,741 | 2.75 | 3 | [] | no_license | <?php
namespace Phamily\tests\traits;
use Phamily\Framework\GenderAwareInterface;
/**
* @author samizdam
*/
trait FullFamilyFixtureTrait
{
/**
* $fatherGrandPa |===============> $sonHalfBrotherOnFatherSide
* \ /
* |===> $father
* / \
* $fatherGrandMa |===============> $son
* | \
... | true |
4fdddfeaaebe5c37d389e44ace79d44fb93089f0 | PHP | limenet/laravel-mysql-spatial | /src/Types/GeometryCollection.php | UTF-8 | 5,406 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Limenet\LaravelMysqlSpatial\Types;
use ArrayAccess;
use ArrayIterator;
use Countable;
use GeoJson\Feature\FeatureCollection;
use GeoJson\GeoJson;
use Illuminate\Contracts\Support\Arrayable;
use InvalidArgumentException;
use IteratorAggregate;
use Limenet\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonEx... | true |
783de408f00f21d703b899a6fb53df1d6573f2f2 | PHP | yangliansheng/PopUpWindow | /PopUpWindows/WindowAuth.php | UTF-8 | 3,061 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: yls
* Date: 2018/5/16
* Time: 15:18
*/
namespace Bll\PopUpWindows;
/**
* 认证弹窗
* Class WindowMallCard
* @package Bll\PopUpWindows
*/
class WindowAuth extends WindowBase
{
/**
* 用户id
* @var
*/
private $uid;
/**
* 新老用户标识
* @var
... | true |
97d0118fc171f22364ef14f68bba9d67b73dc3d3 | PHP | scato/glitch | /src/Glitch/Runtime/ActionValue.php | UTF-8 | 755 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Glitch\Runtime;
class ActionValue implements ActionInterface, ValueInterface
{
private $parameters;
private $statements;
private $parentScope;
public function __construct(array $parameters, array $statements, ActivationObject $parentScope)
{
$this->parameters = $parameters... | true |
d06b5370ebcc6c1af490467ee024c75c5e68e011 | PHP | Joey-Costa3/NiceCatchTiger | /server/models/class.ReportKind.php | UTF-8 | 2,025 | 2.96875 | 3 | [] | no_license | <?php
//require_once('Path.php');
//require_once(Path::models() . 'config.php');
require_once('config.php');
class ReportKind {
private $id;
private $reportKind;
private $default;
//------------------------ GETTERS ------------------------
public function getID(){
return $this->id;
}
public function getRep... | true |
d7ecf0179cb5db4c992180b40d4ebe4e45d70101 | PHP | umbezt/ozpilot | /resources/library/PilotDefaults/ShortCodes/linkButton.php | UTF-8 | 805 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Usage: [button page="contact" class="btn-custom" blank="true"]Go here[/button]
* Attribute Class: btn is added by default. Just add any other classes.
* Attribute Page: add external url or page slug if link is internal.
* Attribute Blank: If you want the button to load in new window, value should be tru... | true |
76b94aeb03917b88917994e089825aea6c9cf614 | PHP | cwmiller/broadworks-connector | /src/Ocip/Models/GroupUserAuthenticationAccess.php | UTF-8 | 444 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace CWM\BroadWorksConnector\Ocip\Models;
/**
* GroupUserAuthenticationAccess
*
* Group's policy for a user's access to their Authentication service configuration.
*
* @method static GroupUserAuthenticationAccess FULL()
* @method static GroupUserAuthenticationAccess NONE()
* @EnumValueType string
*... | true |
92423f973334e6c20da752508d2a5bc6e6cda5f2 | PHP | sagmor/portal-videoconferencias | /app/models/user.php | UTF-8 | 4,309 | 2.65625 | 3 | [] | no_license | <?php
class User extends AppModel
{
var $name = 'User';
var $hasAndBelongsToMany = array('Tag' =>
array('className' => 'Tag',
'joinTable' => 'users_tags',
'foreignKey' => 'user_id',
'associationForeignKey' => 'tag_id'),
... | true |
e29f3a48e40f201266cf3d7106feab3195b94c11 | PHP | TonyGLL/store-php | /views/producto/gestion.php | UTF-8 | 1,778 | 2.640625 | 3 | [] | no_license | <h1>Product Management</h1>
<!-- Mensajes para cuando se cree un producto -->
<?php if(isset($_SESSION['producto']) && $_SESSION['producto'] == "complete") : ?>
<div class="alert_green space">The product has been created successfully.</div>
<?php elseif(isset($_SESSION['producto']) && $_SESSION['producto'] != "c... | true |
4c49a2b23c74eeb5705766da3e9a4ebadd996a70 | PHP | podliy16/php-test | /tests/Services/SalaryCalculatorTest.php | UTF-8 | 2,612 | 2.828125 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use \Models\User;
use \Services\SalaryCalculator;
class SalaryCalculatorTest extends TestCase
{
public function testSalaryChangeWithAllAdjustments()
{
$alice = new User("Alice", 52, 3, 10000, true);
$salaryCalculatorService = new SalaryCalculator($alice);... | true |
f3c46f1e03ec79091a56b9ebb6011407cb8acbac | PHP | ridho008/olshop | /application/controllers/admin/User.php | UTF-8 | 3,171 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class User extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('User_m');
//Load Dependencies
}
// List all your items
public function index()
{
$users = $this->User_m->get('users')->res... | true |
4ba3b0a179961fb3bef9430bbd32104afd5f3e70 | PHP | Wenmeilin/tindercloneweb | /app/Plugins/FacebookPlugin/Repositories/FacebookRepository.php | UTF-8 | 3,014 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\FacebookFriends;
use App\Models\Photo;
use App\Models\SocialLogins;
use App\Models\Settings;
use App\Components\Theme;
class FacebookRepository {
public function __construct(
SocialLogins $socialLogins,
Photo $photo,
FacebookFriends $fa... | true |
71063f0974b8d88154cf3801ca2d44465873cc75 | PHP | tkrebs/ep3-bs | /src/Zend/Hydrator/src/AbstractHydrator.php | UTF-8 | 7,690 | 2.796875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace ... | true |
5aa3680df36a7a1b2fd1abd16febbfb9877fc10e | PHP | ArnaudOs/bio | /Models/ShopModel.php | UTF-8 | 302 | 2.625 | 3 | [] | no_license | <?php
require_once "Model.php";
class ShopModel extends Model{
protected $table = "products";
public function showProduct(){
$query = $this->db->prepare("SELECT * FROM `products`");
$query->execute();
return $query->fetchALL(PDO::FETCH_ASSOC);
}
}
?> | true |
a21e8646d545cd47c85a00d8ad29c50ed94640e2 | PHP | AlekseyAbramov/less2.3 | /admin.php | UTF-8 | 3,856 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Загрузка файла с тестом</title>
<nav>
<ul>
<li><a href="list.php">Выбрать тест</a></li>
<li><a href="test.php">Пройти тест</a></li>
</ul>
</nav>
</head>
<body>
<?p... | true |
58322815dccf93d5ace2fcb7ba0a6fbd07057fb0 | PHP | Nocturne2612/phoneshop | /frontend/controllers/DistrictController.php | UTF-8 | 1,549 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\controllers;
use Yii;
use frontend\models\District;
use frontend\models\DistrictSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* DistrictController implements the CRUD actions for District model.
*/
class DistrictController extends Contro... | true |
893c90192098afc7e62013f346d92f70ea9d85b6 | PHP | janviktor27/silver-octo-memory | /_teacher/classes/class.view-this-class.php | UTF-8 | 34,402 | 2.515625 | 3 | [] | no_license | <?php
/* Copyright (C) :JAMES DE LA CRUZ|EIJI DE LA CRUZ: - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by JAMES DE LA CRUZ && EIJI DE LA CRUZ, OCTOBER 2016
*/
include_once('./../connect.php');
date_default_timezone_set('Asi... | true |
3e5df10fdb505a085fd28af7e291a179edd059a7 | PHP | robMaher84/robMaher84.github.io | /img/webdesign/flash/mexico/forum/Forum.php | UTF-8 | 9,702 | 2.671875 | 3 | [] | no_license | <?php
############################################################
# Help / Support - http://www.flash-db.com/Board/
# Credits Jeff@Flash-db.com
# License - All I'm hoping for is some good looking
# modifications and usages of this forum - other then that it's up
# to you. Have fun. - This would all be much easier wit... | true |
06e2b0b9ddea41205466a2161fbb8530f0fd48eb | PHP | Tatsuya-yng/PHP_Youtube_KinoCode | /Lesson23.php | UTF-8 | 254 | 3.75 | 4 | [] | no_license | <?php
// 代入演算子
// 変数に代入するときに使っていた「=」は代入演算子。代入する時に、足し算や引き算を同時にすることができる。
$x = 10;
$y = 12;
$z = 20;
echo($x += 10)."\n";
echo($z += $y)."\n";
| true |
8b17866b1bf36f52dc1b77f65f1788fe11d6ff48 | PHP | anushasinha24/Task-1 | /skillsupdate.php | UTF-8 | 471 | 2.546875 | 3 | [] | no_license | <?php
include('db.php');
$uid = $_POST["uid"];
$skill = json_encode($_POST["skill"]);
$insertquery = $DBcon->prepare("INSERT INTO skills(uid,skill) VALUES(:uid, :skill)");
$insertquery->bindparam(':uid', $uid);
$insertquery->bindparam(':skill', $skill);
if($insertquery->execute())
{
$res="Skills upda... | true |
e52b8be56abd2f66bfb9e006a48a4747acadbde4 | PHP | jsblanco/learningPHP | /Language basics/17-Cookies/borrar_cookies.php | UTF-8 | 325 | 2.765625 | 3 | [] | no_license | <?php
if (isset($_COOKIE['miCookie'])) {
// Ésto no sirve:
unset($_COOKIE['miCookie']);
// Para eliminar una cookie tenemos que caducarla:
setcookie('miCookie', '', time() - 100);
echo '<h1>Cookie borrada</h1>';
} else {
echo '<h1>No hay cookies que eliminar</h1>';
}
header('Location: ver_cookies.ph... | true |
b992541ed6409d7cd31b6cf9ae8026dc2d02630d | PHP | sherlockmax/killingtime | /models/friend.php | UTF-8 | 4,593 | 3.09375 | 3 | [] | no_license | <?PHP
class friend{
public $id;
public $invite;
public $player;
public $status;
public $datetime;
function getFriendList($loginAccount){
$PDO = new myPDO();
$conn = $PDO->getConnection();
$sql = " SELECT `p`.`account`, `p`.`nickname`, `p`.`isOnline` FR... | true |