Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Stichoza/FreshPHP

Repository files navigation

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.
}

About

Fresh PHP MVC framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages