-
Notifications
You must be signed in to change notification settings - Fork 564
PHP IDE & Debugging for Laravel
The best applications are coded properly. This sounds like an obvious statement, but here 'properly' means that the code not only does its job well, but is also easy to add to, maintain and debug.
As PHP developers, we need to define and adhere to a coding style not because one is better than another but because we need a standard by which to collaborate.
Well this is the question which comes in our mind every time we write code. We just want to write a code that performs the required action. But to answer that question I'd like you to answer following questions-- Can you actually read the code? Is it spaced out clearly?
- Do you separate blocks of code into 'paragraphs' so that different sections are easily defined?
- Are you using indentation to show where control structures (if, else, while and other loops) begin and end, and where the code within them is?
- Are your variable naming conventions consistent throughout the code and do they briefly describe that data that they'll contain?
- Are functions named in accordance with what they do?
- If you come back to the code in a few weeks or months, will you be able to work out what's happening without needing to look at every line?
- How are you commenting the work?
- Can a new member in your team understand your code without scratching his head?
e.g
class Calculator
{
public function addXandY()
{
//method for adding two variables.
}
}
- Variables - all small case with underscore separator.
- eg variable_name or name
- Constants-Class constants MUST be declared in all uppercase with underscore separators. CONSTANT_NAME
- Functions- use camel case. First word should start with small letter after that all words should start with capital letter.
- e.g- function , functionName, functionNameFunction
- Classes- Class name should start with capital letter. All words in class should start with capital letter.
- e.g- ClassName, ClassNameClass
e.g
class ClassName
{
function functionName()
{
//function body
}
//body
}
e.g
if (a>b) {
//do someting
} else {
//do something
}
e.g
function functionName(arguments) if (condition) {Use proper indentation in your code, it increases readability of your code. Each line must have one statement only. And line must not be longer than soft limit (120 characters) if line exceeds this limit it is better to break it into two or more lines. All php developers are advised to follow coding standards. It will be annoying in starting but once you start writing clean code, your code will be more efficient, readable/understandable and easy to modify for changes in future.
Spend 10 minutes everyday to read these standards. Learn them and next time you write your code follow these standards.
There are various tools available which inspect your code against defined coding standards in php. Use these tools to check your code and fix coding standards in your code.
IDE likes Sublime and NetBeans have plugins which checks your code against coding standard and indicate errors in your code at the time of development. Use these IDEs and integrate these plugins so that you can write code that follows php coding standards.
Did you find it helpful? If not email us on support@faveohelpdesk.com
Installation and Upgrade Guide
- GUI Install Wizard
- Manual Install
- CLI Install
- Server Requirements
- Installation with Apache
- Installation with cPanel
- Cron Job or any Job scheduler
- Faveo Helpdesk Installation on CentOS 7 with Apache on PHP 7.1
- Faveo Helpdesk Installation on CentOS 7 with Nginx on PHP 7.1
- Faveo Helpdesk Installation on Ubuntu 18.04 LTS with Apache on PHP 7.1
- Faveo Helpdesk Installation on Ubuntu 18.04 LTS with Nginx on PHP 7.1
- Faveo Helpdesk Installation on Debian 9 with Nginx on PHP 7.1
- Faveo Helpdesk Installation on Debian 9 with Apache on PHP 7.1
- Migrating Faveo from one server to another
- Configuration of Redis with Faveo
- Install and configure Redis, Supervisor and Worker for Faveo on Ubuntu 16.04
- Install Let’s Encrypt SSL on CentOS 7 Running Apache Web Server
- Install and configure a simple mail server for sending mails using PHP mail function in Faveo on Ubuntu 16.04 server
- Install and configure Redis, Supervisor and Worker for Faveo on Centos 7
- Install and configure a simple mail server for sending mails using PHP mail function in Faveo on Centos 7 server
- Faveo Helpdesk Pro Installation on Windows Server 2012 R2
- Install Active Directory Domain Services in Windows Server 2012 R2
- Install Faveo Helpdesk Community on Centos, Ubuntu or Debian Using Script
- Set up automatic backup for Faveo-Helpdesk
Administrator's Guide
- Faveo File Storage
- Change client side theme color
- How to edit or change the footer in faveo
- How to change agent and admin panel Faveo logo link and logo
- Agents
- Departments
- Team
- Priority
- SLA
- Workflow
- Helptopic
- Default Ticket Settings
- Status
- Rating
- Close Ticket Workflow
- Company Settings
- Social Login
- Language
- Security
- Debugging/Logs
- Ban Emails
- Widgets
Agent's Guide
Email Integration
Release & Upgrade Notes
- General Faveo Upgrade Guide Manual
- General Faveo Upgrade Guide Auto
- Upgrade guide to v1.9.2
- Upgrade guide to v1.9.0
- How to update v1.0.7.9 to v1.0.8.0
- Manual Upgrade from v1.0.7.8 to v1.0.7.9
- Faveo Release notes & upgrade guide for V1.0.7.7
- Faveo Release notes & upgrade guide for V1.0.7.5
- Faveo Release notes & upgrade guide for V1.0.7
Known Issues
- The open_basedir restriction in effect
- 404 Not Found
- 500 Internal Server Error
- Bug after update from 1.0.7.4 to 1.0.7.5 or higher version
- Syntax error, unexpected ‘var’(T_VAR), expecting ‘;’
Contribute & Feedback
- Support the community edition
- Contribution Guide
- Faveo Feedback & Customisation
- Help in language translate
Knowledge Base
Third Party Integration
Plugins
API