Entries tagged clean

PHP + Laravel development Packages for atom.io

Posted on 30. Januar 2018 Comments

PHP CS Fixer

brew install php-cs-fixer

apm install php-cs-fixer


php path: /usr/local/bin/php

php-cs-fixer path: /usr/local/bin/php-cs-fixer

PHP CS Fixer Rules: @PSR2,blank_line_after_opening_tag,whitespace_after_comma_in_array,blank_line_after_namespace

PHP CS Fixer Arguments: --using-cache=no, --no-interaction, --stop-on-violation

[x] Show Notifications


Can also be used on commandline for folders, e.g.
$ php-cs-fixer fix app/ --rules=@PSR2,blank_line_after_opening_tag,whitespace_after_comma_in_array,blank_line_after_namespace


php-integrator-refactoring (php-integrator-base)

apm install php-integrator-base

apm install php-integrator-refactoring

Linting (also see linter(-php))

Sort use statements


linter and linter-php

apm install linter

apm install linter-php

In case linting with php-integrator-base does not work.


language-blade and language-vue

apm install language-blade

apm install language-vue



apm install minimap

Short overview over the code on the right side



apm install highlight-selected



apm install platform-ide-terminal

Instead of switching windows, terminal right in atom




apm install symbols-tree-view

Structured overview on the right side over classes, constants, attributes, methods etc


hyperclick and hyperclick-php

apm install hyperclick

apm install hyperclick-php

Cmd+Click on classes, functions etc to go to origin.

Not needed if you installed atom-ide-ui



apm install teletype

Work on the same file with coworkers, encrypted via WebRTC


More dependencies might be installed with installing some of these packages

Simple MRBS Output from Database

Posted on 17. September 2013 Comments

I wrote a little PHP-script that extracts the most important and current data from MRBS’s MySQL database and just prints them in a simple HTML file. Its not pretty but good for bandwith and clarity. We use it to display information on an energy efficient e-ink screen in front of conference/computer rooms.

$date is set like this:

$date = date("Y-m-d");

The SELECT-statements go like this, where N is the ID of the room(in the database, not what you might call it)

SELECT name,description,from_unixtime(start_time),from_unixtime(end_time) FROM mrbs_entry WHERE from_unixtime(start_time) LIKE '%" . $date . "%' AND room_id = N;

I’m not gonna explain here how to establish a database connection in PHP, but you can have a  look at the whole sourcecode at github 😉

I then cut off the date with substr() because it’s always 10 characters in front of time->(YYYY-MM-DD) and printed it via echo. This is the simple version, there is a version with tables on github.

while($row=mysql_fetch_row($qry01)) {
echo "- <strong>Room</strong> 01 | <strong>Desc:</strong>" . $row[0]." - ".$row[1]." |  <strong>Time:</strong> ". substr($row[2],10) . " - " . substr($row[3],10) . " <br />";

update: I wrote another version that prints JSON objects which can be parsed on the other side. For easier parsing(e.g. if everything is in one String) I numbered them:

$jsonarray = array('begin' . $i => substr($row[2],11, 5), 'end' . $i => substr($row[3],11,5), 'name' . $i => $row['name'], 'description' . $i =>  $row['description']);

You’ll find the whole thing on github.