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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5038693d701411c31a8129b43757f75170803596 | PHP | laszlokorte/sql-toolkit | /src/LaszloKorte/Resource/Scope/Focus.php | UTF-8 | 352 | 2.703125 | 3 | [] | no_license | <?php
namespace LaszloKorte\Resource\Scope;
final class Focus {
private $entityId;
private $recordId;
public function __construct($entityId, $recordId) {
$this->entityId = $entityId;
$this->recordId = $recordId;
}
public function getEntityId() {
return $this->entityId;
}
public function getRecordId() ... | true |
ca4ee691b903833b0cafaca33e7aec2db5ae9bb3 | PHP | FozzyHosting/leaderssl-api-client | /src/V1/Clients.php | UTF-8 | 3,279 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Fozzy\LeaderSSL\Api\V1;
use Fozzy\LeaderSSL\Api\V1\Entities\DCV;
use Fozzy\LeaderSSL\Api\V1\Entities\Orders;
use Fozzy\LeaderSSL\Api\V1\Entities\Balance;
use Fozzy\LeaderSSL\Api\V1\Entities\Products;
use Fozzy\LeaderSSL\Api\V1\Entities\Certificates;
use Fozzy\LeaderSSL\Api\V1\HttpClients\HttpClient;
... | true |
caff4e2e1e399750eedd063a6ffbaa39718d451a | PHP | bradenborman/marchmaddness2019 | /Php_Scripts/recoverPassword.php | UTF-8 | 1,680 | 2.515625 | 3 | [] | no_license | <?php
if(isset($_GET['email']))
$USERS_EMAIL = $_GET['email'];
else {
header('Location: https://cbbbluechips.com/');
exit();
}
require 'db_connect.php';
$getEmail = "SELECT * FROM USER WHERE EMAIL = '$USERS_EMAIL'";
$CheckSQL= $conn->query($getEmail);
while ($row = mysqli_fetch_array($CheckSQL)) {
$P... | true |
baf078bd8624f0fb84e97968806bc636db37c269 | PHP | rectorphp/rector | /src/PhpParser/NodeTransformer.php | UTF-8 | 4,680 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare (strict_types=1);
namespace Rector\Core\PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayItem;
use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Yield_;
... | true |
74bf4f6f458d93946dfd3c176f0bfb0cfb5641f3 | PHP | beletot/tmp | /task/read-xml/_backup/helper/file.php | UTF-8 | 688 | 3.21875 | 3 | [] | no_license | <?php
class JFile {
/**
* Gets the extension of a file name
*
* @param string $file The file name
* @return string The file extension
* @since 1.5
*/
function getExt($file)
{
$dot = strrpos($file, '.') + 1;
return substr($file, $dot);
}
/**
* Strips the last extension off a file name
*... | true |
04a33f03285523cf23cbde6af112bbae032f74d3 | PHP | developbiao/explore2018 | /0522/index.php | UTF-8 | 665 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
$id = isset($_GET['id']) ? $_GET['id'] : 0;
$cache_name = md5(__FILE__) . '-' . $id . '.html';
$cache_lifetime = 30;
// 开启ob
ob_start();
// cache 过期检查
if(filectime(__FILE__) <= time() && file_exists($cache_name) && filectime($cache_name) + $cache_lifetime >= time())
{
include($cache_name);
error_log("fr... | true |
43d359d9fc294220ede3017c8df350c77ed29086 | PHP | jseremba/travelsheets-api | /src/AppBundle/DataFixtures/ORM/StepFixtures.php | UTF-8 | 3,497 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: quentinmachard
* Date: 02/11/2017
* Time: 15:54
*/
namespace AppBundle\DataFixtures\ORM;
use AppBundle\Entity\Step\AccomodationStep;
use AppBundle\Entity\Step\TourStep;
use AppBundle\Entity\Step\TransportationStep;
use AppBundle\Entity\Travel;
use Doctrine\Bundle\Fixture... | true |
093a22adaa6c49a14c0e52535e700beceb53ab1a | PHP | scssphp/scssphp | /src/Ast/Selector/ParentSelector.php | UTF-8 | 1,317 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Ast\Selector;
use ScssPhp\ScssPhp\Visitor\SelectorVisitor;
/**
* A selector that matches the parent in the Sass stylesheet.
... | true |
c1f00be64a8613494a46d0109ed77cec06cfca48 | PHP | leunam90/SistemaAccesoUsuarios | /wsSSP/lib/conexion.php | UTF-8 | 4,352 | 2.859375 | 3 | [] | no_license | <?php
//Version. 1.0. 2015. Secretaria de Seguridad Pública del Estado de Yucatán. Departamento de Desarrollo de Software. Copyright 2015.
class Conexion {
private $servidor;
private $baseDatos;
private $usuario;
private $password;
var $filasModificadas;
var $filasConsultadas;
public funct... | true |
c066d32553b1a0ac3bd57c93228fdb55a10a208e | PHP | dengrei/easyWork | /vendor/eframe/framework/Illuminate/Payment/PaymentBase.php | UTF-8 | 3,559 | 2.75 | 3 | [] | no_license | <?php
/**
*
|+----------------------------------------
|支付基类
|@author Administrator
|
|tags
|+----------------------------------------
*/
namespace Illuminate\Payment;
class PaymentBase
{
protected static $instance = null;
/**
*
|+----------------------------------------
| 支付对象
|+----------------------------... | true |
9cb8d62c55a78bcb4f9f9e9eb340420d3ec57ee6 | PHP | Vaniomarcos/atos_normativos | /DAO/AtoNormativo.php | UTF-8 | 2,249 | 2.53125 | 3 | [] | no_license | <?php
include_once __DIR__ . DIRECTORY_SEPARATOR . 'db.php';
class AtoNormativoDao
{
function read($id = NULL)
{
if (empty($id)) {
DB::query("SELECT
an.*,
cg.descricao as no_claficacao_geral,
tan.descricao as no_tipo_ato_normativo,
eos.des... | true |
41e4c06f7ade6f959611e39bf309f1b49702b7dd | PHP | boophp/boophp.github.io | /code/06/quanzhantools/lib/db/DDb_SaeHandle.php | UTF-8 | 8,242 | 2.6875 | 3 | [] | no_license | <?php
/**
* 此类可以去掉了。
*
* @package
* @subpackage
*/
class DDb_SaeHandle extends SaeObject
{
/**
* 构造函数
*
* @param bool $do_replication 是否支持主从分离,true:支持,false:不支持,默认为true
* @return void
* @author EasyChen
*/
function __construct($do_replication = true)
{
//本地测试时用
return $this->initLocalDB();
... | true |
f6784cd3d46187139eaf17cdd22f8ae0902e9c6e | PHP | c-daney/Elastica-querybuilder | /src/Builder/QueryFiltered.php | UTF-8 | 4,529 | 2.640625 | 3 | [] | no_license | <?php
/**
* Description of newPHPClass
*
* @author fabriciobedoya
*/
namespace Fafas\ElasticaQuery\Builder;
use Fafas\ElasticaQuery\Elastica\EntityInterface;
use Fafas\ElasticaQuery\Builder\QueryFilteredQuery;
class QueryFiltered implements EntityInterface {
const QUERY_FILTERED = 'query_filtered';
c... | true |
4bad99452ad2d144b78bff96c178e98bdb7f075a | PHP | SeraYang/www | /openhouse/public/page1.php | UTF-8 | 575 | 3.203125 | 3 | [] | no_license | <html>
<head>
<title></title>
<?php
echo "this is the first line. <br>";
echo "<p> this is the second line. </p><br>";
echo "<b> this is the third line. </b><br>";
echo nl2br("One line. \n Another line.\n");
echo "& " '"; echo... | true |
431ea039d5240d523b2202033560964c300863c9 | PHP | gilbite/tddbctokyo15jihanki | /src/Jihanki/Money/Cash.php | UTF-8 | 1,374 | 3.390625 | 3 | [] | no_license | <?php
namespace Gilbite\Jihanki\Money;
class Cash
{
protected static $instances = array();
protected $value = 0;
/**
* getAvailableCoins
*
* @static
* @access public
* @return array list of int
*/
public static function getAvailableCoins()
{
return array(1,... | true |
016c635516221abc09cf586d71282a0a089857a4 | PHP | Jimkingsc2/carrito | /class/Auxiliar.php | UTF-8 | 8,698 | 2.765625 | 3 | [] | no_license | <?php
class Auxiliar{
private $val;
private $con;
private $qry;
private $resource;
private $esSQLI;
private $badCode = array('select','from','delete','where','update','having',
'order','by','union','all', 'and','or','=','>','<',/*'\'','\"',*/'information_schema','table_name','column_name');
... | true |
5f0a6ab8838ae98ca9a29999605723211c50122e | PHP | lacroixDj/playfinder_test | /src/Entity/Slot.php | UTF-8 | 2,609 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\SlotRepository")
*/
class Slot
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
... | true |
43b7019fd58f000c7b588a1b233a2b756513ccde | PHP | nymedia/php-aera-checkout | /src/Checkout/AeraCheckoutTransaction.php | UTF-8 | 2,097 | 2.8125 | 3 | [] | no_license | <?php
namespace AeraCheckoutApi\Checkout;
/**
* Class AeraCheckoutTransaction
* @package AeraCheckoutApi\Checkout
*/
class AeraCheckoutTransaction
{
/**
* @var AeraCheckoutConnectInterface
*/
protected $connect;
/**
* @var string
*/
protected $url;
/**
* AeraCheckoutTransaction construc... | true |
b31c2c042a8df31e1964e2b76a6bf09f3a3b9947 | PHP | alquemedia/PostREST-PHP7-REST-API-for-PostgreSQL | /classes/Alquemedia_PostREST/Components/SQL/Select_Statement.php | UTF-8 | 729 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: dgreenberg
* Date: 10/6/16
* Time: 10:06 PM
*/
namespace Alquemedia_PostREST\Components\SQL;
use Alquemedia_PostREST\String_Object;
/**
* Class Select_Statement
* @package Alquemedia_PostREST\Components\SQL
*
* A SELECT Statement
*/
class Select_Statement extends S... | true |
5d8b27359679fac48228f7405af59d08612cc1ca | PHP | jmcornuet/adh5 | /testunique.php | UTF-8 | 369 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
function arrayunique($a) {
$b=array();
for ($i=0;$i<count($a);$i++) {
if ($i==0) array_push($b,$a[0]);
$trouve=false;$j=0;
while ((!$trouve)and($j<count($b))) {
$trouve=($b[$j]==$a[$i]);
if (!$trouve) $j++;
}
if (!$trouve) array_push($b,$a[$i]);
}
return $b;
}
$a=["1","1","2","3"... | true |
1eb8d7b6e7e8b5f9916b09140c44fd49b8ac0e4d | PHP | nounen/laravel5.5_quick_build | /app/Console/Commands/CurdMakeViews.php | UTF-8 | 1,858 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
/**
* eg: `php artisan curd:make_views Admin/RolePermission`
* Class CurdMakeViews
* @package App\Console\Commands
*/
class CurdMakeViews extends Command
{
/**
* The name and signature of the console command.
*
* @var string... | true |
1547fa8eea93beadad0f73abe8e70f79c96da8c2 | PHP | ronnie173/kevin-linux | /WafTest/php/session_test.php | UTF-8 | 271 | 2.671875 | 3 | [] | no_license | <?php
// initialize a session
session_start();
// increment a session counter
$_SESSION['counter']++;
?>
<html>
<body>
<p>You have viewed this page <?=$_SESSION['counter']?> times</p>
<p>The session id is <?=session_id()?></p>
</body>
</html>
| true |
9b86124b93ae0b8b71e2bce77ae8ba465ded4d2e | PHP | ryntab/Woocommerce-Dealer-Ordering | /includes/Checkout.php | UTF-8 | 6,993 | 2.703125 | 3 | [] | no_license | <?php
namespace App;
/**
* Checkout Page Handler
*/
class Checkout
{
function __construct() {
add_action( 'woocommerce_after_checkout_billing_form', [ $this, 'render_fields' ], 5, 1 );
add_action( 'woocommerce_checkout_order_processed', [ $this, 'send_field_data' ], 99, 3 );
add_action( ... | true |
86f4605dacd38694d7296b9668e384662b866ad1 | PHP | drblue/wcm20-cms-us-weather | /includes/owm.php | UTF-8 | 2,178 | 2.90625 | 3 | [] | no_license | <?php
/**
* Functions for communicating with the OpenWeatherMap API
*/
function owm_get_json($url) {
// Get data from remote URL
$response = wp_remote_get($url);
// Make sure we got a valid response
if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) {
return $response;
}
// ... | true |
a3528977e1ac43d925e25e59f721325d37f15b78 | PHP | the-pandey-ji/MeraIdea | /register.php | UTF-8 | 4,193 | 2.78125 | 3 | [] | no_license | <?php
require_once "config.php";
$username = $password = $confirm_password = "";
$username_err = $password_err = $confirm_password_err = "";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
// Check if username is empty
if (empty(trim($_POST["username"]))) {
$username_err = "Username cannot be blank";
... | true |
f63ce4287dc595cf7184da2106b598a55530bb94 | PHP | qqbn/TAI-Projekt2021 | /uploading.php | UTF-8 | 2,291 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Courgette&family=Fredoka+One&family=Montserrat&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.c... | true |
1811f65ae7ec0043e9d492f7a42ad4976f7852b7 | PHP | kvarteret/dak-event-wordpress-plugin-v2 | /api/DakEvent_API_Event.php | UTF-8 | 2,304 | 2.59375 | 3 | [] | no_license | <?php
class DakEvent_API_Event extends WP_JSON_CustomPostType {
protected $base = '/dakevent/events';
protected $type = 'dak_event';
/**
* @override
*/
public function registerRoutes( $routes ) {
//$routes = parent::registerRoutes( $routes );
// $routes = parent::registerRevisionRoutes( $routes );
// $r... | true |
4bc8db9e41a7bc77e8547d0baa6f3686fb3b325e | PHP | algisimu/IntentionBundle | /Controller/Traits/IntentionControllerTrait.php | UTF-8 | 1,654 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Algisimu\IntentionBundle\Controller\Traits;
use Algisimu\IntentionBundle\Intention\IntentionInterface;
use Algisimu\IntentionBundle\Intention\ParametersIntentionInterface;
use Algisimu\IntentionBundle\Service\ExecutionManager;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
trait ... | true |
8563aad415fc0ab5bfe4605e2c956c4cf04767f2 | PHP | daticahealth/Datica-V3 | /statamic/core/Filesystem/FolderAccessor.php | UTF-8 | 7,615 | 3.046875 | 3 | [
"CC0-1.0"
] | permissive | <?php
namespace Statamic\Filesystem;
use Statamic\API\File;
use Statamic\API\Path;
use Statamic\API\Helper;
/**
* Provides methods to manipulate folders
*/
class FolderAccessor
{
private $disk;
private $filesystem;
public function __construct($disk, \Illuminate\Contracts\Filesystem\Filesystem $filesys... | true |
b57693da755506f041b10ffaf2444b24e118232e | PHP | florians/baka | /classes/utils/htmlHelper.php | UTF-8 | 5,611 | 2.875 | 3 | [] | no_license | <?php
/**
* @Author Florian Stettler
* @Version 1
* Create Date: 19.03.2013 create of the file
*
* This file contains html Functions for bigger generated parts
*/
/*
* this function generates the html of the Character Profile
* It shows the Avatar of the Character and it's Attribut Points.
* Also t... | true |
3fead9df521ed5a033adadce49d51abd8ec0a296 | PHP | Idem/poeme | /tests/testUtils.php | UTF-8 | 1,625 | 2.625 | 3 | [] | no_license | <?php
require_once './utils.php';
error_reporting(E_ALL);
class FunctionTest extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider fileList
*/
public function testIsPicture($file, $result){
$check = is_picture($file);
$this->assertEquals($check, $result);
}
public function testConfigLoader() {
... | true |
d315c5e9e7b562acc90038dfed371b93a166ca35 | PHP | CS2102Project/PetCare | /text.inc.php | UTF-8 | 2,579 | 2.6875 | 3 | [] | no_license | <?php
//get a user log in
function getLogin($conn){
if (isset($_POST['loginSubmit'])) {
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
$sql = "SELECT * FROM users WHERE uid='$uid' AND password='$pwd'";
$result = pg_query($conn, $sql);
if (pg_num_rows($result)>0) {
if ($row = pg_fetch_assoc($result... | true |
6e813057455b3c274ca07bb362c1a58b1123fb07 | PHP | isabella232/php-timecop-example | /examples/freeze.php | UTF-8 | 177 | 2.515625 | 3 | [] | no_license | <?php
$new_time = isset($_GET['time'])?strtotime($_GET['time']):0;
var_dump(date('Y-m-d H:i:s')); // todays date
Timecop::freeze($new_time);
var_dump(date('Y-m-d H:i:s'));
| true |
30261b1512461de3a829a0c02dfa6bb9da34f0de | PHP | tecnocen-com/yii2-app-roa | /console/DatabaseListener.php | UTF-8 | 3,536 | 3.015625 | 3 | [] | permissive | <?php
namespace console;
use Composer\Script\Event;
use PDO;
use PDOException;
use yii\helpers\ArrayHelper;
use yii\helpers\Console;
class DatabaseListener
{
/**
* It is used to write the user credentials in a PHP file.
* @see self::dbFile()
* @param Event $event
*/
public static functi... | true |
818eed83a58392e63f4b576712d7625b94dcb100 | PHP | microsoftgraph/msgraph-beta-sdk-php | /src/Generated/Models/CloudPcSubscription.php | UTF-8 | 3,264 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsoft\Graph\Beta\Generated\Models;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
class CloudPcSubscription extends Entity implements Parsable
{
/**
* ... | true |
51a6c7bf960a28a9fea0e3d3f5d198bb26e4c748 | PHP | paikend/Todo | /app/Services/UserService.php | UTF-8 | 1,321 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: paikgyeongjun
* Date: 2019-01-07
* Time: 21:16
*/
namespace App\Services;
use App\Exceptions\UserException;
use App\Repo\UserRepo;
use Exception;
use Illuminate\Support\Facades\Hash;
class UserService
{
protected $userRepo;
public function __construct(UserRepo ... | true |
2e33740ceb7b39640ee67b53d1201ce6567146ef | PHP | Cnjwalters/2018-MSTC-Capstone---Attendance-Tracking-Website | /ATP/forgottenpassword.php | UTF-8 | 3,879 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
require_once('header.php');
require_once('connectvars.php');
require_once('navbar.php');
// Insert HTML divs for bootstrap purposes.
echo '<div id="content">';
echo '<div class="container" id="studentContainer">';
echo '<div class ="jumbotron" id="studentTable">';
// Create the form to handle recovering the use... | true |
78312ee23ad9d99d9caaadc286688d7bc64f507e | PHP | jrsouth/template_tool | /tools/create.php | UTF-8 | 8,321 | 2.75 | 3 | [] | no_license | <?php
/**
* tools/create.php
*
* @package default
*/
// Set up environment
require_once('../functions.php');
require_once('../process.php');
$thumbnail_location = $cache_path . 'thumbnails/template_'.$template['id'].'.png';
$preview_location = $cache_path . 'default/template_'.$template['id'].'_p' . (i... | true |
cd78a1c8fadc8462f61673453e89f056788ff8b0 | PHP | jhidalgo2015115/ProyectoSymfony | /src/Entity/Categorias.php | UTF-8 | 809 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CategoriasRepository")
*/
class Categorias
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", le... | true |
b3d20e3c2755a4aa23a4d6df422b5e5f9ca25c1a | PHP | alexoltean97/Web-Scrapper | /crawler.php | UTF-8 | 1,518 | 2.515625 | 3 | [] | no_license | <?php
include "simple_html_dom.php";
include "db.php";
header('Content-Type: text/html; charset=ISO-8859-1');
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "https://www.olx.ro/imobiliare/apartamente-garsoniere-de-vanzare/q-ultracentral/");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CUR... | true |
8ca5c7bb639b722a57d3fa7352c2fdab00f133ed | PHP | lucandrade/movie-list-api | /src/Domain/ValueObjects/Review.php | UTF-8 | 658 | 3.234375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace MovieList\Domain\ValueObjects;
use MovieList\Domain\Contracts\Arrayable;
final class Review implements Arrayable
{
/** @var string */
private $author;
/** @var string */
private $text;
/** @var string */
private $link;
public function __construc... | true |
1906eceb5b988602bfd0df66f08f26108621d38d | PHP | CrawDance/iran-events | /src/Traits/DateCheck.php | UTF-8 | 2,579 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Developer: Keivan
* E-mail: me@keiv.ir
* Date:
*/
namespace CrawDance\IranEvents\Traits;
use Alkoumi\LaravelHijriDate\Hijri;
use Carbon\Carbon;
use CrawDance\IranEvents\Helpers\IranEventsRepository;
use CrawDance\IranEvents\Helpers\JalaliToGregorian;
use CrawDance\IranEvents\IranEventsInterface;
trait... | true |
9d22e0efd6409e7c8cbb6ec0a01ff91a2326be1e | PHP | flyl3una/laravelblog | /database/seeds/ArticleSeeder.php | UTF-8 | 2,060 | 2.78125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
class ArticleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
//调用函数
function rand_time($start_time,$end_time){
$start_time = strtotime... | true |
84395d398548cc9882db6c866c9ab727e891fca2 | PHP | JivkoKelchev/JkCMS | /src/CMSBundle/Entity/Positions.php | UTF-8 | 2,560 | 2.546875 | 3 | [] | no_license | <?php
namespace CMSBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Positions
*
* @ORM\Table(name="positions")
* @ORM\Entity(repositoryClass="CMSBundle\Repository\PositionsRepository")
*/
class Positions
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @O... | true |
14081e2a09e51bc288ffe1457bb5ae3ded9632b4 | PHP | chlo3-w/Travelator | /models/comments_model.php | UTF-8 | 3,004 | 2.96875 | 3 | [] | no_license | <?php
class Comment {
public $firstName;
public $lastName;
public $avatar;
public $commentBody;
public $id;
public $postId;
public $parentId;
public $replies;
public function __construct($row) {
$this->firstName = $row['first_name'];
$this->lastName = $row['last_na... | true |
76314fe8bc735d68977515a58c7704a8732d8bbb | PHP | patrickpicard/1erRipo | /PHP/View/userList.php | UTF-8 | 1,923 | 2.546875 | 3 | [] | no_license | <?php
$userList = UserManager::getList();
?>
<div class="verticalSpace2"></div>
<div class="Adminlist">
<button class="link btn">
<a href="<?php echo serverRoot ?>?action=createUser">Créer un nouvel utilisateur</a>
</button>
<div class="verticalSpace"></div>
<div class="list">
<?php
... | true |
33e1486376754194405f39cb70143a51ac327304 | PHP | mori-ari/20201031 | /bookmark/insert.php | UTF-8 | 2,685 | 2.5625 | 3 | [] | no_license | <?php
session_start();
require_once('../inc/funcs.php');
// ログインチェック処理
sessionCheck();
//1. SESSIONデータ取得
$uid =$_SESSION['uid'];
$bookname =$_SESSION['bookname'];
$img_url =$_SESSION['img_url'];
$book_url =$_SESSION['book_url'];
$review =$_SESSION['review'];
// $uid =$_POST['uid'];
// $bookname =$_POST[... | true |
fd33718156903818b0a0e503a069346edb90e532 | PHP | aduquesnoy/VideoStore | /api.videostore.fr/items.php | UTF-8 | 1,417 | 3.328125 | 3 | [] | no_license | <?php
public class Items {
private $id;
private $name;
private $content;
private $jacquette;
private $type;
function __construct($_id, $_name, $_content, $_jacquette, $_type) {
$this->id = $_id;
$this->name = $_name;... | true |
5ce203549c14726141d0d338ccc366aadd8ffad1 | PHP | AlexKalafatelis/BioSolutions | /signup.php | UTF-8 | 3,109 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
// define variables and set to empty values
$nameErr = $surnameErr = $emailErr = $genderErr = $creditcardErr = $passwordErr = "";
$name = $surname = $email = $gender = $creditcard = $password = $finalpass = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["name"])) {
$nameErr = "Name... | true |
0318fa65ed8fab45e80db7e858d8cb36d2d666d0 | PHP | mithra62/mojitrac-2 | /module/PM/src/PM/Model/Contacts.php | UTF-8 | 7,020 | 2.546875 | 3 | [] | no_license | <?php
/**
* mithra62 - MojiTrac
*
* @author Eric Lamb <eric@mithra62.com>
* @copyright Copyright (c) 2014, mithra62, Eric Lamb.
* @link http://mojitrac.com/
* @version 2.0
* @filesource ./module/PM/src/PM/Model/Projects.php
*/
namespace PM\Model;
use Zend\InputFilter\Factory as InputFactory;
use Zend\Inpu... | true |
6b2719cec5c0fdfbec09ab9e4a791c85e3c48e8a | PHP | yorman431/Tibisay | /config/class.historial.php | UTF-8 | 4,524 | 2.828125 | 3 | [] | no_license | <?php
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 162)
* Alejandro José Díaz Delgado. <contacto@diazcreativos.net.ve> escribió este archivo.
* Mientras conserve
* este comentario usted puede hacer lo que quiera con este material. Si alguna
... | true |
0883a38bd64b354b19ae065b0d83013a78bd063c | PHP | thereisnosuchausername/SomePhpStuff | /index.php | UTF-8 | 183 | 2.59375 | 3 | [] | no_license | <html>
<head></head>
<body>
<div class="random-stuff">
A div with a random stuff here.
</div>
<p id="phpoutput">
<?= "hello" ?>
</p>
<div>Random div content</div>
</body>
</html>
| true |
c0000058f71af79f8a21412e1022a5c6e3fc2033 | PHP | innotechgl/innotechglobal | /utils/activator/activator_class.php | UTF-8 | 749 | 2.578125 | 3 | [] | no_license | <?php
class activator_class extends util_class
{
public $ajax_link = '';
public $id = '';
public $active = '';
public $id_to_listen = '';
public function __construct()
{
}
/**
* @param string $link
* @param string $id
* @param string $active
*
* @name Add new... | true |
861d558570f463e32364cb14a05653f39f519e7d | PHP | andy-pei/Sentral | /app/Services/EventService.php | UTF-8 | 6,611 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jialeipei
* Date: 7/9/18
* Time: 11:11 PM
*/
namespace App\Services;
use App\Models\EventModel;
use App\Repositories\EventRepository;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
class EventService
{
/**
* @var EventRepository
*/
pr... | true |
8edafe2dcb3cdb66d41320dd105e0985c3f040fa | PHP | pgobbo/EMS5C | /routesLocali.php | UTF-8 | 909 | 2.953125 | 3 | [] | no_license | <?php
class MainController{
function route(){
if(isset($_GET['controller']) && isset($_GET['action'])){
$controller=$_GET['controller'];
//echo "Controller is set =".$controller;
$action=$_GET['action'];
//echo "action is set=".$action;
}
e... | true |
8b1772c759ffdb127defbf520cbd91d664a37292 | PHP | CDDevAccount/cardealeradmin | /models/UvwTotalsByPostcodeDealer.php | UTF-8 | 1,226 | 2.671875 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "uvw_TotalsByPostcodeDealer".
*
* @property int $Quantity
* @property string $name Dealer Name
* @property string $DealerPostCode Post Code
* @property string $DealerValue
* @property string $CarMaxValue
* @property string $CarAvera... | true |
04819355d9e485f78218d246b95bbfceea5e6207 | PHP | mrserg161/keep-a-changelog | /src/Common/ChangelogEntryDiscoveryTrait.php | UTF-8 | 1,128 | 2.71875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* @see https://github.com/phly/keep-a-changelog for the canonical source repository
*/
declare(strict_types=1);
namespace Phly\KeepAChangelog\Common;
use function sprintf;
/**
* Provides an implementation of the methods defined in ChangelogEntryAwareEventInterface.
*
* Assumes that the class a... | true |
910cc75d9e50d24fbb804c7ee22f9b895064bf19 | PHP | nbari/DALMP | /examples/cache/cache.php | UTF-8 | 2,311 | 2.671875 | 3 | [] | no_license | <?php
require_once '../../MPLT.php';
$timer = new MPLT();
require_once '../../src/dalmp.php';
# ------------------------------------------------------------------------------
/**
* memcache cache instance
*/
$memcache = new DALMP\Cache(new DALMP\Cache\Memcache());
/**
* redis cache instance
*/
$redis = new DALMP... | true |
f4d09d97a8a86d098f763fd12e06141bf25345c9 | PHP | rip0lh0/Projeto-Final-PSI | /webapp/backend/models/ScheduleForm.php | UTF-8 | 2,261 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
use yii\base\Model;
use common\models\Schedule;
class ScheduleForm extends Model
{
public $id_kennel;
public $has_lunch;
public $days_week = [];
public $hours = [];
public $hours_lunch = [];
public function rules()
{
return [
... | true |
49fdd90982a1066c5a96e91b87517e2d352d0b41 | PHP | greglak/todolistci | /application/controllers/WishlistController.php | UTF-8 | 8,336 | 2.765625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class WishlistController extends CI_Controller
{
function __construct()
{
parent::__construct();
// Load session library and encryption for sharing list
$this->load->library('session');
$this->load->library('encrypt');
// Load model us... | true |
0063ceaf68b1fce18dbc4a065c5f0da3ab5a70c7 | PHP | acrhood/saicor | /tablas.php | UTF-8 | 1,402 | 2.71875 | 3 | [] | no_license | <?php
require_once '_config/mysqlDB.php';
$mysql = new DBClass();
if (isset($_POST['op'])) {
switch ($_POST['op']) {
case 1:
$mysql->ejecutar("INSERT INTO tablas(nombre) values('".$_POST['arreglo']."')");
break;
default:
# code...
break;
... | true |
3e58c2140e5a0823f7f56c9cbe7eead01bd7e861 | PHP | narcisse2/softiatesttechnique | /ppe website/modele/A.inc.php | UTF-8 | 676 | 2.859375 | 3 | [] | no_license | <?php
include_once "db.inc.php";
function get_description($num) {
$cnx = connexionPDO();
$req = $cnx->prepare("select text from cats,description where cats.numcat=description.numcat and cats.numcat = :numcat " );//Prépare une requête SELECT à l'exécution et retourne un objet(cat)
$req->b... | true |
d406b6f9c24ae2ed3f89c9f035e45207d0d793cb | PHP | alex-kalanis/kw_bans | /php-src/Bans/Factory.php | UTF-8 | 4,057 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace kalanis\kw_bans\Bans;
use kalanis\kw_bans\BanException;
use kalanis\kw_bans\Interfaces\IIpTypes;
use kalanis\kw_bans\Interfaces\IKBTranslations;
use kalanis\kw_bans\Sources;
use kalanis\kw_bans\Traits\TLang;
/**
* Class Factory
* @package kalanis\kw_bans\Bans
*/
class Factory
{
use TLang;
... | true |
8a7a568a7ba01ca1287f71dfc81c14b4cabf2dd7 | PHP | judsoncge/pg-oo-mvc | /model/scripts/script-arrumar-numero-processo.php | UTF-8 | 1,506 | 2.703125 | 3 | [] | no_license | <?php
//tempo máximo para a execução do arquivo
ini_set('max_execution_time', 5000);
//definindo a hora local
date_default_timezone_set('America/Bahia');
//conectando ao banco de dados
$conexao = mysqli_connect('localhost', 'root', '', 'pg-oo-mvc');
//setando todos os nomes para o UTF8 encoding
mysqli_query($conexa... | true |
ede8cc350ba3efd3fa75947a7bca04bca8cb4f4e | PHP | Beshario/Pizza-ML | /controller/controller.php | UTF-8 | 2,125 | 2.6875 | 3 | [] | no_license | <?php
// now start the controller
require(C. "helper.php");
//intializing cart in sessions
if (empty($_SESSION["cart"])) {
// php 5.3 does not support shorthand [] for array().
$_SESSION["cart"] = array();
}
//add to cart
if (isset($_POST["cart"])) {
$update = $_POST["cart"];
foreach ($update as $item) {... | true |
18f8d7b454a7e845348132d23d32c318fcb374ea | PHP | JuliaFS/PHP-basics | /WorkingWithForms/WorkingWithForms/04-HTMLtagsCounter/HTMLTagsCounter.php | UTF-8 | 1,984 | 3.234375 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['score'])) {
$_SESSION['score'] = 0;
}
?>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>HTML Tags Counter</title>
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
<h1>Working... | true |
7f1af966217f9530d9f2e7396a31b9d6cffa8e37 | PHP | jguillermo/jmap | /module/Jmap/lib/Relation/RelationInterface.php | UTF-8 | 357 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Jmap\Relation;
interface RelationInterface {
/**
* retorna el resultado de llamr a la clase y hacer consultas a la base de datos,
* @param StdObject $obj objeto creado en la entidad, esta instancia no se piede, se puede cambiar cualquier campo en este objeto y se actualizara en l aentidad
*/
... | true |
03876f77dee5c9e0ec73afd6abea6225fe455441 | PHP | 24p11/mc2 | /tests/testmonolog.php | UTF-8 | 358 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__.'/../vendor/autoload.php';
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
date_default_timezone_set('Europe/Paris');
// create a log channel
$log = new Logger('name');
$log->pushHandler(new StreamHandler('your.log', Logger::WARNING));
// add records to the log
$log->info('Foo');
$log->... | true |
469d23a41653bf739a85324ce09652ee548bbda9 | PHP | LazyGeniusMan/MIS | /classes/variance.php | UTF-8 | 1,712 | 3.265625 | 3 | [] | no_license | <?php
class Variance
{
public $type;
public $result = [];
public $output = [];
public $condition = [];
public function __construct($type, $type1, $type2)
{
$this->type = $type;
$this->calculateOutput($type1, $type2);
$this->calculateCondition();
}
public function ... | true |
9594c5783102a87ddc7af37b8e71cd7614f7a24c | PHP | MahNassar/simple-php-framework | /app/application/repositories/users/GetUsersRepository.php | UTF-8 | 836 | 2.84375 | 3 | [] | no_license | <?php
namespace application\repositories\users;
use application\repositories\GetRepositoryInterface;
use application\models\Users;
class GetUsersRepository implements GetRepositoryInterface
{
public function getAll()
{
$limit = isset($_GET['limit']) ? $_GET['limit'] : 50;
$offset = isset($_GE... | true |
2d12dd8d9e8a867a43a3be2d90f22b431aa433fb | PHP | huong1999/BTL-Web | /app/Http/Controllers/Admin/ShiftsController.php | UTF-8 | 4,084 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Exam;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use App\Shift;
use App\Subject;
use Illuminate\Http\Request;
class ShiftsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\View\View
... | true |
558c96628ad6944fd17215fe86ad851021dc4baa | PHP | CivilianSergeant/sms-2.0 | /app/libs/Theme.php | UTF-8 | 784 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Himel
* Date: 2/16/14
* Time: 3:58 PM
*/
class Theme {
protected static $theme = 'bucket';
public static function make($view,$viewModel=array())
{
$template = 'templates.'.self::$theme;
try{
// For vendor specific custom changed ... | true |
1acc4e1c4185a8a5a5fd2efd08bd63bfe06997ab | PHP | muvera/chv1 | /app/database/migrations/2014_11_04_205952_create_trends_table.php | UTF-8 | 773 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTrendsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('trends', function(Blueprint $table)
{
$table->increments('id');
$table->s... | true |
4aba771330aa01a2de786a24c59f5e85dd4f5304 | PHP | dalais/documents | /app/Http/Controllers/Api/DocumentController.php | UTF-8 | 5,307 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use App\Models\Document;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use App\Http\Controllers\Controller;
class DocumentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Respons... | true |
d1e8b008b19adb24d3324d58322864ed643d6d87 | PHP | mik-laj/cars-shop.uph.edu.pl | /src/Repositories/CategoryRepository.php | UTF-8 | 1,140 | 2.65625 | 3 | [] | no_license | <?php
namespace Uph\Miklaj\Repositories;
use Uph\Miklaj\Model\Category;
use Uph\Miklaj\Model\Product;
use \PDO;
class CategoryRepository extends BaseRepository
{
static protected $model = Category::class;
public function __construct(PDO $pdo)
{
parent::__construct($pdo);
}
public func... | true |
afbfe6547e0e8bc352efcaafafa98fd8c31763ec | PHP | c9s/WebAction | /src/ValueType/BoolTypeTest.php | UTF-8 | 945 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace WebAction\ValueType;
class BoolTypeTest extends \PHPUnit\Framework\TestCase
{
public function boolDataProvider()
{
return [
/* input, expected, test pass */
["true", true, true],
["True", true, true],
["on", true, true],
["fal... | true |
94a6b1aa08b4fda4c026eb611867dc67bfd58d87 | PHP | HalloWelt42/LinkedList | /src/entity/interfaces/INode.php | UTF-8 | 230 | 2.84375 | 3 | [] | no_license | <?php
namespace ListOperation\entity\interfaces;
interface INode
{
public function getData();
public function getChild();
public function setChild( ?INode $node );
public function setData( string $value );
} | true |
d2ba614a48062a536d6ff4983d8cbfdf2c4436fd | PHP | gustavo0602/PartyEvents | /recuperacao.php | UTF-8 | 1,728 | 2.59375 | 3 | [] | no_license | <html>
<head>
<title>Recuperacao</title>
</head>
<body>
<form action="#" method="POST">
Digite seu email:</br></br>
<input type="email" name="email" placeholder="Digite seu email.."></br></br>
<input type="submit" name="enviar" value="Enviar">
<a href="login.php"><input type="button" value=... | true |
c0b421d9bc28df58f6aa6045332abeb6043a2704 | PHP | ucef8233/anouar-ripo | /public/login.php | UTF-8 | 1,712 | 2.59375 | 3 | [] | no_license | <?php
$title = 'Login';
include '../docs/header.php';
require_once '../connexion.php';
?>
<main class="text-center">
<form action="login.php" method="POST" class="form-signin">
<h1 class="h3 mb-5 font-weight-normal">Please sign in</h1>
<?php
if (!empty($_POST)) :
if (!empty($_POST['login']) && !empt... | true |
01bd04fbb0055933174db4dcca9ac5db862ba796 | PHP | TheWhiteCowboy/NHHours | /app/Models/Scopes/WorkingHoursScope.php | UTF-8 | 1,219 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace NHHours\Models\Scopes;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use NHHours\Models\WorkingHour;
class WorkingHoursScope extends BaseScope
{
protected function buildQuery(): Builder
{
return WorkingHour::query();
}
public function forUser($userId): WorkingHo... | true |
1d39a005fff34a9558d15e74f892a22b66a0f59e | PHP | jstewmc/gravity | /src/Import/Data/Import.php | UTF-8 | 427 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright 2018 Jack Clayton
* @license MIT
*/
namespace Jstewmc\Gravity\Import\Data;
abstract class Import
{
private $path;
protected $name;
public function __construct($path, $name)
{
$this->path = $path;
$this->name = $name;
}
public function getName()
... | true |
a0666f144c9ea9434894256b7cc30874470ec8a9 | PHP | Marlicoo/sylius-docker | /payments/RbplBridgeInterface.php | UTF-8 | 855 | 2.53125 | 3 | [] | no_license | <?php
namespace AppBundle\Payments;
interface RbplBridgeInterface
{
const SANDBOX_ENVIRONMENT = 'sandbox';
const PRODUCTION_ENVIRONMENT = 'production';
const SANDBOX_HOST = 'https://r-pay.herokuapp.com/';
const PRODUCTION_HOST = 'https://r-pay.herokuapp.com/';
const COMPLETED_STATUS = 'completed'... | true |
cfa910d509250698db62e14578a18633013e197f | PHP | Rspangler89/IOT_GPRS_Tracker_Site | /config_signup.php | UTF-8 | 2,247 | 3 | 3 | [] | no_license | <?php
session_start();
//vars to connect to database below left blank for security reasons.
$db_host = '';//database host name goes here
$db_username = '';//database username goes here
$db_password = '';//database password goes here
$db_name = '';//database name goes here
//Create connection
$conn = mysqli_connect($... | true |
d71d722ff3f76ba0ed208e963c1e2ae336f83d30 | PHP | oGabrielSilva/Iniciando_PHP | /class/index.php | UTF-8 | 922 | 3.09375 | 3 | [] | no_license | <?php
include_once("Method/class.php");
include_once("Method/extends.php");
$cell = new Cell;
$cell->setOwner("Miguel");
$cell->setBrand("Motorola");
print_r($cell);
echo '<br>';
echo 'Owner: ';
echo $cell->owner() . ';<br>';
echo 'Brand: ';
echo $cell->brand() . ';<br>';
echo "Attachmen... | true |
543933809225a4e527961bcb07bc171dd3748c02 | PHP | JAIRODIAZMONTERO/Tienda--Programacion-web- | /cls_ubicacion.php | UTF-8 | 1,841 | 2.65625 | 3 | [] | no_license | <?php
include_once("cls_conexion.php");
class ubicacion{
var $nombre;
var $id;
var $descripcion;
function __construct($id=0){
if($id>0){
$this->id = $id;
$this->cargar();
}
}
function guardar(){
if($this->id>0){
$query = "UPDATE ubicaciones SET nombre = '$this->nombre',descripci... | true |
530882444a8632bc1bd7738d8c686a43979d8335 | PHP | Jhoan02S/Super_pan_3.0 | /models/Index.php | UTF-8 | 307 | 2.65625 | 3 | [] | no_license | <?php
class index extends Database{
public function all(){
try{
$result = parent::connect()->prepare("SELECT * FROM producto");
$result->execute();
return $result->fetchAll();
}catch(Exception $e){
die($e->getMessage());
}
}
} | true |
a23c0422f14a0fb19c807b306146a954815d1fe4 | PHP | reyphilipregis/codesamples | /app/Repositories/Interfaces/AccountRepositoryInterface.php | UTF-8 | 347 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Repositories\Interfaces;
interface AccountRepositoryInterface extends AppRepositoryInterface
{
/**
* Find by subscription type.
*
* @param string $subscriptionType
*
* @return mixed[]
*/
public function findBySubscriptionType(string $s... | true |
33e69cd493fccedc35b5a9345249f9ff19fc5868 | PHP | atsushi-815/php_study | /kahen.php | UTF-8 | 173 | 2.921875 | 3 | [] | no_license | <?php
function func_caller($name)
{
if (function_exists($name))
{
$name();
}
}
function foo()
{
echo 'foo called', PHP_EOL;
}
func_caller('foo');
| true |
35cf14d4cd550163da91f4e06ba9390285706ca8 | PHP | cultuurnet/projectaanvraag-silex | /src/Widget/WidgetType/WidgetTypeBase.php | UTF-8 | 9,438 | 2.609375 | 3 | [] | no_license | <?php
namespace CultuurNet\ProjectAanvraag\Widget\WidgetType;
use CultuurNet\ProjectAanvraag\ContainerFactoryPluginInterface;
use CultuurNet\ProjectAanvraag\Widget\RendererInterface;
use CultuurNet\ProjectAanvraag\Widget\Twig\TwigPreprocessor;
use CultuurNet\ProjectAanvraag\Widget\WidgetTypeInterface;
use CultuurNet\... | true |
0423a3e28ff3f47096e440ebb8f6b80d7f3a4d65 | PHP | victorhugoreyes/henpapel.com | /application/models/empresarialmodel.php | UTF-8 | 3,897 | 2.71875 | 3 | [] | no_license | <?php
class EmpresarialModel
{
function __construct($db)
{
try {
$this->db = $db;
} catch (PDOException $e) {
exit('Database connection could not be established.');
}
}
public function saveFileInfo($odt,$catego,$filename){
$user=$_... | true |
92718a58b35838390aa5455bd6f595df471db729 | PHP | Denobraz/yii2-editor | /services/EditorService.php | UTF-8 | 1,374 | 2.59375 | 3 | [] | no_license | <?php
namespace denobraz\editor\services;
use denobraz\editor\services\converters\EditorElement;
use denobraz\editor\models\Editor;
use yii\helpers\Json;
class EditorService
{
public $config;
public function __construct($config = null)
{
$this->config = $config;
if ($this->config === nul... | true |
835e1f6fffa29422e796f5a7105e3660ebfc9201 | PHP | 00dav00/marcadores-minimal | /app/Domain/DomAmonestacion.php | UTF-8 | 4,405 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Domain;
use App\Amonestacion;
use App\Partido;
use App\PartidoJugador;
class DomAmonestacion {
protected $_amonestacion;
protected $_partido;
protected $_jugadorPartido;
/****************** WRAPPERS PARA CLASES **************************/
private function amonestacionInstance()... | true |
7ffe0a7410d421606505e0f3cbfd43e7e75d2e48 | PHP | theundreamtbunch/comrade-dev | /apps/jm/src/Infra/JsonSchema/Errors.php | UTF-8 | 493 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Infra\JsonSchema;
class Errors
{
/**
* @param array $errors
* @param string $preface
*
* @return string
*/
public static function toString(array $errors, $preface = 'Object validation has failed.')
{
$messages = [$preface];
foreach ($errors as $e... | true |
f5bdd9845267de7d0931396e0ff7c7bb1a01e130 | PHP | rammere/html5-extjs4 | /php/code-ch12/Example-12.23.php | UTF-8 | 215 | 2.84375 | 3 | [] | no_license | <?php
$file_name="test.txt";
touch($file_name); //since it was deleted in the last example
$new_file_name="production.txt";
$status=rename($file_name,$new_file_name);
if ($status) {
echo ("Renamed file.");
}
?> | true |
d1c57afc50647822f95f6ced603116cf00fe320f | PHP | Umisoft/umi.cms.3-dev | /umicms/library/hmvc/component/admin/layout/button/behaviour/Behaviour.php | UTF-8 | 1,576 | 2.65625 | 3 | [] | no_license | <?php
/**
* This file is part of UMI.CMS.
* @link http://umi-cms.ru
* @copyright Copyright (c) 2007-2014 Umisoft ltd. (http://umisoft.ru)
* @license For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace umicms\hmvc\component\admin\... | true |
193cdbceec05413c20d59e509f166051adc1ad48 | PHP | Mitirrli/leetcode | /php/66-加一(1).php | UTF-8 | 440 | 3.5625 | 4 | [] | no_license | <?php
class Solution {
/**
* @param Integer[] $digits
* @return Integer[]
*/
function plusOne($digits) {
$carry = 1; //进位
$result = []; //结果数组
while (!is_null($last = array_pop($digits)) || $carry == 1) {
$temp = ($last ?? 0) + $carry;
$carry = (... | true |
95a3b02b25b9145392695b63269032a65923618d | PHP | simonyeldon/platformsh-cli | /src/Util/RelationshipsUtil.php | UTF-8 | 3,881 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Platformsh\Cli\Util;
use Platformsh\Cli\CliConfig;
use Platformsh\Cli\Helper\QuestionHelper;
use Platformsh\Cli\Helper\ShellHelper;
use Platformsh\Cli\Helper\ShellHelperInterface;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Compo... | true |
64c990cc243bfbdfbea753765f7e637fdf570551 | PHP | Ariefna/mnj | /PHPExcleReader/PHPExcleReader/index.php | UTF-8 | 652 | 2.65625 | 3 | [] | no_license | <?php
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<a href="http://allitstuff.com/">AllItStuff.com</a>
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . 'Classes/');
include 'PHPExcel/IOFactory.php';
$inputFileName = './jd.xlsx';
try {
$objPHPExcel = ... | true |
b5d5f719804516c8649fbc7f6206ed4be78ffea6 | PHP | campeloguedes/laravel-54-novidades | /app/User.php | UTF-8 | 806 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Events\UserCreatedEvent;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fill... | true |
ba0c73efcdcf53b9d8c0ee961e7208fddebf5622 | PHP | MarcGMEN/romaelGPX | /src/phpTCXFileAnalysis.php | UTF-8 | 2,353 | 2.75 | 3 | [] | no_license | <?php
//namespace romael;
require_once 'src/phpFileAnalysis.php';
if (!defined('DEFINITION_MESSAGE')) {
define('DEFINITION_MESSAGE', 1);
}
if (!defined('DATA_MESSAGE')) {
define('DATA_MESSAGE', 0);
}
/*
* This is the number of seconds difference between TCX and Unix timestamps.
* TCX timestamps are seconds... | true |