GitHub
Tests: 12 • Commercial: 2 • Pet projects: 4 • Legacy: 4
Total: 22

.NET Framework

Test
2021

Project Request

ASP.NET MVC • C# • SQL Server
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2020

ProjectC

ASP.NET MVC • C# • JSON • jQuery
JSON data processing.
Test
2020

Vehicle Maintenance

ASP.NET MVC • VB.NET • JSON
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2019

Movie Navigator

ASP.NET MVC • VB.NET
Request information about movie from IMDB.
Test
2018

Customers Exchange

ASP.NET MVC • C# • SQL Server
Automated teller machine emulation.
Test
2016

ATM

ASP.NET MVC • C#
Automated teller machine emulation.

.NET Core

Pet project
2022

Mail Daemon

.NET 8 • Console • JSON
Utility to send mails with customizable settings.

Custom

Code
2024

Buns of code

.NET Framework • C# • JavaScript
Code snippets from my projects, ready to use; tiny tests; code examples.

PHP

Test
2024

Mediabox

PHP 8 • Laravel 11 • Vue.js • Composer • SQLite
Test project for media files management.
Test
2020

Loan Castle

PHP • MariaDB
Jums jāizstrādā kāda lielāk projekta prototips. Izstrādājot prototipu, paturiet prātā, ka projektam attīstoties, šo prototipu varētu vajadzēt pilnveidot.
Test
2020

Content Management

PHP • MySQL • AJAX
Создать простой сайт, где будет страница с формой для авторизации и страница для авторизованного пользователя.
Test
2019

Laravel

PHP • Laravel • Vue.js • Composer • SQLite
Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.
Test
2019

Phone Check

PHP • JavaScript • JSON • Docker
Implement application to detect country by phone number.

Frontend

Test
2021

Forex Wall

npm • React
For this exercise, what we need is a simple live wall for tracking currencies.

Business projects

Commercial
2008

Certification Center

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Dapper • JavaScript • jQuery • Git
Transport registration and certification services in Latvia, Customer Relationship Management.
Commercial
2000

Amerikas Auto

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Entity Framework • JavaScript • jQuery • Git
Car service and spare parts for all USA and European car models, Customer Relationship Management.

Pet projects

Pet project
2023

Geolocation Assistant

.NET 8 • ASP.NET Core • C# • Web API • JSON • Git
Website for determining geolocation by IP or geotagged photo.
Pet project
2008

Web Dynamics

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
Software development blog. Articles, books, videos, content management.
Pet project
2000

Blackball

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • XML • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
My entertainment portal created from scratch.

Good old times

Legacy
2000

DOS Clock

Turbo Pascal • Assembler
Digital clock.
Legacy
2000

BrainOut

Turbo Pascal • Assembler
Tank battle game.
Legacy
1999

Airport Administrator

Turbo Pascal
Курсовая работа в институте.
Legacy
1998

Atomizer

Turbo Pascal • Assembler
Atomizer, aka «Studio2D». Graphic raster editor. AGI is my own «Atomizer Generated Image» file format.

Laravel

2019 Test

Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.

PHP Laravel Vue.js Composer SQLite
Information
Source code
  app
  Http
  Auth
  css
  js
  js
  lang
  en
  sass
  app
  data
  logs
  Unit
  src
  src
  lib
  docs
  en
  src
  docs
  en
  lib
  src
  Cron
  Cron
  src
  filp
  src
  css
  js
  Util
  src
  ORM
  Spot
  test
  Core
  Text
  Type
  Xml
  Core
  Text
  Type
  Xml
  html
  src
  src
  src
  Auth
  make
  auth
  Bus
  Auth
  Bus
  Http
  Mail
  View
  Auth
  Bus
  Http
  Http
  Json
  Log
  Mail
  html
  text
  Jobs
  View
  src
  src
  Util
  docs
  Pass
  Pass
  Pass
  doc
  src
  Curl
  doc
  f001
  f002
  f003
  f004
  f005
  f006
  f007
  f008
  src
  Date
  Spl
  src
  Lang
  List
  doc
  lib
  Node
  Expr
  Cast
  Name
  Stmt
  test
  code
  expr
  uvs
  stmt
  loop
  expr
  stmt
  Node
  Stmt
  src
  opis
  src
  dist
  lib
  src
  xml
  xml
  src
  Unit
  src
  src
  Tags
  src
  src
  src
  Call
  Node
  Call
  Util
  src
  Node
  Html
  css
  js
  Xml
  HTML
  XML
  src
  src
  src
  src
  src
  Stub
  Hook
  Util
  Log
  PHP
  cli
  1149
  1216
  1265
  1330
  1335
  1337
  1348
  1351
  1374
  1437
  1468
  1471
  1472
  1570
  2085
  2137
  2145
  2158
  2366
  2380
  2382
  2435
  244
  2448
  2724
  2725
  2731
  2811
  2830
  2972
  3093
  3107
  3156
  322
  3364
  3379
  3380
  3396
  433
  445
  498
  503
  581
  74
  765
  797
  873
  Trac
  1021
  523
  578
  684
  783
  fail
  unit
  Util
  PHP
  psr
  src
  log
  Psr
  Log
  Test
  src
  psy
  src
  Sudo
  Util
  test
  Sudo
  Util
  box
  uuid
  src
  Time
  Node
  Time
  src
  src
  diff
  src
  out
  src
  src
  src
  src
  src
  src
  src
  src
  doc
  lib
  Mime
  Pop
  Auth
  Mime
  bug
  unit
  Mime
  Auth
  dkim
  Node
  Node
  psr4
  phpt
  .dot
  b
  a
  A
  B
  C
  copy
  A
  B
  C
  one
  b
  .dot
  a
  dir
  File
  Test
  File
  test
  Test
  Log
  Log
  mime
  Part
  test
  Part
  glob
  Test
  data
  dat
  res
  Util
  Util
  Test
  css
  js
  Test
  Test
  src
  src
  Css
  Rule
  src
  src
  .env
  null
Root / vendor / mockery / mockery / library / Mockery / Generator / MockConfiguration.php
<?php /** * Mockery * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://github.com/padraic/mockery/blob/master/LICENSE * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to padraic@php.net so we can send you a copy immediately. * * @category Mockery * @package Mockery * @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com) * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License */ namespace Mockery\Generator; /** * This class describes the configuration of mocks and hides away some of the * reflection implementation */ class MockConfiguration { protected static $mockCounter = 0; /** * A class that we'd like to mock */ protected $targetClass; protected $targetClassName; /** * A number of interfaces we'd like to mock, keyed by name to attempt to * keep unique */ protected $targetInterfaces = array(); protected $targetInterfaceNames = array(); /** * A number of traits we'd like to mock, keyed by name to attempt to * keep unique */ protected $targetTraits = array(); protected $targetTraitNames = array(); /** * An object we'd like our mock to proxy to */ protected $targetObject; /** * The class name we'd like to use for a generated mock */ protected $name; /** * Methods that should specifically not be mocked * * This is currently populated with stuff we don't know how to deal with, * should really be somewhere else */ protected $blackListedMethods = array(); /** * If not empty, only these methods will be mocked */ protected $whiteListedMethods = array(); /** * An instance mock is where we override the original class before it's * autoloaded */ protected $instanceMock = false; /** * Param overrides */ protected $parameterOverrides = array(); /** * Instance cache of all methods */ protected $allMethods; /** * If true, overrides original class destructor */ protected $mockOriginalDestructor = false; protected $constantsMap = array(); public function __construct( array $targets = array(), array $blackListedMethods = array(), array $whiteListedMethods = array(), $name = null, $instanceMock = false, array $parameterOverrides = array(), $mockOriginalDestructor = false, array $constantsMap = array() ) { $this->addTargets($targets); $this->blackListedMethods = $blackListedMethods; $this->whiteListedMethods = $whiteListedMethods; $this->name = $name; $this->instanceMock = $instanceMock; $this->parameterOverrides = $parameterOverrides; $this->mockOriginalDestructor = $mockOriginalDestructor; $this->constantsMap = $constantsMap; } /** * Attempt to create a hash of the configuration, in order to allow caching * * @TODO workout if this will work * * @return string */ public function getHash() { $vars = array( 'targetClassName' => $this->targetClassName, 'targetInterfaceNames' => $this->targetInterfaceNames, 'targetTraitNames' => $this->targetTraitNames, 'name' => $this->name, 'blackListedMethods' => $this->blackListedMethods, 'whiteListedMethod' => $this->whiteListedMethods, 'instanceMock' => $this->instanceMock, 'parameterOverrides' => $this->parameterOverrides, 'mockOriginalDestructor' => $this->mockOriginalDestructor ); return md5(serialize($vars)); } /** * Gets a list of methods from the classes, interfaces and objects and * filters them appropriately. Lot's of filtering going on, perhaps we could * have filter classes to iterate through */ public function getMethodsToMock() { $methods = $this->getAllMethods(); foreach ($methods as $key => $method) { if ($method->isFinal()) { unset($methods[$key]); } } /** * Whitelist trumps everything else */ if (count($this->getWhiteListedMethods())) { $whitelist = array_map('strtolower', $this->getWhiteListedMethods()); $methods = array_filter($methods, function ($method) use ($whitelist) { return $method->isAbstract() || in_array(strtolower($method->getName()), $whitelist); }); return $methods; } /** * Remove blacklisted methods */ if (count($this->getBlackListedMethods())) { $blacklist = array_map('strtolower', $this->getBlackListedMethods()); $methods = array_filter($methods, function ($method) use ($blacklist) { return !in_array(strtolower($method->getName()), $blacklist); }); } /** * Internal objects can not be instantiated with newInstanceArgs and if * they implement Serializable, unserialize will have to be called. As * such, we can't mock it and will need a pass to add a dummy * implementation */ if ($this->getTargetClass() && $this->getTargetClass()->implementsInterface("Serializable") && $this->getTargetClass()->hasInternalAncestor()) { $methods = array_filter($methods, function ($method) { return $method->getName() !== "unserialize"; }); } return array_values($methods); } /** * We declare the __call method to handle undefined stuff, if the class * we're mocking has also defined it, we need to comply with their interface */ public function requiresCallTypeHintRemoval() { foreach ($this->getAllMethods() as $method) { if ("__call" === $method->getName()) { $params = $method->getParameters(); return !$params[1]->isArray(); } } return false; } /** * We declare the __callStatic method to handle undefined stuff, if the class * we're mocking has also defined it, we need to comply with their interface */ public function requiresCallStaticTypeHintRemoval() { foreach ($this->getAllMethods() as $method) { if ("__callStatic" === $method->getName()) { $params = $method->getParameters(); return !$params[1]->isArray(); } } return false; } public function rename($className) { $targets = array(); if ($this->targetClassName) { $targets[] = $this->targetClassName; } if ($this->targetInterfaceNames) { $targets = array_merge($targets, $this->targetInterfaceNames); } if ($this->targetTraitNames) { $targets = array_merge($targets, $this->targetTraitNames); } if ($this->targetObject) { $targets[] = $this->targetObject; } return new self( $targets, $this->blackListedMethods, $this->whiteListedMethods, $className, $this->instanceMock, $this->parameterOverrides, $this->mockOriginalDestructor, $this->constantsMap ); } protected function addTarget($target) { if (is_object($target)) { $this->setTargetObject($target); $this->setTargetClassName(get_class($target)); return $this; } if ($target[0] !== "\\") { $target = "\\" . $target; } if (class_exists($target)) { $this->setTargetClassName($target); return $this; } if (interface_exists($target)) { $this->addTargetInterfaceName($target); return $this; } if (trait_exists($target)) { $this->addTargetTraitName($target); return $this; } /** * Default is to set as class, or interface if class already set * * Don't like this condition, can't remember what the default * targetClass is for */ if ($this->getTargetClassName()) { $this->addTargetInterfaceName($target); return $this; } $this->setTargetClassName($target); } protected function addTargets($interfaces) { foreach ($interfaces as $interface) { $this->addTarget($interface); } } public function getTargetClassName() { return $this->targetClassName; } public function getTargetClass() { if ($this->targetClass) { return $this->targetClass; } if (!$this->targetClassName) { return null; } if (class_exists($this->targetClassName)) { $dtc = DefinedTargetClass::factory($this->targetClassName); if ($this->getTargetObject() == false && $dtc->isFinal()) { throw new \Mockery\Exception( 'The class ' . $this->targetClassName . ' is marked final and its methods' . ' cannot be replaced. Classes marked final can be passed in' . ' to \Mockery::mock() as instantiated objects to create a' . ' partial mock, but only if the mock is not subject to type' . ' hinting checks.' ); } $this->targetClass = $dtc; } else { $this->targetClass = UndefinedTargetClass::factory($this->targetClassName); } return $this->targetClass; } public function getTargetTraits() { if (!empty($this->targetTraits)) { return $this->targetTraits; } foreach ($this->targetTraitNames as $targetTrait) { $this->targetTraits[] = DefinedTargetClass::factory($targetTrait); } $this->targetTraits = array_unique($this->targetTraits); // just in case return $this->targetTraits; } public function getTargetInterfaces() { if (!empty($this->targetInterfaces)) { return $this->targetInterfaces; } foreach ($this->targetInterfaceNames as $targetInterface) { if (!interface_exists($targetInterface)) { $this->targetInterfaces[] = UndefinedTargetClass::factory($targetInterface); return; } $dtc = DefinedTargetClass::factory($targetInterface); $extendedInterfaces = array_keys($dtc->getInterfaces()); $extendedInterfaces[] = $targetInterface; $traversableFound = false; $iteratorShiftedToFront = false; foreach ($extendedInterfaces as $interface) { if (!$traversableFound && preg_match("/^\\?Iterator(|Aggregate)$/i", $interface)) { break; } if (preg_match("/^\\\\?IteratorAggregate$/i", $interface)) { $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate"); $iteratorShiftedToFront = true; } elseif (preg_match("/^\\\\?Iterator$/i", $interface)) { $this->targetInterfaces[] = DefinedTargetClass::factory("\\Iterator"); $iteratorShiftedToFront = true; } elseif (preg_match("/^\\\\?Traversable$/i", $interface)) { $traversableFound = true; } } if ($traversableFound && !$iteratorShiftedToFront) { $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate"); } /** * We never straight up implement Traversable */ if (!preg_match("/^\\\\?Traversable$/i", $targetInterface)) { $this->targetInterfaces[] = $dtc; } } $this->targetInterfaces = array_unique($this->targetInterfaces); // just in case return $this->targetInterfaces; } public function getTargetObject() { return $this->targetObject; } public function getName() { return $this->name; } /** * Generate a suitable name based on the config */ public function generateName() { $name = 'Mockery_' . static::$mockCounter++; if ($this->getTargetObject()) { $name .= "_" . str_replace("\\", "_", get_class($this->getTargetObject())); } if ($this->getTargetClass()) { $name .= "_" . str_replace("\\", "_", $this->getTargetClass()->getName()); } if ($this->getTargetInterfaces()) { $name .= array_reduce($this->getTargetInterfaces(), function ($tmpname, $i) { $tmpname .= '_' . str_replace("\\", "_", $i->getName()); return $tmpname; }, ''); } return $name; } public function getShortName() { $parts = explode("\\", $this->getName()); return array_pop($parts); } public function getNamespaceName() { $parts = explode("\\", $this->getName()); array_pop($parts); if (count($parts)) { return implode("\\", $parts); } return ""; } public function getBlackListedMethods() { return $this->blackListedMethods; } public function getWhiteListedMethods() { return $this->whiteListedMethods; } public function isInstanceMock() { return $this->instanceMock; } public function getParameterOverrides() { return $this->parameterOverrides; } public function isMockOriginalDestructor() { return $this->mockOriginalDestructor; } protected function setTargetClassName($targetClassName) { $this->targetClassName = $targetClassName; } protected function getAllMethods() { if ($this->allMethods) { return $this->allMethods; } $classes = $this->getTargetInterfaces(); if ($this->getTargetClass()) { $classes[] = $this->getTargetClass(); } $methods = array(); foreach ($classes as $class) { $methods = array_merge($methods, $class->getMethods()); } foreach ($this->getTargetTraits() as $trait) { foreach ($trait->getMethods() as $method) { if ($method->isAbstract()) { $methods[] = $method; } } } $names = array(); $methods = array_filter($methods, function ($method) use (&$names) { if (in_array($method->getName(), $names)) { return false; } $names[] = $method->getName(); return true; }); // In HHVM, class methods can be annotated with the built-in // <<__Memoize>> attribute (similar to a Python decorator), // which builds an LRU cache of method arguments and their // return values. // https://docs.hhvm.com/hack/attributes/special#__memoize // // HHVM implements this behavior by inserting a private helper // method into the class at runtime which is named as the // method to be memoized, suffixed by `$memoize_impl`. // https://github.com/facebook/hhvm/blob/6aa46f1e8c2351b97d65e67b73e26f274a7c3f2e/hphp/runtime/vm/func.cpp#L364 // // Ordinarily, PHP does not all allow the `$` token in method // names, but since the memoization helper is inserted at // runtime (and not in userland), HHVM allows it. // // We use code generation and eval() for some types of mocks, // so to avoid syntax errors from these memoization helpers, // we must filter them from our list of class methods. // // This effectively disables the memoization behavior in HHVM, // but that's preferable to failing catastrophically when // attempting to mock a class using the attribute. if (defined('HHVM_VERSION')) { $methods = array_filter($methods, function ($method) { return strpos($method->getName(), '$memoize_impl') === false; }); } return $this->allMethods = $methods; } /** * If we attempt to implement Traversable, we must ensure we are also * implementing either Iterator or IteratorAggregate, and that whichever one * it is comes before Traversable in the list of implements. */ protected function addTargetInterfaceName($targetInterface) { $this->targetInterfaceNames[] = $targetInterface; } protected function addTargetTraitName($targetTraitName) { $this->targetTraitNames[] = $targetTraitName; } protected function setTargetObject($object) { $this->targetObject = $object; } public function getConstantsMap() { return $this->constantsMap; } }