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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c9d14eed10eca3ecd5132fefc5f7eaf684a834de | PHP | Mapsred/Luryo | /src/AppBundle/Utils/GMapCoordinates.php | UTF-8 | 1,032 | 2.53125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Maps_red
* Date: 12/05/2017
* Time: 22:53
*/
namespace AppBundle\Utils;
use AppBundle\Entity\Address;
class GMapCoordinates
{
CONST API_MODEL = "http://maps.google.com/maps/api/geocode/json?address=%s";
/**
* @param Address $address
* @return null|arr... | true |
5d5ff086ba0004a034cd049e5c35350852fb332c | PHP | Adn14/EventOrganizerWeb | /dl_csv.php | UTF-8 | 1,567 | 3 | 3 | [] | no_license | <html>
<head>
</head>
<body>
<?php
session_start();
$server = "localhost";
$db = "event";
$user = "root";
$pass = "";
$exp_table = "honor"; // Table to export
$mysqli = new mysqli($server, $user, $pass, $db);
... | true |
d1aa540580763286b16ae5f83adf087d197cd2e3 | PHP | timkartar/cs315Proj | /create.php | UTF-8 | 2,595 | 2.625 | 3 | [] | no_license | <?php include "templates/header.php"; ?>
<div class="container main-body">
<div class="jumbotron text-center" style="background-color: #337ab7 !important; color: #f7f7f7">
<h2> Register a New User </h2>
</div>
<form method="post">
<div class="form-input">
<label for="name">Name</label>
<input type="tex... | true |
f5fe254abb3b176afd196121a07c99db39c8aac2 | PHP | Skalda/TestLinkAPI | /src/Entities/Build.php | UTF-8 | 532 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Skalda\TestLinkAPI\Entities;
class Build extends BaseEntity
{
protected $testPlan = null;
public $id;
public $testplan_id;
public $name;
public $notes;
public $active;
public $is_open;
public $release_date;
public $closed_on_date;
public $creation_ts;
public function getTestPlan()
{
if(... | true |
20f1c4ba2df317d5cb188844552d0d04b2c719a9 | PHP | mcmullm2-dcu/CA_Assign3 | /processes.php | UTF-8 | 2,721 | 2.71875 | 3 | [] | no_license | <?php namespace Assign3;
include 'code/header.php';
if (!isset($user) || !$user->canAccessPage()) {
// If user isn't allowed to access this page, redirect back to home.
header("Location: index.php");
}
$dashboard = $user->getPageDashboard();
if (!isset($dashboard)) {
// If user doesn't have page informat... | true |
b8241c960df5a79fde44463a39ae330ffcf634ca | PHP | psioniclimited/boat_club | /Modules/User/Repositories/RoleRepository.php | UTF-8 | 269 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\User\Repositories;
use Modules\User\Entities\Role;
class RoleRepository{
public function getAllRoles($attribute, $value, $columns = ['*']){
$role = Role::where($attribute, "LIKE", "%{$value}%")->get($columns);
return $role;
}
}
?> | true |
b6dc4446805b7ad64fde5108f6bce01f0626535f | PHP | finalclass/NetBricks | /Article/Component/ManagementLayout.php | UTF-8 | 1,867 | 2.53125 | 3 | [] | no_license | <?php
namespace NetBricks\Article\Component;
use \NetBricks\Article\Model\ArticleModel;
use \NetBricks\Common\Component\Container;
use \NetBricks\Common\Component\ContentSwitcher;
use \NetBricks\Common\Component\RelativeLink;
use \NetBricks\Facade as _;
/**
* Layout for Article
*
* Author: MMP
*
* @property \Ne... | true |
5d3bd1e46aed5e2e8e4a7e80ad1d8fd562a342a3 | PHP | vcdl1997/testes-unitarios | /src/Models/Cliente.php | UTF-8 | 537 | 3.25 | 3 | [] | no_license | <?php
class Cliente extends Pessoa{
private String $dataCadastro;
private int $numeroDeCompras;
private bool $status;
public function __construct(String $nome, String $cpf){
parent::__construct($nome, $cpf);
$this->dataCadastro = date('d-m-Y H:i:s');
$this->numeroDeCompras = 0... | true |
600dd15d2ae6e37fedb4dd533626fc3310c49458 | PHP | whd143/AlifNoon | /module/Admin/src/Admin/Gateway/DepartmentTable.php | UTF-8 | 3,152 | 2.828125 | 3 | [] | no_license | <?php
namespace Admin\Gateway;
use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\Sql\Select;
class DepartmentTable extends AbstractTableGateway {
protected $tableGateway;
public function __construct(TableGateway $tableGateway) {
$this->tableGateway = ... | true |
1d4663a24cd45f30bd20b49f5b4353bcd9e8b382 | PHP | Deluxcode-paul/example_code | /yii2/essortickets/application/models/data/Booking.php | UTF-8 | 1,178 | 2.6875 | 3 | [] | no_license | <?php
namespace app\models\data;
use Yii;
/**
* This is the model class for table "booking".
*
* @property integer $id
* @property integer $order_id
* @property integer $status
* @property string $valid_from
* @property string $valid_to
* @property integer $booking_price
* @property string $ch
* @property ... | true |
4d2898885f469e1a206286740f957cd6a758ded2 | PHP | beesheer/freehdfootage | /app/models/Manager/Resource/ExternalLink.php | UTF-8 | 1,569 | 2.90625 | 3 | [] | no_license | <?php
/**
* Manager class to for a resource external link.
*/
class Manager_Resource_ExternalLink extends Manager_Abstract
{
const RESOURCE_MEDIA_ASSET = 'media_asset';
/**
* Repo class name map based on type.
*
* @array
*/
public static $typeRepoMap = array(
self::RESOURCE_M... | true |
340155abefbf3b28631fe188c1a517e1b1d8f7fa | PHP | diepbuihuu/project-euler | /euler7.php | UTF-8 | 979 | 4.03125 | 4 | [] | no_license | <?php
$max = 10001;
$euler = new Euler();
$euler->buildPrimesList($max);
echo $euler->getPrime($max);
class Euler {
private $primes;
private $count;
public function __construct() {
$this->primes = array(2);
$this->count = 1;
}
function buildPrimesList($max) {
$i =... | true |
4d186cc5f4892109819e8fb5274b13d458c2f50a | PHP | Alexey8k/MVC_Framework_v2 | /app/core/repository/MySQLi/QueryServiceServiceMySQLi.php | UTF-8 | 851 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Core\Repository\MySQLi;
use App\Core\Repository\QueryServiceInterface;
class QueryServiceServiceMySQLi implements QueryServiceInterface
{
/**
* @var \MySQLi
*/
protected $_link;
public function __construct(\MySQLi $link)
{
$this->_link = $link;
}
functio... | true |
6556c4e986edbd0d0385abb8b0f2817f552348d2 | PHP | rendraadjip/Tugas5PHP | /3_Variables/example7.php | UTF-8 | 564 | 3.421875 | 3 | [] | no_license | <?php // Awalan dari sebuah script PHP
$x = 5; //deklarasi variabel x memiliki nilai 5
$y = 10; //deklarasi variabel y memiliki nilai 10
function myTest() { //fungsi didalam ruang lingkup lokal
global $x, $y; //deklarasi variabel x dan variabel y pada global didalam ruang lingkup
$y = $x + $y; //sebuah ... | true |
37b8e55ae8336f0ca6b4f0e8870bad9c9a775658 | PHP | venkateshshukla/iit-bhu-tpo | /services/cirrusbolt/php/thundersky/display/board/Board.List.workflow.php | UTF-8 | 1,916 | 2.515625 | 3 | [] | no_license | <?php
require_once(SBSERVICE);
/**
* @class BoardListWorkflow
* @desc Returns all boards information in forum
*
* @param keyid long int Usage Key ID [memory]
* @param forumid/id long int Forum ID [memory] optional default 0
* @param fname/name string Forum name [memory] optional default ''
*
* @param pgsz lon... | true |
bcc37c61f571c00cc06e6a28ebb92a48ac3756fb | PHP | shortymolinari/Design-Patterns | /DesignPatterns/Structural/Composite/RenderableExample/Renderable.php | UTF-8 | 161 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace DesignPatterns\Structural\Composite\RenderableExample;
interface Renderable
{
public function render(): string;
} | true |
cb0afaf201213cad04ab64c133d4a67e7a4651d8 | PHP | Scienceondrupal/NASA_Content_Aggregator | /feed/group/feed_group.inc | UTF-8 | 3,025 | 2.578125 | 3 | [] | no_license | <?php
/**
* Load a feed group.
*
* @param $fgid
* The feed group id.
* @param $reload (optional)
* A boolean to indicate whether to reload data from database.
*
* @return
* An object describing the feed group.
*/
function feed_group_load($fgid, $reload = FALSE) {
$feed_groups = &dru... | true |
fccf18f9e70f619a3c2db4bb86332d84ea832d83 | PHP | AlfaHusniMubarok/Sistem-Informasi-Distro | /Sistem Informasi Distro/ta_sbd/penjualan.php | UTF-8 | 1,865 | 2.765625 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION["Login"])){
header("location: login.php");
exit;
}
error_reporting(0);
// Create database connection using config file
include_once("config.php");
// Fetch all users data from database
$result = mysqli_query($mysqli, "SELECT * FROM penjualan");
$cari = $_P... | true |
57dd63592ea624ee48c95f5e47a47e04e8c3b868 | PHP | LeThiQuynhPhuong/App_Project_Repository | /laravel/database/seeds/GoiCreditSeeder.php | UTF-8 | 758 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class GoiCreditSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$goi_credit=[];
$goi_credit[]=[
"ten_goi"=>"goi 1",
"credit"=>"5",
"so_tien"=>"5000"
... | true |
43f73e58cb9616eb5937c7fc57d049cf64b83103 | PHP | kerdou/demo_MVC | /src/controller/category/CategoryCommonController.php | UTF-8 | 523 | 2.609375 | 3 | [] | no_license | <?php
namespace MVCExo\controller\category;
use MVCExo\Autoloader;
Autoloader::register();
abstract class CategoryCommonController
{
protected object $categoryModel; // Objet de récuperation des données de la DB pour la table 'category'
/** Si on init $categoryModel dans __construct, ça plante. L'init se p... | true |
8916809b6b6bb40b4b109a2f5e285d3bd0df66d7 | PHP | sincarne/youreno.fun | /generate-html.php | UTF-8 | 3,384 | 3.0625 | 3 | [] | no_license | <?php
# https://www.the-art-of-web.com/php/directory-list/
function getFileList($dir)
{
// array to hold return value
$retval = [];
// add trailing slash if missing
if(substr($dir, -1) != "/") {
$dir .= "/";
}
// open pointer to directory and read list of files
$d = @dir($dir)... | true |
2a6c3c62a4579179346e653ff725f46b298154ae | PHP | marzela547/proyectonegocios | /src/Controllers/Mnt/Usuario.control.php | UTF-8 | 3,530 | 2.59375 | 3 | [] | no_license | <?php
namespace Controllers\Mnt;
use Utilities\ArrUtils;
class Usuario extends \Controllers\PublicController
{
public function run(): void
{
$viewData = array();
$ModalTitles= array(
"UPD" => "Actualizar %s %s",
"DSP" => "D... | true |
c3a8d95bbed61f18b0ed9d604a36cf48045b5115 | PHP | komal1194/Practice_Ex | /PHP/Database/insert_data.php | UTF-8 | 728 | 2.8125 | 3 | [] | no_license | <?php
$con=mysql_connect("localhost","root","");
if($con)
{
echo "connection is created";
}
else
{
echo "<br>connection failed".mysql_error();
}
/*$str="CREATE Database dbExpert";
if(mysql_query($str))
{
echo "<br>Database created";
}
else
{
echo "<br>Database failed".mysql_error();
}*/
mysql_select_db("dbExpert"... | true |
135bc0fd4951dc147b179c17c7a0770ae70289c3 | PHP | KEMSolutions/duka | /app/Http/Controllers/PageController.php | UTF-8 | 1,953 | 2.75 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use Lang;
use Pages;
use Store;
use Illuminate\Support\Arr;
use cebe\markdown\MarkdownExtra;
use App\Helpers\Contracts\DukamlContract;
/**
* Class PagesController
* @package App\Http\Controllers
*/
class PageController extends Controller
{
/**
* @var MarkdownExtra ... | true |
97e896835268cc452dcc981527446f47f132095d | PHP | NetCommons3/NetCommons | /Test/Case/Model/Behavior/Trackable/TrackableBehaviorAssocTest.php | UTF-8 | 3,897 | 2.609375 | 3 | [] | no_license | <?php
/**
* TrackableBehavior association test case
*
* @copyright Copyright 2014, NetCommons Project
* @author Kohei Teraguchi <kteraguchi@commonsnet.org>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
*/
App::uses('TrackableBehaviorTest... | true |
fa8515c31fde1162e8dc44ee6a0c31908262635d | PHP | rogeriolino/doctrine-geojson | /src/RogerioLino/Doctrine/GeoJson/Property.php | UTF-8 | 2,000 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace RogerioLino\Doctrine\GeoJson;
use Doctrine\ORM\Mapping as ORM;
/**
* Property
*
* @author Rogério Lino <rogeriolino@gmail.com>
*
* @ORM\Entity
* @ORM\Table(name="geojson_property", uniqueConstraints={@ORM\UniqueConstraint(columns={"feature_id", "name"})})
*/
class Property imple... | true |
89e066f448734030448d4cdd8a061e28102402a7 | PHP | janole/laravel-dockerize | /src/Console/Commands/DockerCompose.php | UTF-8 | 6,153 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace janole\Laravel\Dockerize\Console\Commands;
use Illuminate\Console\Command;
class DockerCompose extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'docker:compose {--p|print : Only print the docker-compose.yml on... | true |
25468f428ffc76335a86ed9671c029fdeff9f4d7 | PHP | ex1usive-m4d/TemplateDocx | /models/LoadtemplateForm.php | UTF-8 | 1,689 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: ivan.bolshakov
* Date: 02.03.16
* Time: 11:41
*/
namespace app\models;
use yii\base\Model;
use yii\web\UploadedFile;
class LoadtemplateForm extends Model
{
/**
* @var UploadedFile
*/
public $docx;
public $vars = [];
public $paramsV;
public ... | true |
53ffb24c6127fc70f33430fec6c7cb5ca7ecc071 | PHP | vmrfriz/practice-site-cinema | /classes/Collection.php | UTF-8 | 1,810 | 3.03125 | 3 | [] | no_license | <?php
abstract class Collection implements Countable, Iterator, ArrayAccess
{
protected $_collection = [];
protected $_position = 0;
public function remove($id) {
foreach ($this->_collection as $k => $entity) {
if ($entity->id == $id) {
unset($this->_collection[$k]);
... | true |
213678004ff2aec297514a4d80519e9b182c7305 | PHP | Micche0306/trabian | /trabian/login.php | UTF-8 | 1,895 | 2.515625 | 3 | [] | no_license | <?php
session_start();
if ((!isset($_POST['loginn'])) || (!isset($_POST['password'])))
{
header('Location: index.php');
exit();
}
require_once "connect.php";
$connection = @new mysqli($host, $db_user, $db_password, $db_name);
if ($connection->connect_errno!=... | true |
8b1909b64839da2a95164a2e78183109e771a8db | PHP | dcps-2019-1/arrancar | /app/Http/Controllers/MantenimientoController.php | UTF-8 | 3,682 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use App\Bus;
use App\User;
use App\Mantenimiento;
use App\Empresa;
class MantenimientoController extends Controller
{
//
public function listar()
{
//Se deben listar todos los buses de la compañia, para seleccionar los qu... | true |
800c7fc4198baba7f21afc5d63fc88e52b1a1dc0 | PHP | mrusins/CODELEX | /CODELEX/tasks/RSP-web/app/Choice.php | UTF-8 | 231 | 3.34375 | 3 | [] | no_license | <?php
namespace App;
class Choice
{
public string $symbol;
public array $power;
public function __construct(string $symbol, array $power)
{
$this->symbol = $symbol;
$this->power = $power;
}
} | true |
b3f563e7d4233846186a16e6c6604da725ad8895 | PHP | TSRTW/T-STAR | /src/pocketmine/entity/Bat.php | UTF-8 | 2,325 | 2.515625 | 3 | [] | no_license | <?php
/*
*
* _____ _____ __ _ _ _____ __ __ _____
* / ___| | ____| | \ | | | | / ___/ \ \ / / / ___/
* | | | |__ | \| | | | | |___ \ \/ / | |___
* | | _ | __| | |\ | | | \___ \ \ / \___ \
* | |_| | | |___ | | \ | | | ___| | / / ___| |
* \_____/ |_____| |_| ... | true |
7f0d0faf0e465c58ca926b1204a0b83e9fcc44c4 | PHP | superhalb/SBT | /User.php | UTF-8 | 887 | 3.015625 | 3 | [] | no_license | <?php
date_default_timezone_set("UTC");
session_start();
class User {
static public $name;
static public $credentials = array (
"user" => "pwd",
"closed" => NULL
);
static public function isLogged() {
if (isset( $_SESSION['user'] ) ) {
User::$name = $_SESSION['user'];
retu... | true |
a84ab7ed79e3d6e0a75538f87b98644449621881 | PHP | nikic/scalar_objects | /tests/variadic_by_ref.phpt | UTF-8 | 541 | 3.21875 | 3 | [
"MIT"
] | permissive | --TEST--
Accept variadic arguments by reference
--SKIPIF--
<?php if (PHP_VERSION_ID < 50600) die("skip Variadics supported on PHP >= 5.6");
--FILE--
<?php
class StringHandler {
public static function incrementArgs($self, &...$args) {
foreach ($args as &$arg) $arg++;
}
}
register_primitive_type_handler... | true |
edccc53596b62facf7c2e1f9e0feafca65ec47fb | PHP | robthompsonweb/newslifemedia-recipe-finder | /recipe-finder.php | UTF-8 | 511 | 3.0625 | 3 | [] | no_license | <?php
/*
Recipe Finder run script
Usage: recipe-finder.php fridge-list recipe-list
*/
include(dirname(__FILE__).'/classes/recipe-finder.class.php');
//Check we have the correct inputs
if(count($argv) != 3) {
echo "Incorrect arguments. Correct usage: recipe-finder.php fridge-list recipe-list";
exit... | true |
d497f9a9ddd38ac2a3831e68b7830403fd157c2c | PHP | sameeriqbal1200/core-php | /admin-panel/portfolio/edit.php | UTF-8 | 3,238 | 2.53125 | 3 | [] | no_license | <?php
include ('../slider/header.php');
include ('../db_connection/connection.php');
$id = $_GET['id'];
$recordedit = mysqli_query($database, "SELECT * FROM portfolio WHERE id=$id");
while ($editrecordres = mysqli_fetch_array($recordedit)) {
$category_namee = $editrecordres['category_name'];
$statuss = $editre... | true |
04eb383d7bd4e07115feefb068f43cdef1a88e3b | PHP | EdgardBF/Comics-MoviesLine | /lib/reporte4.php | UTF-8 | 8,435 | 2.5625 | 3 | [] | no_license | <?php
//Llamamos las Librerias
require('database.php');
require('fpdf/fpdf.php');
session_name("admin");
session_start();
ini_set("date.timezone", "America/El_Salvador");
//validamos que si la variable de sesion no esta colocada entonces nos envie al login
if(isset($_SESSION['usuario'])... | true |
305737107cd2255b843323255573d16259da2614 | PHP | dohernandez/investment-manager | /src/Application/Market/Handler/AddStockInfoHandler.php | UTF-8 | 810 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Application\Market\Handler;
use App\Application\Market\Command\AddStockInfo;
use App\Application\Market\Repository\StockInfoRepositoryInterface;
use App\Domain\Market\StockInfo;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
final class AddStockInfoHandler implements MessageHand... | true |
b075c627dfa4b6a2bbae7bf578962ae661648de9 | PHP | PAYONE-GmbH/payone-php-api | /src/Request/GenericRequestFactory.php | UTF-8 | 1,108 | 2.546875 | 3 | [] | no_license | <?php
namespace ArvPayoneApi\Request;
use ArvPayoneApi\Lib\Version;
use ArvPayoneApi\Request\Parts\Config;
use ArvPayoneApi\Request\Parts\SystemInfo;
class GenericRequestFactory
{
/**
* @param $requestType
* @param $data
*
* @return GenericRequest
*/
public static function create($re... | true |
18f0fe95e132a823281f52058ecbbe1a7baa3a13 | PHP | ntzm/advent-of-code-2019 | /1/b.php | UTF-8 | 291 | 3.109375 | 3 | [] | no_license | <?php declare(strict_types=1);
function calculate_fuel($mass): float {
$fuel = floor((float) $mass / 3) - 2;
if ($fuel > 0) {
return $fuel + calculate_fuel($fuel);
}
return 0;
}
echo array_sum(array_map('calculate_fuel', file(__DIR__ . '/input.txt'))) . PHP_EOL;
| true |
d229fa070c1e41cb9eef6b6bed0dd05d9ecef23a | PHP | Andy-Den/magento-ipeakee11420-include-many-extentions | /app/code/community/Balance/Router/Helper/Request.php | UTF-8 | 932 | 2.75 | 3 | [] | no_license | <?php
/**
* Class Balance_Router_Helper_Request
*
* @author Derek Li
*/
class Balance_Router_Helper_Request
{
/**
* Check if the http request matches the module, controller and action.
*
* @param Mage_Core_Controller_Request_Http $request
* @param string $module The module name.
* @par... | true |
14ef4be124ee374c56c5029fe41bab3dd22ea5d5 | PHP | K1lg0r3/projet_toto | /inc/functions.php | UTF-8 | 2,891 | 2.96875 | 3 | [] | no_license | <?php
require dirname(__FILE__)."/db.php";
// Function to validate a date format: Shamelessly ripped off php.net.
function validateDate($date, $format = 'Y-m-d H:i:s')
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
function getCities() {
global $pdo;
$list ... | true |
0c24845955ff960bc40bb22c50ff2258838ecae3 | PHP | liuwz465501235/pdp | /src/DesignPatterns/Prototype/Core/CarBookPrototype.php | UTF-8 | 378 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Prototype\Core;
/**
* Introduction CarBookPrototype
*
* @author 刘维中
* @email liu.wz@qq.com
* @since 1.0
* @date 2017-11-29
*/
class CarBookPrototype extends BookPrototype
{
/**
* 分类
* @var type
*/
public $category = 'Car';
/**
* Introduction 克隆
*/
... | true |
5caf7507bc48fdf7f26c0f703c8fa3da16232829 | PHP | ThomasWeinert/FluentDOM | /src/FluentDOM/Xpath/Transformer.php | UTF-8 | 696 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/*
* FluentDOM
*
* @link https://thomas.weinert.info/FluentDOM/
* @copyright Copyright 2009-2021 FluentDOM Contributors
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*
*/
declare(strict_types=1);
namespace FluentDOM\Xpath {
/**
* Interface for objects that convert a (... | true |
085dcdbe9050cdda69d96a6a7b8f5ddc3819afae | PHP | OskarStark/php-8-stubs | /stubs/ext/phar/PharData.php | UTF-8 | 8,687 | 2.703125 | 3 | [] | no_license | <?php
class PharData extends \RecursiveDirectoryIterator implements \Countable, \ArrayAccess
{
/** @implementation-alias Phar::__construct */
public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS, ?string $alias = null, int $fileformat = 0)
... | true |
fec165e914cff101416dbdcf15f49e8cb498127e | PHP | codeaid-dev/PHP_practice | /Exercise_array/o_array11.php | UTF-8 | 761 | 3.625 | 4 | [] | no_license | <?php
$len = 0;
while ($len<1 || $len>10) {
print "入力:";
$nums = explode(",", trim(fgets(STDIN)));
$len = count($nums);
for ($i=0; $i<$len; $i++) {
if ($nums[$i]>=1 && $nums[$i]<=10) continue;
else {
$len = 0;
break;
}
}
}
$src = array(1,2,3,4,5,6,7,8,9,10);
$diff = [];
for ($i=0; $i<c... | true |
3498f1e6740a8e0b191ef40f2356e3f7e52a6a87 | PHP | idmahbub/radiusdesk-pwa | /cake3/rd_cake/src/Shell/Task/CountersTask.php | UTF-8 | 4,136 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Shell\Task;
use Cake\Console\Shell;
use Cake\I18n\FrozenTime;
use Cake\Datasource\ConnectionManager;
class CountersTask extends Shell {
public function initialize(){
parent::initialize();
$this->loadModel('Radusergroups');
$this->loadModel('Radgroupchecks');
}
... | true |
1a521ec34f1592e7b5f6cd73dbca2615f440821b | PHP | valdevlopp/monportfolio | /connexion.php | UTF-8 | 3,580 | 2.59375 | 3 | [] | no_license | <?php ob_start();?>
<?php require_once('inc/init.inc.php')?>
<?php
//DECONNEXION :
if( isset($_GET['action']) && $_GET['action'] == 'deconnexion' ){
//Si il y a une 'action' dans l'URL et que celle-ci est égale à 'deconnexion', alors on détruit la session
session_destroy();
header('location:index.php');
exit();
}
... | true |
45ddd0df10416f52990d297f31f316e81ec95812 | PHP | lauratata/aidtudes-projet-final | /jsonAidtudes/listePosts.php | UTF-8 | 716 | 2.953125 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
require_once 'cnx.php';
require_once 'classes/forum.php';
// Liste des lieux
$sql = /** @lang text */
"SELECT *
FROM Forum
ORDER BY ID_publication";
// Préparation de la requête
$requete = $pdo->prepare($sql);
// Tableau qui contie... | true |
c497e0dd19d1aef10049dec6a6d770e587b76bc7 | PHP | ishtvan-lucor/web_pool | /day4/ex00/index.php | UTF-8 | 617 | 2.78125 | 3 | [] | no_license | <?php
if (session_start() === FALSE) {
echo "Session didn't start\n";
exit();
}
if ($_GET["login"] != NULL && $_GET["passwd"] != NULL && $_GET["submit"] == "OK") {
$_SESSION["login"] = $_GET["login"];
$_SESSION["passwd"] = $_GET["passwd"];
}
?>
<html><body>
<form action="index.php" method="get" name="inde... | true |
aae2de8fc02c3f9eeb93da27e25740924248c822 | PHP | hihaho/laravel-saml-dsp | /src/Http/Traits/LoginHandler.php | UTF-8 | 1,115 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace HiHaHo\Saml\Http\Traits;
use HiHaHo\Saml\Http\Handlers\AbstractLoginHandler;
use HiHaHo\Saml\Models\SamlUser;
trait LoginHandler
{
protected function handleLogin(SamlUser $user)
{
if (empty($this->samlConfig->login_handler)) {
return;
}
$loginHandler = $th... | true |
d2726d1585f9ea53e5f8bdc53f66429fade1286c | PHP | sharkodlak/adventOfCode | /2019/Computer/Interpreter.php | UTF-8 | 6,770 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace adventOfCode\Computer;
class Interpreter {
const BREAK_ON_INPUT = 1;
const BREAK_ON_OUTPUT = 2;
const OP_INPUT = 3;
const OP_OUTPUT = 4;
private $instructionSet = [];
private $done = false;
private $source;
private $relativeBase = 0;
private $counter = 0;
public fun... | true |
9d0036ea674e6b2f9a8d9b677a8b0343e471fd83 | PHP | WiPeK/projektpp1 | /core/helpers/head_helper.php | UTF-8 | 3,317 | 2.640625 | 3 | [] | no_license | <?php
define("HEAD", true);
function base_url()
{
return SERVER_ADDRESS;
}
function add_base_href()
{
return "base href=\"" . SERVER_ADDRESS . "\" />";
}
function redirect($url)
{
header("Location: " . SERVER_ADDRESS . $url, true);
exit();
}
function get_segment($i)
{
$segments = explode('/', trim(parse... | true |
d7100b31f9a84c949cff2ffc53dd170f75d483e3 | PHP | AngelP11/curso-php | /blog/app/Log.php | UTF-8 | 966 | 2.984375 | 3 | [] | no_license | <?php
/*
Guardando un Log de Errores en el Servidor
En este video hablamos sobre los los que son registros de datos que guardamos con el fin de tomar acciones sobre ellos.
Un ejemplo de esto es guardar archivos de nuestros errores, también podemos guardar información sobre usuarios que intentan acceder a información... | true |
aff7be00ab14ca13b2473a761bec33ccdf00aee1 | PHP | ziquanc/OctoberCMS-Instagram-Crawler | /components/TagFeed.php | UTF-8 | 1,850 | 2.625 | 3 | [] | no_license | <?php namespace Kent\InstagramCrawler\Components;
use Kent\InstagramCrawler\autoload;
use Cms\Classes\ComponentBase;
use Kent\InstagramCrawler\Models\Settings;
use InstagramScraper\Instagram;
class TagFeed extends ComponentBase
{
public $media;
public function componentDetails()
{
return [
... | true |
fe1b7f1ade8874e230b6401499baf51ad073d238 | PHP | SergioXp/adminforce | /application/models/Notification_Model.php | UTF-8 | 815 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
Class Notification_Model extends CI_Model {
public $id;
public $read;
public $object;
public $date;
public $user;
function addNotification ($user, $object){
$data = array(
'read' => false,
'object' => $object,
'user' => $user,
'date' => date("Y-m-d H:i:s")
);
$this->db->insert('notifi... | true |
b2ceaba81071d64742052fe06858f8562a992930 | PHP | thiago-web/thecall | /User.class.php | UTF-8 | 2,303 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
/**
* Utilizador do chat
*
* @package Chat\User
* @author Sandro Miguel Marques <sandromiguel@produlogia.com>
* @version v.1.0 (06/04/2016)
* @copyright Copyright (c) 2016, Sandro
*/
class User extends DbConnPDO {
/** @var string|null Query SQL */
private $_sql;
... | true |
598aa749d03c635380637d05404bb3b20f780c21 | PHP | jstering/curso-poo | /construtor/Pessoa.php | UTF-8 | 242 | 3.71875 | 4 | [] | no_license | <?php
class Pessoa {
public $nome;//Atributo
public function falar(){//metodo
return "O meu nome é ".$this->nome;
}
}
$joilson = new Pessoa();
$joilson->nome = "Joilson Stering";
echo $joilson->falar();
| true |
5c654847c27dd46eed44c208fd8efd84bb618f3a | PHP | kotori-web-solutions/iwb-sbergmod | /serverside/wetterbericht.php | UTF-8 | 1,538 | 3.0625 | 3 | [] | no_license | <?php
$wetter_incoming = preg_replace("/[^a-zA-Z0-9_,.\s]/","", $_POST['weather']);
echo "<pre>";
$lines = explode("\n", $wetter_incoming);
$head = str_getcsv(array_shift($lines));
$wetterarray = array();
foreach ($lines as $line) {
$wetterarray[] = array_combine($head, str_getcsv($line));
}
$dbh = new PDO('... | true |
8f867e14d96fcc1a63bdb97aa0a8457f18ae1f33 | PHP | archonkulis/cv-maker | /app/models/Cv.php | UTF-8 | 3,487 | 3.0625 | 3 | [] | no_license | <?php
/**
* Class Cv
*/
class Cv extends BaseModel {
private $first_name;
private $last_name;
private $birthday;
private $email;
private $image;
private $pdf;
private $education;
private $languages;
/**
* Saglabājam atribūtus
*
* @param array $data
*/
... | true |
d8af6c5c336170953493822025164a3204814458 | PHP | jpdery/agavi | /build/phing/org/agavi/build/tasks/AgaviSelectpathTask.php | UTF-8 | 3,187 | 2.890625 | 3 | [] | no_license | <?php
// +---------------------------------------------------------------------------+
// | This file is part of the Agavi package. |
// | Copyright (c) 2005-2010 the Agavi Project. |
// | ... | true |
6df3f0684390b0e8ce127b339e3ab5ef4c154ab3 | PHP | vuzonp/mazzy | /src/Handler/Mixin/Http.php | UTF-8 | 3,575 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License
*
* Copyright 2014 thomas.
*
* 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, m... | true |
544c32a9211b67b0c4bfddbcf5fe0842c5d14917 | PHP | jaceldran/zentric | /demo/src/MyController.php | UTF-8 | 1,767 | 2.671875 | 3 | [] | no_license | <?php namespace App;
// uses
use \Zentric\View as View;
use \Zentric\Navigation as Nav;
class MyController
{
// [__construct]
function __construct()
{
// global app reference
global $app;
$this->app = $app;
// render nav main
// usually this can be located at some "middleware" action.
$links = $this... | true |
639d2ade1ac00bd4d92162742b014ed961ca5b89 | PHP | jeremy-habit/MiniFrameworkPHP | /app/MagicMonkey/Framework/Cleaner/CleanerList/StripTags.php | UTF-8 | 529 | 3.09375 | 3 | [] | no_license | <?php
namespace MagicMonkey\Framework\Cleaner\CleanerList;
use MagicMonkey\Framework\InterfaceRepository\CleanerTypeInterface;
/**
* Permet de supprimer les balises HTML et PHP d'une valeur
* Class Trim
* @package MagicMonkey\Framework\Cleaner\CleanerList
*/
class StripTags implements CleanerTypeInterface
{
... | true |
31967718ca3a1f05a28d98144707803996838a00 | PHP | elif-caliskan/database | /project3/2016400183_code/admin_coauth.php | UTF-8 | 818 | 2.90625 | 3 | [] | no_license | <?php
require 'header.php';
if(!isset($_GET['id']) || empty($_GET['id'])){
header('Location:/admin.php');
exit;
}
$quer=$db->prepare('SELECT * FROM Author WHERE author_id=?');
$quer->execute([
$_GET['id']
]);
$author_base=$quer->fetch(PDO::FETCH_ASSOC);
$name=$author_base['name'];
$surname=$author_base['sur... | true |
d763e1cfc14d2d8d6bf38d6a3ee34f6e9c1ae524 | PHP | jeferson1987/CodePress | /packages/codetag/src/CodeTag/Models/Tag.php | UTF-8 | 841 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jeferson
* Date: 28/01/2016
* Time: 08:25
*/
namespace CodePress\CodeTag\Models;
use Cviebrock\EloquentSluggable\SluggableInterface;
use Cviebrock\EloquentSluggable\SluggableTrait;
use Illuminate\Database\Eloquent\Model;
class Tag extends Model implements SluggableInter... | true |
7da368f270a5aac537fdfaf9cde03801f2744075 | PHP | linojiang268/jh008-vote-server-php | /app/Contracts/Services/Photo/PhotoFrameService.php | UTF-8 | 1,803 | 2.84375 | 3 | [] | no_license | <?php
namespace Jihe\Contracts\Services\Photo;
interface PhotoFrameService
{
/**
* generate frame of photo
*
* @param $photo path to an image that's supposed to be put in the top of generated photo
* @param $text content to be put in the bottom of generated photo
* @... | true |
7ffa4ac4bf57fc20f547cf8227378c2ffc084946 | PHP | klsweat/php_cert_course_2 | /sandbox/public/Homework/Shoe.php | UTF-8 | 252 | 3.046875 | 3 | [] | no_license | <?php
namespace Homework;
class Shoe extends Product{
protected $laceColor;
public function getLaceColor(){
return $this->laceColor;
}
public function setLaceColor($laceColor){
$this->laceColor = $laceColor;
}
}
| true |
edb35778dabb29bf5d0c13abcce9a9642260a450 | PHP | frameworkmaestro/maestro3-exemplos | /services/pessoaDocumentoService.php | UTF-8 | 833 | 2.71875 | 3 | [] | no_license | <?php
use exemplos\models\DocumentoTeste;
use exemplos\models\PessoaTeste;
use exemplos\repositories\DocumentoTesteRepository;
class PessoaDocumentoService extends \MService {
private $documentos;
public function __construct() {
parent::__construct();
$this->documentos = new DocumentoTesteRepository;
}
pu... | true |
102435041b2d1d63abbc7ecd60a4dff23cb1212f | PHP | J-Force/BackEndSystem | /database/migrations/2014_12_02_212311_create_bill_table.php | UTF-8 | 586 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBillTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('bills',function($t){
$t->integer('id');
$t->primary('id');
$t->intege... | true |
49f9ca1db3cdd6cc32b1bab9cc0209d0e4394efc | PHP | diflecos/difpos | /old/yii-version/common/models/InvoiceDeliveryNoteSeries.php | UTF-8 | 1,435 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "invoice_delivery_note_series".
*
* @property string $id
* @property string $type
* @property string $name
* @property string $desc
* @property string $series_code
*
* @property Order[] $orders
*/
class InvoiceDeliveryNoteSerie... | true |
66d6194f15c2ec74a563f78d9f6935eb9c42b06a | PHP | ashrafulsbmcbd/SSLCommerz-EasyDigitalDownload | /sslcommerz_ipn.php | UTF-8 | 3,193 | 2.5625 | 3 | [] | no_license | <?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
$store_id = edd_get_option( 'store_id' );
$store_password = edd_get_option( 'store_password' );
$order_id = $_POST['tran_id'];
$payment = new EDD_Payment($order_id);
if($store_id !="" && $store_password != "")
{
if(edd_is_test_mode()) {
... | true |
bcdbf9a3bb5f170895be6783dad976b5e2b7708f | PHP | dominikzogg-legacy/energycalculator2 | /app/Deserialization/DateRangeMapping.php | UTF-8 | 861 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Energycalculator\Deserialization;
use Chubbyphp\Deserialization\Mapping\ObjectMappingInterface;
use Chubbyphp\Deserialization\Mapping\PropertyMapping;
use Chubbyphp\Deserialization\Mapping\PropertyMappingInterface;
use Energycalculator\Model\DateRange;
final class DateRangeM... | true |
e72215ce263f790d7ac2d3eaa206563ce3776530 | PHP | Bastien-Bourgon/serpico | /src/Entity/Book.php | UTF-8 | 1,869 | 2.75 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\BookRepository")
* @ORM\Table(name="books")
*/
class Book
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(t... | true |
c514da3a69c12ba6fae2ce2badf33ab3e745c7bc | PHP | zhangchunyu-6/myform | /app/Tools/Tools.php | UTF-8 | 6,091 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Tools;
use Illuminate\Support\Facades\Cache;
class Tools
{
public function char()
{
$access_token = $this->get_access_token();
echo $access_token;
}
public function get_access_token()
{
$key='wechat_access_token';
//dd($key);
//判断是否为空
if(Cache::has($key)){
// 有,取出来... | true |
dc05bdd5c0aef09d9765eff5bfa912a0408450c2 | PHP | rajanbajaj/PHP-and-SQL-practice-projects | /msimatch/edit.php | UTF-8 | 1,971 | 2.53125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Edit Profile</title>
</head>
<body>
<?php
define('MM_UPLOADPATH', 'images/');
require_once('start_session.php');
$pagetitle = 'Edit Profile';
require_once('header.php');
require_once('navmenu.php');
if(isset($_SESSION['user_id'])){
if (isset($_POST['submit'])) {
require_once('c... | true |
44a26052e214a651e67b1b75f6dcbe3a529c1efd | PHP | climbingcode/to-do-list-laravel | /database/seeds/DatabaseSeeder.php | UTF-8 | 1,025 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use todolist\Todolist;
use todolist\Task;
use todolist\User;
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::statement('SET FOREIGN_KEY_CHECKS = 0');
$f... | true |
f0f7373a71461571b300db6e944fcd61acca080b | PHP | AttwFramework/framework | /libs/Attw/Db/Sql/MySQL/Clause/From.php | UTF-8 | 443 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* AttwFramework
*
* @author Gabriel Jacinto <gamjj74@hotmail.com>
* @license MIT License
* @link http://attwframework.github.io
*/
namespace Attw\Db\Sql\MySQL\Clause;
use Attw\Db\Sql\AbstractClause;
class From extends AbstractClause
{
private $table;
public function __construct($table)
{
... | true |
fc524375a683854334274abab10e8c47285802e0 | PHP | nairobyalbarran/php-and-mysql-24-hour-trainer | /guiados/lesson21code/lesson21cs/includes/classes/category.php | UTF-8 | 1,704 | 3.1875 | 3 | [] | no_license | <?php
/**
* category.php
*
* Caterogy class file
*
* @version 1.2 2011-02-03
* @package Smithside Auctions
* @copyright (c) 2011 Smithside Auctions
* @license GNU General Public License
* @since Since release 1.0
*/
/**
* Category class
* @package Smithside Auctions
*/
class Category
{... | true |
fb0198a54f30cae01a292ea76ebb2d66d6aae29d | PHP | pro2s/fa-runner | /src/Domain/Model/Runner.php | UTF-8 | 2,699 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Domain\Model;
use Common\Id;
use Domain\Exception\RunAlreadyParticipated;
use Domain\Exception\RunAlreadyStarted;
use Domain\Exception\RunNotParticipated;
use Domain\Exception\RunResultAlreadySaved;
use Domain\Exception\RunResultExpired;
use Domain\Exception\TimeLimitReache... | true |
1eba55ba3a380c631155eb42f5957e6c3646d618 | PHP | leandro-web/learn-laravel-6 | /app/Http/Controllers/ProductController.php | UTF-8 | 4,381 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreUpdateProdutoRequest;
use App\Models\Produto;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class ProductController extends Controller
{
protected $request;
private $repository;
public function __construct(Request $r... | true |
e451d4a6f12411085aea0805cd02d33b1c44a241 | PHP | mikaeljorhult/brackets-php-code-quality-tools | /modules/vendor/phpcs/rulesets/DrupalPractice/Sniffs/General/OptionsTSniff.php | UTF-8 | 3,403 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* DrupalPractice_Sniffs_General_OptionsTSniff
*
* PHP version 5
*
* @category PHP
* @package PHP_CodeSniffer
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
/**
* Checks that values in #otions form arrays are translated.
*
* @category PHP
* @package PHP_CodeSniffer
* @link http:... | true |
12babcb5c17067d8c138f505f21193aa9e8c09da | PHP | leifos-gmbh/ILIAS | /Services/ADT/classes/class.ilADTFactory.php | UTF-8 | 5,551 | 2.953125 | 3 | [] | no_license | <?php
require_once "Services/ADT/classes/class.ilADT.php";
require_once "Services/ADT/classes/class.ilADTDefinition.php";
class ilADTFactory
{
protected static $instance; // [ilADTFactory]
/**
* Constructor
*
* @return self
*/
protected function __construct()
{
// #15666 - generic fi... | true |
c2eac59b8e7da1ebd6a63db82758dba0c9762c23 | PHP | Gavcor74/aprendiendo-php | /23-ejercicios/ejercicio3.php | UTF-8 | 1,660 | 3.796875 | 4 | [] | no_license | <?php
/**
* HACER UNA CALCULADORA QUE SE LE PASEN LOS DATOS
* POR UN FORMULARIO.
* HACER UNA INTERFAZ DE USUARIO (FORMULARIO)CON DOS INPUTS Y 4 BOTONES
* UNO PARA SUMAR, RESTAR, DIVIDIR Y MULTIPLICAR.
*/
if(isset($_POST['num1']) && ($_POST['num2'])){
$resultado=false;
if(isset($_POST['sumar'])){
... | true |
610059593237b3489b2c7e6ae4a88e626df700c2 | PHP | SacredZombie78/csci2006_dillonziegelmann | /database.php | UTF-8 | 724 | 3.140625 | 3 | [] | no_license | <?php
abstract class Database{
private $id;
private $haschange;
abstract public function get($id);
abstract public function update($array);
abstract public function saveData($save);
abstract public function deleteData();
final protected function hasChange(){
$this->haschange = true;
}
... | true |
24f69b7d20754251ef31ca86e70bd04dcfbd7d3c | PHP | jandersen65/Volleyball | /KTV-Homepage-ResultatVermittlung/php/mvc/view/EmbedViewer.php | UTF-8 | 880 | 2.65625 | 3 | [] | no_license | <?php
class EmbedViewer {
public function printSammlungen($sammlungen) {
echo "<ul class='uk-nav uk-nav-side uk-nav-parent-icon' data-uk-nav='{multiple:true}'>";
foreach ($sammlungen as $sammlung) {
echo "<li class='uk-parent'>";
echo "<a href='#'>" . $sammlung->getSammlungName() . "</a>";
$th... | true |
c0b38f305df209dfa559a56d1261965056f27a49 | PHP | vwointegration/vwo-php-sdk | /src/Logger/LoggerInterface.php | UTF-8 | 232 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace vwo\Logger;
/***
* Interface LoggerInterface
* @package vwo\Logger
*/
interface LoggerInterface{
/**
* @param $msg
* @param $level
* @return mixed
*/
public function addLog($msg,$level);
} | true |
7f04bfd88c2b826557d263802a38edb6de822b44 | PHP | svenschrodt/P7Tools | /src/P7Tools/Base/Data/ArraySorter.php | UTF-8 | 8,361 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
/**
* P7Tools\Base\Data\ArraySorter
*
* Static methods for sorting arrays of arrays - useful for pure data without
* data base context
*
* @since 2018-12-19
* @link https://github.com/svenschrodt/P7Tools
* @author Sven Schrodt<sven@schrodt-service.net>
* @package P7Tools
* @... | true |
8c28cbc536365e0df4414d74c381db46297ce64b | PHP | r-ichard/website | /src/AppBundle/Services/VariantRepositoryService.php | UTF-8 | 1,518 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Services;
use AppBundle\Entity\Variant;
use Doctrine\ORM\EntityManager;
/**
* Class VariantRepositoryService
* @package AppBundle\Services
*/
class VariantRepositoryService
{
/**
* @var EntityManager
*/
private $em;
/**
* VariantRepositoryService constructor.
... | true |
5654acc535290d7a0991a193b7226d7d4bf8d5fb | PHP | RubenvEijkeren/Faculteit-V-5e945d4a | /faculteit_v2.php | UTF-8 | 260 | 3.28125 | 3 | [] | no_license | <<?php
echo "Van welk getal wil je de faculteit weten?\n";
$getal = rtrim(fgets(STDIN));
$fac = $getal;
$i = 1;
if (is_numeric($getal)){
while ($i < $getal){
$fac = $fac * $i;
$i++;
}
echo "De faculteit van " . $getal . " is " . $fac . "\n";
}
?> | true |
5ad6fc50dca508e533ac99377fc416573ad47db7 | PHP | MateusGT063/viacao_asteroide_oficial | /cms/controller/frota_controller.php | UTF-8 | 4,922 | 2.625 | 3 | [] | no_license | <?php
/*
Autor: Vinicius Matias Rodrigues
Data de modificação: 06/04/2018
Controller: Frota
*/
class frotaController{
public function Novo(){
//Caminho onde as imagens serão alocadas
$upload_dir = "imagens/";
// Para manipular arquivos, deve ser usado "$_FILES"!!!
// Armaze... | true |
68138c8ee34e1bd6195e3918c9205df28f400509 | PHP | rodrigoprimo/estudiolivre | /src/lib/smarty_tiki/outputfilter.highlight.php | UTF-8 | 4,288 | 2.546875 | 3 | [] | no_license | <?php
// $Id$
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
/*
* Smarty plugin
* -------------------------------------------------------------
* File: outputfilter.highl... | true |
9034ca149a0ef6bf16b32cf6192a28bc433cd074 | PHP | bymaximus/fullstack-challenge | /apiato/vendor/dto/dto/src/Validators/Types/BooleanValidator.php | UTF-8 | 537 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Dto\Validators\Types;
use Dto\Exceptions\InvalidDataTypeException;
use Dto\TypeDetectorInterface;
use Dto\Validators\AbstractValidator;
use Dto\Validators\ValidatorInterface;
class BooleanValidator extends AbstractValidator implements ValidatorInterface
{
public function validate($value, array $s... | true |
98d2088badb4057c83d97e10bf346922413a28ea | PHP | jlcross/MindTouchAPI | /src/MindTouchApi/MindTouchApi.php | UTF-8 | 44,573 | 3.09375 | 3 | [] | no_license | <?php
namespace MindTouchApi;
class MindTouchApi {
private $api_url;
private $api_username;
private $api_password;
private $edit_time;
private $format = 'parsed';
public function __construct($config = array()) {
if (count($config) > 0) {
$this->setApiCredentials($config);
}
$this->edit_time = date('Ym... | true |
7cb47f234fa40604e453f5c733c76bbff74afcee | PHP | BoltAuth/Auth | /src/Storage/Schema/Table/AccountMeta.php | UTF-8 | 1,345 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Bolt\Extension\BoltAuth\Auth\Storage\Schema\Table;
use Bolt\Storage\Database\Schema\Table\BaseTable;
/**
* Account meta table.
*
* Copyright (C) 2014-2016 Gawain Lynch
*
* @author Gawain Lynch <gawain.lynch@gmail.com>
* @copyright Copyright (c) 2014-2016, Gawain Lynch
* @license https://o... | true |
70b2bb757b486f9fd04ac2224447e4af6db9c3da | PHP | silenca/yii_test_task | /controllers/GoogleapiController.php | WINDOWS-1251 | 2,851 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\controllers;
use Yii;
use app\components\GoogleApi;
use yii\helpers\Url;
class GoogleApiController extends BaseController
{
public function actionAuth()
{
$google_api = $this->setupClient();
if (isset($_SESSION['google_access_token'])) {
$google_api->client->... | true |
cc4e2d0d381625bbd5e04370a7f7f021acf35fbf | PHP | afdafd/msg-notice | /src/Notice/NoticeFactory.php | UTF-8 | 1,029 | 2.703125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Notice\Notice;
/**
* Class Notice
* @package Notice
*
* @method static \Notice\Notice\DinDin\DinDinNotice dinDin($config)
* @method static \Notice\Notice\Email\EmailNotice email($config)
* @method static \Notice\Notice\Sms\SmsNotice sms($config)
* @method static \Notic... | true |
7481a09e623e6a226e1d36cb46efea647f96a1ea | PHP | apparena/aa_recorder | /modules/Js/Facebook.php | UTF-8 | 1,830 | 2.796875 | 3 | [] | no_license | <?php
/**
* facebook Js's facebook helper class
*/
class Js_Facebook
{
/**
*
* save user info to session
*
*/
function saveUser($aa_inst_id,$user)
{
$session_key=generateSessionKey($aa_inst_id);
$session=new Zend_Session_Namespace($session_key);
$session->facebook=array();
$session... | true |
da0d3792d8544178ead2d2e084bd22ff1d0684be | PHP | Student-Puma/UserInterfaces | /View/PROF_TITULACION_DELETE_View.php | UTF-8 | 1,777 | 2.59375 | 3 | [] | no_license | <?php
/**
* Autor: Diego Enrique Fontán Lorenzo
* DNI: 77482941N
* Fecha: 15/12/2019
*/
/**
* Vista de la función DELETE de la entidad
*
* @var tupla Datos de la entidad
*/
class PROF_TITULACION_DELETE
{
/**
* Constructor de la clase
*/
function __construct($tupla)
{
$this->tupla =... | true |