Skip to content

Instantly share code, notes, and snippets.

View mniewrzal's full-sized avatar

Michał Niewrzał mniewrzal

View GitHub Profile
--TEST--
Test unused use statement
--FILE--
<?php
use Test\UnusedStatement;
use Test\UsedStatement;
new UsedStatement();
--EXPECT--
[line=2, start=6, end=31] "Unused import 'Test\UnusedStatement', consider removing."
<?php
use Test1;
use Vax1; // try remove this import
/**
*
* @author aaa
*/
class MyClass{
<?php
class Foo {
function bar($param) {
}
}
(new Foo ())->|;
?>
@mniewrzal
mniewrzal / phpcs.xml
Created October 23, 2016 15:34
phpcs.xml
<?xml version="1.0"?>
<ruleset name="PHP Language Server">
<rule ref="PSR2">
<exclude name="PSR2.Namespaces.UseDeclaration"/>
</rule>
</ruleset>
@charset "UTF-8";@import url(//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300);@import url(https://fonts.googleapis.com/css?family=Oswald:300,400,700&subset=latin-ext);@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:300,400,700&subset=latin-ext);@import url(https://fonts.googleapis.com/css?family=Lato:300,300i,400,400i,700,700i,900,900i&subset=latin-ext);@import url(https://fonts.googleapis.com/css?family=Slabo+27px&subset=latin-ext);@import url(bower_components/video.js/dist/video-js/video-js.css);@import url(bower_components/chosen/chosen.min.css);@import url(bower_components/chosen/chosen.min.css);article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margi
<?php
declare(strict_types = 1);
namespace LanguageServer;
use LanguageServer\Cache\Cache;
use LanguageServer\FilesFinder\FilesFinder;
use LanguageServer\Index\{DependenciesIndex, Index};
use LanguageServer\Protocol\MessageType;
use Webmozart\PathUtil\Path;
package com.breakcoder.jogun.trader;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.breakcoder.jogun.client.market.base.MarketClientException;
import com.breakcoder.jogun.client.market.poloniex.PoloniexClient;
/*******************************************************************************
* Copyright (c) 2017 Alex Xu and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alex Xu - initial API and implementation
*******************************************************************************/
!ENTRY org.eclipse.lsp4e 4 0 2017-06-19 11:47:18.218
!MESSAGE
!STACK 0
java.util.concurrent.TimeoutException
at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1756)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at org.eclipse.lsp4e.ProjectSpecificLanguageServerWrapper.getServerCapabilities(ProjectSpecificLanguageServerWrapper.java:410)
at org.eclipse.lsp4e.LanguageServiceAccessor.getMatchingStartedWrapper(LanguageServiceAccessor.java:324)
at org.eclipse.lsp4e.LanguageServiceAccessor.getLSWrapper(LanguageServiceAccessor.java:249)
at org.eclipse.lsp4e.LanguageServiceAccessor.getLSPDocumentInfoFor(LanguageServiceAccessor.java:193)

Keybase proof

I hereby claim:

  • I am mniewrzal on github.

  • I am mniewrzal (https://keybase.io/mniewrzal) on keybase.

  • I have a public key ASCnHL9GI_wZRzT9hbulPZgD_TgoA3pek_vBKEJAZCZYYQo