Code Monkey home page Code Monkey logo

freshphp's Introduction

FreshPHP Build Status

This is some sort of lightweight (or maybe overly complicated) PHP framework with underlying MVC architecture implementing some other OOP design patterns like Singleton and etc.

Currently I'm writing this for educational purposes only but I'm using this in some of my projects.


Contributing to FreshPHP

Issue Tracking

Report bugs and issues (good ideas also) in Issue Tracker

  • Search for existing issues to avoid duplicate issues.
  • Include a live example if possible.
  • Share as much information as possible. Include operating system and version. Information about PHP, MySQL, Mail Server and any other used software used.
  • Also include steps to reproduce the bug.

Pull Requests

All pull requests are welcome! ๐Ÿค˜

Coding Standards

Inspired by Java Code Conventions.

  • class storing: src/Namespace/.../Namespace/ClassName.php
  • Braces on same line. Never use new lines for braces.
  • Four spaces for indentation, never tabs.
  • Use proper indentation.
  • Double quotes preferred.
  • Comma last, Dot first.
  • Each line should contain at most one statement.
  • Lower-first camelCase for variables and functions/methods
  • Upper-first CamelCase for class names
// Correct
if ($foo > 15) {
    $foo++;
    $bar--;
    print("ok");
    $newArray = array(
    "key_1" => 452,
        "key_2" => array(
            "key_2_1" => "yolo"
        ),
    "key_3" => "hello",
    "key_4" => "world"
    );
    echo "hello "
        . "world "
        . $foo . ":>";
}
if($foo>15)                         // Spaces around operators, spaces after keywords
{                                   // Don't use new lines for braces
    $foo++; $bar--;                 // Each line should contain at most one statement
    print('ok');                    // Use double quotes
    $new_array = array(             // Use camelCase in variable naming
    "key-1" => 452,                 // Never use dashes in array keys. Use underscores.
        "key_2" => array("key_2_1" => "yolo"),    // Use proper indentation.
    "key_3" => "hello"
    , "key_4" => "world"            // Comma-last
    );
    echo "hello hello " .           // Dot-first
        "world " .
        $foo.":>";                  // Use spaces around dots.
}

freshphp's People

Contributors

stichoza avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

freshphp's Issues

Smarter SimilarText

Need smarter SimilarText algorithm.

Example:
base: ["fffffffuuuuuuu", "radiance", "hello", "lol"]
search: "fffuuu"
results: ["lol", "hello", "radiance", "fffffffuuuuuuu"]

According to this, the most similar to fffuuu is lol, but actually fffffffuuuuuuu is more similar because of its' letters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.